Merge branch '10.2' into 10.3
This commit is contained in:
commit
60ea09eae6
@ -1080,6 +1080,20 @@ static int get_options(int *argc, char ***argv)
|
||||
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
|
||||
return(ho_error);
|
||||
|
||||
/*
|
||||
Dumping under --system=stats with --replace or --inser-ignore is safe and will not
|
||||
retult into race condition. Otherwise dump only structure and ignore data by default
|
||||
while dumping.
|
||||
*/
|
||||
if (!(opt_system & OPT_SYSTEM_STATS) && !(opt_ignore || opt_replace_into))
|
||||
{
|
||||
if (my_hash_insert(&ignore_data,
|
||||
(uchar*) my_strdup("mysql.innodb_index_stats", MYF(MY_WME))) ||
|
||||
my_hash_insert(&ignore_data,
|
||||
(uchar*) my_strdup("mysql.innodb_table_stats", MYF(MY_WME))))
|
||||
return(EX_EOM);
|
||||
}
|
||||
|
||||
if (opt_system & OPT_SYSTEM_ALL)
|
||||
opt_system|= ~0;
|
||||
|
||||
@ -4792,7 +4806,7 @@ static int dump_all_servers()
|
||||
|
||||
static int dump_all_stats()
|
||||
{
|
||||
my_bool prev_no_create_info;
|
||||
my_bool prev_no_create_info, prev_opt_replace_into;
|
||||
|
||||
if (mysql_select_db(mysql, "mysql"))
|
||||
{
|
||||
@ -4800,6 +4814,8 @@ static int dump_all_stats()
|
||||
return 1; /* If --force */
|
||||
}
|
||||
fprintf(md_result_file,"\nUSE mysql;\n");
|
||||
prev_opt_replace_into= opt_replace_into;
|
||||
opt_replace_into|= !opt_ignore;
|
||||
prev_no_create_info= opt_no_create_info;
|
||||
opt_no_create_info= 1; /* don't overwrite recreate tables */
|
||||
/* EITS added in 10.0.1 */
|
||||
@ -4818,6 +4834,7 @@ static int dump_all_stats()
|
||||
dump_table("innodb_table_stats", "mysql", NULL, 0);
|
||||
}
|
||||
opt_no_create_info= prev_no_create_info;
|
||||
opt_replace_into= prev_opt_replace_into;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4828,12 +4845,14 @@ static int dump_all_stats()
|
||||
|
||||
static int dump_all_timezones()
|
||||
{
|
||||
my_bool opt_prev_no_create_info;
|
||||
my_bool opt_prev_no_create_info, opt_prev_replace_into;
|
||||
if (mysql_select_db(mysql, "mysql"))
|
||||
{
|
||||
DB_error(mysql, "when selecting the database");
|
||||
return 1; /* If --force */
|
||||
}
|
||||
opt_prev_replace_into= opt_replace_into;
|
||||
opt_replace_into|= !opt_ignore;
|
||||
opt_prev_no_create_info= opt_no_create_info;
|
||||
opt_no_create_info= 1;
|
||||
fprintf(md_result_file,"\nUSE mysql;\n");
|
||||
@ -4843,6 +4862,7 @@ static int dump_all_timezones()
|
||||
dump_table("time_zone_transition", "mysql", NULL, 0);
|
||||
dump_table("time_zone_transition_type", "mysql", NULL, 0);
|
||||
opt_no_create_info= opt_prev_no_create_info;
|
||||
opt_replace_into= opt_prev_replace_into;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
6
debian/autobake-deb.sh
vendored
6
debian/autobake-deb.sh
vendored
@ -96,6 +96,12 @@ then
|
||||
sed '/Package: mariadb-plugin-rocksdb/,/^$/d' -i debian/control
|
||||
fi
|
||||
|
||||
## Skip TokuDB if arch is not amd64
|
||||
if [[ ! $(dpkg-architecture -q DEB_BUILD_ARCH) =~ amd64 ]]
|
||||
then
|
||||
sed '/Package: mariadb-plugin-tokudb/,/^$/d' -i debian/control
|
||||
fi
|
||||
|
||||
# Always remove aws plugin, see -DNOT_FOR_DISTRIBUTION in CMakeLists.txt
|
||||
sed '/Package: mariadb-plugin-aws-key-management-10.2/,/^$/d' -i debian/control
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#define HOSTNAME_LENGTH 60
|
||||
#define SYSTEM_CHARSET_MBMAXLEN 3
|
||||
#define NAME_CHAR_LEN 64U /* Field/table name length */
|
||||
#define USERNAME_CHAR_LENGTH 128U
|
||||
#define USERNAME_CHAR_LENGTH 128
|
||||
#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN)
|
||||
#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN)
|
||||
#define DEFINER_CHAR_LENGTH (USERNAME_CHAR_LENGTH + HOSTNAME_LENGTH + 1)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e38244220646a7e95c9be22576460aa7a4eb715f
|
||||
Subproject commit e62ff462c58ce154596a0f1da9e79cd4395396e3
|
@ -627,7 +627,8 @@ int init_embedded_server(int argc, char **argv, char **groups)
|
||||
|
||||
(void) thr_setconcurrency(concurrency); // 10 by default
|
||||
|
||||
start_handle_manager();
|
||||
if (flush_time && flush_time != ~(ulong) 0L)
|
||||
start_handle_manager();
|
||||
|
||||
// FIXME initialize binlog_filter and rpl_filter if not already done
|
||||
// corresponding delete is in clean_up()
|
||||
|
@ -2261,7 +2261,7 @@ servers \- remote (federated) servers as \fBCREATE SERVER\fR\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
stats \- statistics tables, InnoDB and Engine Independent Table Statistics (EITS), are dumped as \fBINSERT\fR/\fBREPLACE INFO\fR statements without (re)creating tables\&.
|
||||
stats \- statistics tables, InnoDB and Engine Independent Table Statistics (EITS), are dumped as \fBREPLACE INTO\fR (or \fBINSERT IGNORE\fR if \fB\-\-insert\-into\fR is specified) statements without (re)creating tables\&.
|
||||
.RE
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
@ -2271,7 +2271,7 @@ stats \- statistics tables, InnoDB and Engine Independent Table Statistics (EITS
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
timezones \- timezone related system tables dumped as \fBINSERT\fR/\fBREPLACE INTO\fR statements without (re)creating tables\&.
|
||||
timezones \- timezone related system tables dumped as \fBREPLACE INTO\fR (or \fBINSERT IGNORE\fR if \fB\-\-insert\-into\fR is specified) statements without (re)creating tables\&.
|
||||
.RE
|
||||
.sp
|
||||
The format of the output is affected by \fB\-\-replace\fR and \fB\-\-insert\-into\fR\&. The \fB\-\-replace\fR option will output \fBCREATE OR REPLACE\fR
|
||||
@ -2281,12 +2281,11 @@ With \fB\-\-system=user\fR (or \fBall\fR), and \fB\-\-replace\fR, SQL is generat
|
||||
.sp
|
||||
The \fB\-\-insert\-into\fR option will cause \fBCREATE IF NOT EXIST\fR forms of SQL to generated if available.
|
||||
.sp
|
||||
For stats, and timezones, \fB\-\-replace\fR and \fB\-\-insert\-info\fR have the usual effects.
|
||||
For stats, and timezones, \fB\-\-replace\fR and \fB\-\-insert\-into\fR have the usual effects.
|
||||
.sp
|
||||
Enabling specific options here will cause the relevant tables in the mysql database to be ignored when dumping the mysql database or \fB\-\-all\-databases\fR\&.
|
||||
.sp
|
||||
Experimentally this option is designed to be able to dump system information from MySQL-5\&.7 and 8\&.0 servers\&. SQL generated is also
|
||||
experimentally compatible with MySQL-5\&.7/8\&.0\&. Mappings of implemenation specific grants/plugins isn't always one-to-one however\&.
|
||||
To help in migrating from MySQL to MariaDB, this option is designed to be able to dump system information from MySQL-5\&.7 and 8\&.0 servers\&. SQL generated is also experimentally compatible with MySQL-5\&.7/8\&.0. Mappings of implementation specific grants/plugins isn't always one-to-one however between MariaDB and MySQL and will require manual changes\&.
|
||||
.sp
|
||||
.RE
|
||||
.RS 4
|
||||
|
@ -1,7 +1,4 @@
|
||||
call mtr.add_suppression("table or database name 't-1'");
|
||||
drop table if exists t1,t2,t3,t4,t5;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v1;
|
||||
create table t1 (b char(0));
|
||||
insert into t1 values (""),(null);
|
||||
select * from t1;
|
||||
@ -1314,7 +1311,7 @@ drop table if exists t1,t2,t3;
|
||||
# Fix modified for MariaDB: we support this syntax
|
||||
create table t1 (a int) transactional=0;
|
||||
Warnings:
|
||||
Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
|
||||
Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=0'
|
||||
create table t2 (a int) page_checksum=1;
|
||||
create table t3 (a int) row_format=page;
|
||||
drop table t1,t2,t3;
|
||||
@ -2090,14 +2087,39 @@ alter table t1 add
|
||||
key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0064 (f64) comment 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy';
|
||||
ERROR HY000: Cannot create table `t1`: index information is too long. Decrease number of indexes or use shorter index names or shorter comments.
|
||||
drop table t1;
|
||||
End of 5.5 tests
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
|
||||
#
|
||||
create table t1;
|
||||
ERROR 42000: A table must have at least 1 column
|
||||
#
|
||||
# MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT
|
||||
#
|
||||
create table t1 (i int, j int, key(i), key(i)) as select 1 as i, 2 as j;
|
||||
Warnings:
|
||||
Note 1831 Duplicate index `i_2`. This is deprecated and will be disallowed in a future release
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE
|
||||
#
|
||||
create table t1 (c int(10) unsigned) engine=memory transactional=0;
|
||||
ERROR HY000: Table storage engine 'MEMORY' does not support the create option 'TRANSACTIONAL=0'
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-17544 No warning when trying to name a primary key constraint.
|
||||
#
|
||||
CREATE TABLE t1 ( id1 INT, id2 INT, CONSTRAINT `foo` PRIMARY KEY (id1), CONSTRAINT `bar` UNIQUE KEY(id2));
|
||||
Warnings:
|
||||
Warning 1280 Name 'foo' ignored for PRIMARY key.
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -5,12 +5,6 @@ call mtr.add_suppression("table or database name 't-1'");
|
||||
# Check some special create statements.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2,t3,t4,t5;
|
||||
drop database if exists mysqltest;
|
||||
drop view if exists v1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1 (b char(0));
|
||||
insert into t1 values (""),(null);
|
||||
select * from t1;
|
||||
@ -29,30 +23,30 @@ drop table t1;
|
||||
# Test of some CREATE TABLE'S that should fail
|
||||
#
|
||||
|
||||
--error 1146
|
||||
--error ER_NO_SUCH_TABLE
|
||||
create table t2 engine=heap select * from t1;
|
||||
--error 1146
|
||||
--error ER_NO_SUCH_TABLE
|
||||
create table t2 select auto+1 from t1;
|
||||
drop table if exists t1,t2;
|
||||
--error 1167
|
||||
--error ER_WRONG_KEY_COLUMN
|
||||
create table t1 (b char(0) not null, index(b));
|
||||
--error 1163
|
||||
--error ER_TABLE_CANT_HANDLE_BLOB
|
||||
create table t1 (a int not null,b text) engine=heap;
|
||||
drop table if exists t1;
|
||||
|
||||
--error 1075
|
||||
--error ER_WRONG_AUTO_KEY
|
||||
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
|
||||
|
||||
-- error 1049
|
||||
--error ER_BAD_DB_ERROR
|
||||
create table not_existing_database.test (a int);
|
||||
create table `a/a` (a int);
|
||||
show create table `a/a`;
|
||||
create table t1 like `a/a`;
|
||||
drop table `a/a`;
|
||||
drop table `t1`;
|
||||
--error 1103
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
|
||||
--error 1059
|
||||
--error ER_TOO_LONG_IDENT
|
||||
create table a (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
|
||||
|
||||
#
|
||||
@ -62,17 +56,17 @@ create table t1 (a datetime default now());
|
||||
drop table t1;
|
||||
create table t1 (a datetime on update now());
|
||||
drop table t1;
|
||||
--error 1067
|
||||
--error ER_INVALID_DEFAULT
|
||||
create table t1 (a int default 100 auto_increment);
|
||||
--error 1067
|
||||
--error ER_INVALID_DEFAULT
|
||||
create table t1 (a tinyint default 1000);
|
||||
--error 1067
|
||||
--error ER_INVALID_DEFAULT
|
||||
create table t1 (a varchar(5) default 'abcdef');
|
||||
|
||||
create table t1 (a varchar(5) default 'abcde');
|
||||
insert into t1 values();
|
||||
select * from t1;
|
||||
--error 1067
|
||||
--error ER_INVALID_DEFAULT
|
||||
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
|
||||
alter table t1 alter column a set default 'abcdef';
|
||||
drop table t1;
|
||||
@ -97,13 +91,13 @@ create table mysqltest.test2$ (a int);
|
||||
drop table mysqltest.test2$;
|
||||
drop database mysqltest;
|
||||
|
||||
--error 1103
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table `` (a int);
|
||||
--error 1103
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
drop table if exists ``;
|
||||
--error 1166
|
||||
--error ER_WRONG_COLUMN_NAME
|
||||
create table t1 (`` int);
|
||||
--error 1280
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
create table t1 (i int, index `` (i));
|
||||
|
||||
#
|
||||
@ -158,13 +152,13 @@ create table t2 (a int) select * from t1;
|
||||
describe t1;
|
||||
describe t2;
|
||||
drop table if exists t2;
|
||||
--error 1060
|
||||
--error ER_DUP_FIELDNAME
|
||||
create table t2 (a int, a float) select * from t1;
|
||||
drop table if exists t2;
|
||||
--error 1060
|
||||
--error ER_DUP_FIELDNAME
|
||||
create table t2 (a int) select a as b, a+1 as b from t1;
|
||||
drop table if exists t2;
|
||||
--error 1060
|
||||
--error ER_DUP_FIELDNAME
|
||||
create table t2 (b int) select a as b, a+1 as b from t1;
|
||||
drop table if exists t1,t2;
|
||||
|
||||
@ -176,7 +170,7 @@ CREATE TABLE t1 (a int not null);
|
||||
INSERT INTO t1 values (1),(2),(1);
|
||||
--error ER_DUP_ENTRY
|
||||
CREATE TABLE t2 (primary key(a)) SELECT * FROM t1;
|
||||
--error 1146
|
||||
--error ER_NO_SUCH_TABLE
|
||||
SELECT * from t2;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
@ -202,7 +196,7 @@ SELECT @@storage_engine;
|
||||
CREATE TABLE t1 (a int not null);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
--error 1286
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SET SESSION storage_engine="gemini";
|
||||
SELECT @@storage_engine;
|
||||
CREATE TABLE t1 (a int not null);
|
||||
@ -216,11 +210,11 @@ drop table t1;
|
||||
#
|
||||
create table t1 ( k1 varchar(2), k2 int, primary key(k1,k2));
|
||||
insert into t1 values ("a", 1), ("b", 2);
|
||||
--error 1048
|
||||
--error ER_BAD_NULL_ERROR
|
||||
insert into t1 values ("c", NULL);
|
||||
--error 1048
|
||||
--error ER_BAD_NULL_ERROR
|
||||
insert into t1 values (NULL, 3);
|
||||
--error 1048
|
||||
--error ER_BAD_NULL_ERROR
|
||||
insert into t1 values (NULL, NULL);
|
||||
drop table t1;
|
||||
|
||||
@ -262,11 +256,11 @@ drop table t1;
|
||||
# "Table truncated when creating another table name with Spaces"
|
||||
#
|
||||
|
||||
--error 1103
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table `t1 `(a int);
|
||||
--error 1102
|
||||
--error ER_WRONG_DB_NAME
|
||||
create database `db1 `;
|
||||
--error 1166
|
||||
--error ER_WRONG_COLUMN_NAME
|
||||
create table t1(`a ` int);
|
||||
|
||||
#
|
||||
@ -274,11 +268,11 @@ create table t1(`a ` int);
|
||||
# "Parser permits multiple commas without syntax error"
|
||||
#
|
||||
|
||||
--error 1064
|
||||
--error ER_PARSE_ERROR
|
||||
create table t1 (a int,);
|
||||
--error 1064
|
||||
--error ER_PARSE_ERROR
|
||||
create table t1 (a int,,b int);
|
||||
--error 1064
|
||||
--error ER_PARSE_ERROR
|
||||
create table t1 (,b int);
|
||||
|
||||
#
|
||||
@ -320,13 +314,13 @@ create table t2 like t3;
|
||||
show create table t2;
|
||||
select * from t2;
|
||||
create table t3 like t1;
|
||||
--error 1050
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
create table t3 like mysqltest.t3;
|
||||
--error 1049
|
||||
--error ER_BAD_DB_ERROR
|
||||
create table non_existing_database.t1 like t1;
|
||||
--error ER_NO_SUCH_TABLE
|
||||
create table t3 like non_existing_table;
|
||||
--error 1050
|
||||
--error ER_TABLE_EXISTS_ERROR
|
||||
create temporary table t3 like t1;
|
||||
drop table t1, t2, t3;
|
||||
drop table t3;
|
||||
@ -360,7 +354,7 @@ SELECT @@storage_engine;
|
||||
CREATE TABLE t1 (a int not null);
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
--error 1286
|
||||
--error ER_UNKNOWN_STORAGE_ENGINE
|
||||
SET SESSION storage_engine="gemini";
|
||||
SELECT @@storage_engine;
|
||||
CREATE TABLE t1 (a int not null);
|
||||
@ -480,9 +474,9 @@ use test;
|
||||
# Test for Bug 856 'Naming a key "Primary" causes trouble'
|
||||
#
|
||||
|
||||
--error 1280
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
create table t1 (a int, index `primary` (a));
|
||||
--error 1280
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
create table t1 (a int, index `PRIMARY` (a));
|
||||
|
||||
create table t1 (`primary` int, index(`primary`));
|
||||
@ -491,9 +485,9 @@ create table t2 (`PRIMARY` int, index(`PRIMARY`));
|
||||
show create table t2;
|
||||
|
||||
create table t3 (a int);
|
||||
--error 1280
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
alter table t3 add index `primary` (a);
|
||||
--error 1280
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
alter table t3 add index `PRIMARY` (a);
|
||||
|
||||
create table t4 (`primary` int);
|
||||
@ -548,11 +542,11 @@ drop table t1;
|
||||
#
|
||||
# Bug#10413: Invalid column name is not rejected
|
||||
#
|
||||
--error 1103
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table t1(column.name int);
|
||||
--error 1103
|
||||
--error ER_WRONG_TABLE_NAME
|
||||
create table t1(test.column.name int);
|
||||
--error 1102
|
||||
--error ER_WRONG_DB_NAME
|
||||
create table t1(xyz.t1.name int);
|
||||
create table t1(t1.name int);
|
||||
create table t2(test.t2.name int);
|
||||
@ -591,7 +585,7 @@ drop table if exists test.t1;
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
create view v1 as select 'foo' from dual;
|
||||
--error 1347
|
||||
--error ER_WRONG_OBJECT
|
||||
create table t1 like v1;
|
||||
drop view v1;
|
||||
drop database mysqltest;
|
||||
@ -712,7 +706,7 @@ drop table t1, t2;
|
||||
#
|
||||
# Bug #15316 SET value having comma not correctly handled
|
||||
#
|
||||
--error 1367
|
||||
--error ER_ILLEGAL_VALUE_FOR_TYPE
|
||||
create table t1(a set("a,b","c,d") not null);
|
||||
|
||||
# End of 4.1 tests
|
||||
@ -910,9 +904,9 @@ INSERT IGNORE INTO t1 (b) VALUES (5);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS t2 (a INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY)
|
||||
SELECT a FROM t1;
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t2 SELECT a FROM t1;
|
||||
--error 1062
|
||||
--error ER_DUP_ENTRY
|
||||
INSERT INTO t2 SELECT a FROM t1;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
@ -972,24 +966,24 @@ drop table t1,t2;
|
||||
# Test incorrect database names
|
||||
#
|
||||
|
||||
--error 1102
|
||||
--error ER_WRONG_DB_NAME
|
||||
CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
|
||||
--error 1102
|
||||
--error ER_WRONG_DB_NAME
|
||||
DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
|
||||
|
||||
# TODO: enable these tests when RENAME DATABASE is implemented.
|
||||
# --error 1049
|
||||
# --error ER_BAD_DB_ERROR
|
||||
# RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a;
|
||||
# --error 1102
|
||||
# --error ER_WRONG_DB_NAME
|
||||
# RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
|
||||
# create database mysqltest;
|
||||
# --error 1102
|
||||
# --error ER_WRONG_DB_NAME
|
||||
# RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
|
||||
# drop database mysqltest;
|
||||
|
||||
--error 1102
|
||||
--error ER_WRONG_DB_NAME
|
||||
USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
|
||||
--error 1102
|
||||
--error ER_WRONG_DB_NAME
|
||||
SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
|
||||
|
||||
#
|
||||
@ -1042,11 +1036,11 @@ before insert on имя_таблицы_в_кодировке_утф8_длино
|
||||
select TRIGGER_NAME from information_schema.triggers where
|
||||
trigger_schema='test';
|
||||
drop trigger имя_триггера_в_кодировке_утф8_длиной_больше_чем_49;
|
||||
--error 1059
|
||||
--error ER_TOO_LONG_IDENT
|
||||
create trigger
|
||||
очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66
|
||||
before insert on имя_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1;
|
||||
--error 1059
|
||||
--error ER_TOO_LONG_IDENT
|
||||
drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66;
|
||||
|
||||
create procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50()
|
||||
@ -1055,7 +1049,7 @@ end;
|
||||
select ROUTINE_NAME from information_schema.routines where
|
||||
routine_schema='test';
|
||||
drop procedure имя_процедуры_в_кодировке_утф8_длиной_больше_чем_50;
|
||||
--error 1059
|
||||
--error ER_TOO_LONG_IDENT
|
||||
create procedure очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66()
|
||||
begin
|
||||
end;
|
||||
@ -1066,7 +1060,7 @@ return 0;
|
||||
select ROUTINE_NAME from information_schema.routines where
|
||||
routine_schema='test';
|
||||
drop function имя_функции_в_кодировке_утф8_длиной_больше_чем_49;
|
||||
--error 1059
|
||||
--error ER_TOO_LONG_IDENT
|
||||
create function очень_очень_очень_очень_очень_очень_очень_очень_длинная_строка_66()
|
||||
returns int
|
||||
return 0;
|
||||
@ -1934,23 +1928,42 @@ alter table t1 add
|
||||
key xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0064 (f64) comment 'yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy';
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.5 tests
|
||||
--echo #
|
||||
--echo # End of 5.5 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
|
||||
#
|
||||
--echo #
|
||||
--echo # MDEV-4880 Attempt to create a table without columns produces ER_ILLEGAL_HA instead of ER_TABLE_MUST_HAVE_COLUMNS
|
||||
--echo #
|
||||
--error ER_TABLE_MUST_HAVE_COLUMNS
|
||||
create table t1;
|
||||
|
||||
#
|
||||
# MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT
|
||||
#
|
||||
--echo #
|
||||
--echo # MDEV-11231 Server crashes in check_duplicate_key on CREATE TABLE ... SELECT
|
||||
--echo #
|
||||
create table t1 (i int, j int, key(i), key(i)) as select 1 as i, 2 as j;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# MDEV-17544 No warning when trying to name a primary key constraint.
|
||||
#
|
||||
--echo #
|
||||
--echo # End of 10.0 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-18428 Memory: If transactional=0 is specified in CREATE TABLE, it is not possible to ALTER TABLE
|
||||
--echo #
|
||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||
create table t1 (c int(10) unsigned) engine=memory transactional=0;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17544 No warning when trying to name a primary key constraint.
|
||||
--echo #
|
||||
CREATE TABLE t1 ( id1 INT, id2 INT, CONSTRAINT `foo` PRIMARY KEY (id1), CONSTRAINT `bar` UNIQUE KEY(id2));
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
@ -1306,7 +1306,7 @@ create table t1 (a varchar(334) character set utf32 primary key);
|
||||
ERROR 42000: Specified key was too long; max key length is 1000 bytes
|
||||
create table t1 (a varchar(333) character set utf32, key(a));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
insert into t1 values (repeat('a',333)), (repeat('b',333));
|
||||
flush tables;
|
||||
check table t1;
|
||||
|
@ -1478,7 +1478,7 @@ a varchar(255) NOT NULL default '',
|
||||
KEY a (a)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
insert into t1 values (_utf8mb4 0xe880bd);
|
||||
insert into t1 values (_utf8mb4 0x5b);
|
||||
select hex(a) from t1;
|
||||
@ -1526,7 +1526,7 @@ Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
@ -2726,7 +2726,7 @@ DEFAULT CHARACTER SET utf8,
|
||||
MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
|
||||
MODIFY p varchar(255) CHARACTER SET utf8;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -1443,7 +1443,7 @@ a varchar(255) NOT NULL default '',
|
||||
KEY a (a)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_general_ci;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
insert into t1 values (_utf8mb4 0xe880bd);
|
||||
insert into t1 values (_utf8mb4 0x5b);
|
||||
select hex(a) from t1;
|
||||
@ -1491,7 +1491,7 @@ Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
CREATE TABLE t1(a VARCHAR(255), KEY(a)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES('uuABCDEFGHIGKLMNOPRSTUVWXYZ̈bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t1 VALUES('uu');
|
||||
check table t1;
|
||||
|
@ -104,6 +104,9 @@ a
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 4076 Incorrect GeoJSON format - empty 'coordinates' array.
|
||||
SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }");
|
||||
ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }")
|
||||
NULL
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@ -44,6 +44,8 @@ SELECT st_astext(st_geomfromgeojson('{"type": "MultiLineString","coordinates": [
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "Polygon","coordinates": []}')) as a;
|
||||
SELECT st_astext(st_geomfromgeojson('{"type": "MultiPolygon","coordinates": []}')) as a;
|
||||
|
||||
SELECT ST_GEOMFROMGEOJSON("{ \"type\": \"Feature\", \"geometry\": [10, 20] }");
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
@ -2877,6 +2877,52 @@ GROUP BY t.table_name;
|
||||
ERROR HY001: Out of sort memory, consider increasing server sort buffer size
|
||||
SET max_sort_length= @save_max_sort_length;
|
||||
#
|
||||
# MDEV-23826: ORDER BY in view definition leads to wrong result with GROUP BY on query using view
|
||||
#
|
||||
CREATE TABLE t1
|
||||
(
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
dt datetime,
|
||||
INDEX(dt),
|
||||
foo int
|
||||
);
|
||||
INSERT INTO t1 VALUES (1,'2020-09-26 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (2,'2020-09-26 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (3,'2020-09-27 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (4,'2020-09-27 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (5,'2020-09-28 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (6,'2020-09-28 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (7,'2020-09-25 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (8,'2020-09-25 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (9,'2020-09-26 13:00:00',1);
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
CREATE VIEW v2 AS SELECT * FROM t1 ORDER BY dt;
|
||||
SELECT dt, sum(foo) AS foo FROM v1 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt;
|
||||
dt foo
|
||||
2020-09-25 12:00:00 1
|
||||
2020-09-25 13:00:00 1
|
||||
2020-09-26 12:00:00 1
|
||||
2020-09-26 13:00:00 2
|
||||
2020-09-27 12:00:00 1
|
||||
2020-09-27 13:00:00 1
|
||||
2020-09-28 12:00:00 1
|
||||
2020-09-28 13:00:00 1
|
||||
SELECT dt, sum(foo) AS foo FROM v2 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt;
|
||||
dt foo
|
||||
2020-09-25 12:00:00 1
|
||||
2020-09-25 13:00:00 1
|
||||
2020-09-26 12:00:00 1
|
||||
2020-09-26 13:00:00 2
|
||||
2020-09-27 12:00:00 1
|
||||
2020-09-27 13:00:00 1
|
||||
2020-09-28 12:00:00 1
|
||||
2020-09-28 13:00:00 1
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1,v2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
# MDEV-16170
|
||||
# Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
|
||||
#
|
||||
@ -2887,4 +2933,6 @@ f COUNT(*)
|
||||
1 1
|
||||
NULL 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
|
@ -1985,7 +1985,6 @@ drop table t1;
|
||||
--echo # GROUP BY leads to crash
|
||||
--echo #
|
||||
|
||||
|
||||
CALL mtr.add_suppression("Out of sort memory");
|
||||
CALL mtr.add_suppression("Sort aborted");
|
||||
SET @save_max_sort_length= @@max_sort_length;
|
||||
@ -1997,6 +1996,40 @@ WHERE c.table_schema=(SELECT COUNT(*) FROM INFORMATION_SCHEMA.columns GROUP BY c
|
||||
GROUP BY t.table_name;
|
||||
SET max_sort_length= @save_max_sort_length;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23826: ORDER BY in view definition leads to wrong result with GROUP BY on query using view
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1
|
||||
(
|
||||
id INT PRIMARY KEY AUTO_INCREMENT,
|
||||
dt datetime,
|
||||
INDEX(dt),
|
||||
foo int
|
||||
);
|
||||
|
||||
INSERT INTO t1 VALUES (1,'2020-09-26 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (2,'2020-09-26 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (3,'2020-09-27 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (4,'2020-09-27 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (5,'2020-09-28 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (6,'2020-09-28 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (7,'2020-09-25 12:00:00',1);
|
||||
INSERT INTO t1 VALUES (8,'2020-09-25 13:00:00',1);
|
||||
INSERT INTO t1 VALUES (9,'2020-09-26 13:00:00',1);
|
||||
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
CREATE VIEW v2 AS SELECT * FROM t1 ORDER BY dt;
|
||||
SELECT dt, sum(foo) AS foo FROM v1 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt;
|
||||
SELECT dt, sum(foo) AS foo FROM v2 WHERE dt>DATE_SUB('2020-09-27 00:00:00', INTERVAL 3 DAY) GROUP BY dt;
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP VIEW v1,v2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16170
|
||||
--echo # Server crashes in Item_null_result::type_handler on SELECT with ROLLUP
|
||||
@ -2007,4 +2040,6 @@ INSERT INTO t1 VALUES ('2032-10-08');
|
||||
SELECT d != '2023-03-04' AS f, COUNT(*) FROM t1 GROUP BY d WITH ROLLUP;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
@ -2211,6 +2211,18 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
|
||||
Warnings:
|
||||
Warning 1931 Query execution was interrupted. The query examined at least ### rows, which exceeds LIMIT ROWS EXAMINED (10). The query result may be incomplete
|
||||
#
|
||||
# MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK ||
|
||||
# m_status == DA_OK_BULK' failed in Diagnostics_area::message()
|
||||
#
|
||||
call mtr.add_suppression("Sort aborted.*");
|
||||
DROP DATABASE test;
|
||||
CREATE DATABASE test;
|
||||
USE test;
|
||||
CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema;
|
||||
SELECT * FROM v LIMIT ROWS EXAMINED 9;
|
||||
ERROR HY000: Sort aborted:
|
||||
DROP VIEW v;
|
||||
#
|
||||
# End of 10.2 Test
|
||||
#
|
||||
#
|
||||
|
@ -1933,6 +1933,23 @@ SELECT SCHEMA_NAME from information_schema.schemata where schema_name=REPEAT('a'
|
||||
replace_regex /at least \d+ rows/at least ### rows/;
|
||||
SELECT * FROM INFORMATION_SCHEMA.`COLUMNS` LIMIT ROWS EXAMINED 10;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24179: AAssertion `m_status == DA_ERROR || m_status == DA_OK ||
|
||||
--echo # m_status == DA_OK_BULK' failed in Diagnostics_area::message()
|
||||
--echo #
|
||||
|
||||
call mtr.add_suppression("Sort aborted.*");
|
||||
|
||||
DROP DATABASE test;
|
||||
CREATE DATABASE test;
|
||||
USE test;
|
||||
CREATE VIEW v AS SELECT table_schema AS object_schema, table_name AS object_name, table_type AS object_type FROM information_schema.tables ORDER BY object_schema;
|
||||
|
||||
--error ER_FILSORT_ABORT
|
||||
SELECT * FROM v LIMIT ROWS EXAMINED 9;
|
||||
|
||||
DROP VIEW v;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 Test
|
||||
--echo #
|
||||
|
@ -413,3 +413,8 @@ ALTER TABLE t2 DROP c;
|
||||
UNLOCK TABLES;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# KILL QUERY ID USER
|
||||
#
|
||||
kill query id user 'foo';
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''foo'' at line 1
|
||||
|
@ -664,3 +664,9 @@ ALTER TABLE t2 DROP c;
|
||||
UNLOCK TABLES;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # KILL QUERY ID USER
|
||||
--echo #
|
||||
--error ER_PARSE_ERROR
|
||||
kill query id user 'foo';
|
||||
|
@ -1989,7 +1989,7 @@ a b
|
||||
drop table t1;
|
||||
create table t1 (v varchar(65530), key(v));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
drop table t1;
|
||||
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
|
||||
create table t1 (v varchar(65536));
|
||||
|
@ -1695,7 +1695,7 @@ a b
|
||||
drop table t1;
|
||||
create table t1 (v varchar(65530), key(v));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
drop table if exists t1;
|
||||
set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for
|
||||
create table t1 (v varchar(65536));
|
||||
@ -1968,7 +1968,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1978,7 +1978,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a) key_block_size=1024);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1988,7 +1988,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -2034,7 +2034,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -2124,7 +2124,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -2154,7 +2154,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -2400,6 +2400,7 @@ Key Start Len Index Type
|
||||
1 2 30 multip. varchar
|
||||
2 33 30 multip. char NULL
|
||||
DROP TABLE t1;
|
||||
set statement sql_mode='' for
|
||||
create table t1 (n int not null, c char(1)) transactional=1;
|
||||
Warnings:
|
||||
Warning 1478 Table storage engine 'MyISAM' does not support the create option 'TRANSACTIONAL=1'
|
||||
|
@ -1549,6 +1549,7 @@ DROP TABLE t1;
|
||||
# MariaDB: Note that the table will still have 'TRANSACTIONAL=1' attribute.
|
||||
# That's the intended behavior atm.
|
||||
#
|
||||
set statement sql_mode='' for
|
||||
create table t1 (n int not null, c char(1)) transactional=1;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
@ -723,9 +723,9 @@ user CREATE TABLE `user` (
|
||||
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
|
||||
`password_last_changed` timestamp NULL DEFAULT NULL,
|
||||
`password_last_changed` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`password_lifetime` smallint(5) unsigned DEFAULT NULL,
|
||||
`account_locked` enum('N','Y') COLLATE utf8_bin NOT NULL DEFAULT 'N',
|
||||
`account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
PRIMARY KEY (`Host`,`User`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
|
||||
CREATE ROLE `aRole`;
|
||||
@ -738,6 +738,134 @@ mysql.session N
|
||||
root N
|
||||
mysql.sys N
|
||||
aRole Y
|
||||
DROP ROLE aRole;
|
||||
#
|
||||
# MDEV-24122: Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201
|
||||
#
|
||||
#
|
||||
DROP TABLE IF EXISTS mysql.user;
|
||||
FLUSH TABLES mysql.user;
|
||||
ALTER TABLE mysql.user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
||||
ALTER TABLE mysql.user ADD default_role char(80) binary DEFAULT '' NOT NULL;
|
||||
ALTER TABLE mysql.user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL;
|
||||
FLUSH PRIVILEGES;
|
||||
Phase 1/7: Checking and upgrading mysql database
|
||||
Processing databases
|
||||
mysql
|
||||
mysql.column_stats OK
|
||||
mysql.columns_priv OK
|
||||
mysql.db OK
|
||||
mysql.event OK
|
||||
mysql.func OK
|
||||
mysql.gtid_slave_pos OK
|
||||
mysql.help_category OK
|
||||
mysql.help_keyword OK
|
||||
mysql.help_relation OK
|
||||
mysql.help_topic OK
|
||||
mysql.host OK
|
||||
mysql.index_stats OK
|
||||
mysql.innodb_index_stats OK
|
||||
mysql.innodb_table_stats OK
|
||||
mysql.plugin OK
|
||||
mysql.proc OK
|
||||
mysql.procs_priv OK
|
||||
mysql.proxies_priv OK
|
||||
mysql.roles_mapping OK
|
||||
mysql.servers OK
|
||||
mysql.table_stats OK
|
||||
mysql.tables_priv OK
|
||||
mysql.time_zone OK
|
||||
mysql.time_zone_leap_second OK
|
||||
mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.transaction_registry OK
|
||||
mysql.user OK
|
||||
Phase 2/7: Installing used storage engines... Skipped
|
||||
Phase 3/7: Fixing views
|
||||
Phase 4/7: Running 'mysql_fix_privilege_tables'
|
||||
Phase 5/7: Fixing table and database names
|
||||
Phase 6/7: Checking and upgrading tables
|
||||
Processing databases
|
||||
information_schema
|
||||
mtr
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
performance_schema
|
||||
test
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
SHOW CREATE TABLE mysql.user;
|
||||
Table Create Table
|
||||
user CREATE TABLE `user` (
|
||||
`Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`User` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
|
||||
`Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Create_tablespace_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`Delete_history_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
|
||||
`ssl_cipher` blob NOT NULL,
|
||||
`x509_issuer` blob NOT NULL,
|
||||
`x509_subject` blob NOT NULL,
|
||||
`max_questions` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`max_updates` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`max_connections` int(11) unsigned NOT NULL DEFAULT 0,
|
||||
`max_user_connections` int(11) NOT NULL DEFAULT 0,
|
||||
`plugin` char(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
|
||||
`authentication_string` text COLLATE utf8_bin NOT NULL,
|
||||
`password_expired` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`is_role` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
`default_role` char(80) COLLATE utf8_bin NOT NULL DEFAULT '',
|
||||
`max_statement_time` decimal(12,6) NOT NULL DEFAULT 0.000000,
|
||||
`password_last_changed` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`password_lifetime` smallint(5) unsigned DEFAULT NULL,
|
||||
`account_locked` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
|
||||
PRIMARY KEY (`Host`,`User`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
|
||||
CREATE ROLE `aRole`;
|
||||
SET DEFAULT ROLE aRole;
|
||||
SHOW GRANTS;
|
||||
Grants for root@localhost
|
||||
GRANT `aRole` TO `root`@`localhost` WITH ADMIN OPTION
|
||||
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
||||
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
||||
GRANT USAGE ON *.* TO `aRole`
|
||||
SET DEFAULT ROLE aRole FOR 'root'@'localhost'
|
||||
SET DEFAULT ROLE NONE;
|
||||
SHOW GRANTS;
|
||||
Grants for root@localhost
|
||||
GRANT `aRole` TO `root`@`localhost` WITH ADMIN OPTION
|
||||
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
||||
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
||||
GRANT USAGE ON *.* TO `aRole`
|
||||
DROP ROLE `aRole`;
|
||||
FLUSH PRIVILEGES;
|
||||
End of 10.2 tests
|
||||
|
@ -246,6 +246,36 @@ FLUSH PRIVILEGES;
|
||||
SET ROLE `aRole`;
|
||||
SELECT `User`, `is_role` FROM `mysql`.`user`;
|
||||
|
||||
DROP ROLE aRole;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24122: Fix previously MySQL-5.7 data directories that upgraded prior to MDEV-23201
|
||||
--echo #
|
||||
--echo #
|
||||
|
||||
# For 10.4 merge - dropping the view.
|
||||
# DROP VIEW IF EXISTS mysql.user;
|
||||
DROP TABLE IF EXISTS mysql.user;
|
||||
--copy_file std_data/mysql57user.frm $MYSQLD_DATADIR/mysql/user.frm
|
||||
--copy_file std_data/mysql57user.MYI $MYSQLD_DATADIR/mysql/user.MYI
|
||||
--copy_file std_data/mysql57user.MYD $MYSQLD_DATADIR/mysql/user.MYD
|
||||
FLUSH TABLES mysql.user;
|
||||
|
||||
# What prior to MDEV-23201 would of done:
|
||||
ALTER TABLE mysql.user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
||||
ALTER TABLE mysql.user ADD default_role char(80) binary DEFAULT '' NOT NULL;
|
||||
ALTER TABLE mysql.user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL;
|
||||
FLUSH PRIVILEGES;
|
||||
|
||||
--exec $MYSQL_UPGRADE --force 2>&1
|
||||
SHOW CREATE TABLE mysql.user;
|
||||
|
||||
CREATE ROLE `aRole`;
|
||||
SET DEFAULT ROLE aRole;
|
||||
SHOW GRANTS;
|
||||
SET DEFAULT ROLE NONE;
|
||||
SHOW GRANTS;
|
||||
|
||||
DROP ROLE `aRole`;
|
||||
--exec $MYSQL mysql < $MYSQLTEST_VARDIR/tmp/user.sql
|
||||
FLUSH PRIVILEGES;
|
||||
|
File diff suppressed because one or more lines are too long
@ -5724,6 +5724,315 @@ DELIMITER ;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-20939: Race condition between mysqldump import and InnoDB
|
||||
# persistent statistics calculation
|
||||
#
|
||||
#
|
||||
# Without --replace and --insert-ignore
|
||||
#
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `innodb_index_stats` (
|
||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`stat_value` bigint(20) unsigned NOT NULL,
|
||||
`sample_size` bigint(20) unsigned DEFAULT NULL,
|
||||
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
|
||||
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
DROP TABLE IF EXISTS `innodb_table_stats`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `innodb_table_stats` (
|
||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`n_rows` bigint(20) unsigned NOT NULL,
|
||||
`clustered_index_size` bigint(20) unsigned NOT NULL,
|
||||
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`database_name`,`table_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `general_log` (
|
||||
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`command_type` varchar(64) NOT NULL,
|
||||
`argument` mediumtext NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `slow_log` (
|
||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`query_time` time(6) NOT NULL,
|
||||
`lock_time` time(6) NOT NULL,
|
||||
`rows_sent` int(11) NOT NULL,
|
||||
`rows_examined` int(11) NOT NULL,
|
||||
`db` varchar(512) NOT NULL,
|
||||
`last_insert_id` int(11) NOT NULL,
|
||||
`insert_id` int(11) NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`sql_text` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`rows_affected` int(11) NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||
`transaction_id` bigint(20) unsigned NOT NULL,
|
||||
`commit_id` bigint(20) unsigned NOT NULL,
|
||||
`begin_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`commit_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`isolation_level` enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') COLLATE utf8_bin NOT NULL,
|
||||
PRIMARY KEY (`transaction_id`),
|
||||
UNIQUE KEY `commit_id` (`commit_id`),
|
||||
KEY `begin_timestamp` (`begin_timestamp`),
|
||||
KEY `commit_timestamp` (`commit_timestamp`,`transaction_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
#
|
||||
# With --replace
|
||||
#
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `innodb_index_stats` (
|
||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`stat_value` bigint(20) unsigned NOT NULL,
|
||||
`sample_size` bigint(20) unsigned DEFAULT NULL,
|
||||
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
|
||||
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
LOCK TABLES `innodb_index_stats` WRITE;
|
||||
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE IF EXISTS `innodb_table_stats`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `innodb_table_stats` (
|
||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`n_rows` bigint(20) unsigned NOT NULL,
|
||||
`clustered_index_size` bigint(20) unsigned NOT NULL,
|
||||
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`database_name`,`table_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
LOCK TABLES `innodb_table_stats` WRITE;
|
||||
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `general_log` (
|
||||
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`command_type` varchar(64) NOT NULL,
|
||||
`argument` mediumtext NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `slow_log` (
|
||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`query_time` time(6) NOT NULL,
|
||||
`lock_time` time(6) NOT NULL,
|
||||
`rows_sent` int(11) NOT NULL,
|
||||
`rows_examined` int(11) NOT NULL,
|
||||
`db` varchar(512) NOT NULL,
|
||||
`last_insert_id` int(11) NOT NULL,
|
||||
`insert_id` int(11) NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`sql_text` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`rows_affected` int(11) NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||
`transaction_id` bigint(20) unsigned NOT NULL,
|
||||
`commit_id` bigint(20) unsigned NOT NULL,
|
||||
`begin_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`commit_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`isolation_level` enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') COLLATE utf8_bin NOT NULL,
|
||||
PRIMARY KEY (`transaction_id`),
|
||||
UNIQUE KEY `commit_id` (`commit_id`),
|
||||
KEY `begin_timestamp` (`begin_timestamp`),
|
||||
KEY `commit_timestamp` (`commit_timestamp`,`transaction_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
#
|
||||
# With --insert-ignore
|
||||
#
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8mb4 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `innodb_index_stats` (
|
||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||
`index_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`stat_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`stat_value` bigint(20) unsigned NOT NULL,
|
||||
`sample_size` bigint(20) unsigned DEFAULT NULL,
|
||||
`stat_description` varchar(1024) COLLATE utf8_bin NOT NULL,
|
||||
PRIMARY KEY (`database_name`,`table_name`,`index_name`,`stat_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
LOCK TABLES `innodb_index_stats` WRITE;
|
||||
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE IF EXISTS `innodb_table_stats`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `innodb_table_stats` (
|
||||
`database_name` varchar(64) COLLATE utf8_bin NOT NULL,
|
||||
`table_name` varchar(199) COLLATE utf8_bin NOT NULL,
|
||||
`last_update` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
||||
`n_rows` bigint(20) unsigned NOT NULL,
|
||||
`clustered_index_size` bigint(20) unsigned NOT NULL,
|
||||
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL,
|
||||
PRIMARY KEY (`database_name`,`table_name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
LOCK TABLES `innodb_table_stats` WRITE;
|
||||
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `general_log` (
|
||||
`event_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`command_type` varchar(64) NOT NULL,
|
||||
`argument` mediumtext NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='General log';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `slow_log` (
|
||||
`start_time` timestamp(6) NOT NULL DEFAULT current_timestamp(6) ON UPDATE current_timestamp(6),
|
||||
`user_host` mediumtext NOT NULL,
|
||||
`query_time` time(6) NOT NULL,
|
||||
`lock_time` time(6) NOT NULL,
|
||||
`rows_sent` int(11) NOT NULL,
|
||||
`rows_examined` int(11) NOT NULL,
|
||||
`db` varchar(512) NOT NULL,
|
||||
`last_insert_id` int(11) NOT NULL,
|
||||
`insert_id` int(11) NOT NULL,
|
||||
`server_id` int(10) unsigned NOT NULL,
|
||||
`sql_text` mediumtext NOT NULL,
|
||||
`thread_id` bigint(21) unsigned NOT NULL,
|
||||
`rows_affected` int(11) NOT NULL
|
||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE IF NOT EXISTS `transaction_registry` (
|
||||
`transaction_id` bigint(20) unsigned NOT NULL,
|
||||
`commit_id` bigint(20) unsigned NOT NULL,
|
||||
`begin_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`commit_timestamp` timestamp(6) NOT NULL DEFAULT '0000-00-00 00:00:00.000000',
|
||||
`isolation_level` enum('READ-UNCOMMITTED','READ-COMMITTED','REPEATABLE-READ','SERIALIZABLE') COLLATE utf8_bin NOT NULL,
|
||||
PRIMARY KEY (`transaction_id`),
|
||||
UNIQUE KEY `commit_id` (`commit_id`),
|
||||
KEY `begin_timestamp` (`begin_timestamp`),
|
||||
KEY `commit_timestamp` (`commit_timestamp`,`transaction_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
# End of 10.2 tests
|
||||
#
|
||||
# Test for Invisible columns
|
||||
|
@ -2747,6 +2747,29 @@ INSERT INTO t1 (a) VALUES (1),(2),(3);
|
||||
--exec $MYSQL_DUMP --default-character-set=utf8mb4 --triggers --no-data --no-create-info --add-drop-trigger --skip-comments --databases test
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-20939: Race condition between mysqldump import and InnoDB
|
||||
--echo # persistent statistics calculation
|
||||
--echo #
|
||||
|
||||
--let $ignore= --ignore-table=mysql.proxies_priv --ignore-table=mysql.user --ignore-table=mysql.column_stats --ignore-table=mysql.columns_priv --ignore-table=mysql.db --ignore-table=mysql.event --ignore-table=mysql.func --ignore-table=mysql.gtid_slave_pos --ignore-table=mysql.help_category --ignore-table=mysql.help_keyword --ignore-table=mysql.help_relation --ignore-table=mysql.help_topic --ignore-table=mysql.host --ignore-table=mysql.index_stats --ignore-table=mysql.plugin --ignore-table=mysql.proc --ignore-table=mysql.procs_priv --ignore-table=mysql.roles_mapping --ignore-table=mysql.servers --ignore-table=mysql.table_stats --ignore-table=mysql.tables_priv --ignore-table=mysql.time_zone --ignore-table=mysql.time_zone_leap_second --ignore-table=mysql.time_zone_name --ignore-table=mysql.time_zone_transition --ignore-table=mysql.time_zone_transition_type --ignore-table=mysql.general_log --ignore-table=mysql.slow_log
|
||||
--let $skip_opts= --skip-dump-date --skip-comments
|
||||
|
||||
--echo #
|
||||
--echo # Without --replace and --insert-ignore
|
||||
--echo #
|
||||
--exec $MYSQL_DUMP $ignore $skip_opts mysql
|
||||
|
||||
--echo #
|
||||
--echo # With --replace
|
||||
--echo #
|
||||
--exec $MYSQL_DUMP $ignore $skip_opts --replace mysql
|
||||
|
||||
--echo #
|
||||
--echo # With --insert-ignore
|
||||
--echo #
|
||||
--exec $MYSQL_DUMP $ignore $skip_opts --insert-ignore mysql
|
||||
|
||||
--echo # End of 10.2 tests
|
||||
|
||||
--echo #
|
||||
|
65
mysql-test/main/ps_show_log.result
Normal file
65
mysql-test/main/ps_show_log.result
Normal file
@ -0,0 +1,65 @@
|
||||
#
|
||||
# MDEV-24208 SHOW RELAYLOG EVENTS command is not supported in the prepared
|
||||
# statement protocol yet
|
||||
#
|
||||
CREATE USER u1;
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
connection master;
|
||||
CREATE TABLE t1(n INT);
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS';
|
||||
EXECUTE stmt_1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# # Format_desc # # #
|
||||
# # Gtid_list # # []
|
||||
# # Binlog_checkpoint # # #
|
||||
# # Gtid # # GTID 0-1-1
|
||||
# # Query # # use `test`; CREATE TABLE t1(n INT)
|
||||
# # Gtid # # GTID 0-1-2
|
||||
# # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
|
||||
# Execute the same prepared statement the second time to check that
|
||||
# no internal structures used for handling the statement
|
||||
# 'SHOW BINLOG EVENTS' were damaged.
|
||||
EXECUTE stmt_1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# # Format_desc # # #
|
||||
# # Gtid_list # # []
|
||||
# # Binlog_checkpoint # # #
|
||||
# # Gtid # # GTID 0-1-1
|
||||
# # Query # # use `test`; CREATE TABLE t1(n INT)
|
||||
# # Gtid # # GTID 0-1-2
|
||||
# # Query # # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */
|
||||
DEALLOCATE PREPARE stmt_1;
|
||||
connection slave;
|
||||
PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS';
|
||||
EXECUTE stmt_1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-relay-bin.000001 # Format_desc # # #
|
||||
slave-relay-bin.000001 # Rotate # # #
|
||||
# Execute the same prepared statement the second time to check that
|
||||
# no internal structures used for handling the statement
|
||||
# 'SHOW RELAYLOG EVENTS' were damaged.
|
||||
EXECUTE stmt_1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-relay-bin.000001 # Format_desc # # #
|
||||
slave-relay-bin.000001 # Rotate # # #
|
||||
DEALLOCATE PREPARE stmt_1;
|
||||
# Create the user u1 without the REPLICATION SLAVE privilege required
|
||||
# for running the statements SHOW BINLOG EVENTS/SHOW RELAYLOG EVENTS
|
||||
# and check that attempt to execute the statements SHOW BINLOG EVENTS/
|
||||
# SHOW RELAYLOG EVENTS as a prepred statements by a user without required
|
||||
# privileges results in error.
|
||||
connect con2,localhost,u1,,test;
|
||||
PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS';
|
||||
EXECUTE stmt_1;
|
||||
ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation
|
||||
PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS';
|
||||
EXECUTE stmt_1;
|
||||
ERROR 42000: Access denied; you need (at least one of) the REPLICATION SLAVE privilege(s) for this operation
|
||||
DEALLOCATE PREPARE stmt_1;
|
||||
include/rpl_end.inc
|
||||
connection default;
|
||||
DROP USER u1;
|
||||
# End of 10.2 tests
|
73
mysql-test/main/ps_show_log.test
Normal file
73
mysql-test/main/ps_show_log.test
Normal file
@ -0,0 +1,73 @@
|
||||
--echo #
|
||||
--echo # MDEV-24208 SHOW RELAYLOG EVENTS command is not supported in the prepared
|
||||
--echo # statement protocol yet
|
||||
--echo #
|
||||
|
||||
CREATE USER u1;
|
||||
|
||||
--source include/have_binlog_format_statement.inc
|
||||
--source include/master-slave.inc
|
||||
--connection master
|
||||
CREATE TABLE t1(n INT);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--sync_slave_with_master
|
||||
PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS';
|
||||
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-bin.*/#/
|
||||
EXECUTE stmt_1;
|
||||
|
||||
--echo # Execute the same prepared statement the second time to check that
|
||||
--echo # no internal structures used for handling the statement
|
||||
--echo # 'SHOW BINLOG EVENTS' were damaged.
|
||||
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-bin.*/#/
|
||||
EXECUTE stmt_1;
|
||||
|
||||
DEALLOCATE PREPARE stmt_1;
|
||||
|
||||
--connection slave
|
||||
PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS';
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-relay-bin.*;pos=.*/#/
|
||||
EXECUTE stmt_1;
|
||||
|
||||
--echo # Execute the same prepared statement the second time to check that
|
||||
--echo # no internal structures used for handling the statement
|
||||
--echo # 'SHOW RELAYLOG EVENTS' were damaged.
|
||||
|
||||
--replace_column 2 # 4 # 5 #
|
||||
--replace_regex /Server ver:.*Binlog ver: .*/#/ /slave-relay-bin.*;pos=.*/#/
|
||||
EXECUTE stmt_1;
|
||||
|
||||
DEALLOCATE PREPARE stmt_1;
|
||||
|
||||
--echo # Create the user u1 without the REPLICATION SLAVE privilege required
|
||||
--echo # for running the statements SHOW BINLOG EVENTS/SHOW RELAYLOG EVENTS
|
||||
--echo # and check that attempt to execute the statements SHOW BINLOG EVENTS/
|
||||
--echo # SHOW RELAYLOG EVENTS as a prepred statements by a user without required
|
||||
--echo # privileges results in error.
|
||||
|
||||
--connect (con2,localhost,u1,,test)
|
||||
PREPARE stmt_1 FROM 'SHOW BINLOG EVENTS';
|
||||
|
||||
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
||||
EXECUTE stmt_1;
|
||||
|
||||
PREPARE stmt_1 FROM 'SHOW RELAYLOG EVENTS';
|
||||
|
||||
--error ER_SPECIFIC_ACCESS_DENIED_ERROR
|
||||
EXECUTE stmt_1;
|
||||
|
||||
DEALLOCATE PREPARE stmt_1;
|
||||
|
||||
--source include/rpl_end.inc
|
||||
|
||||
--connection default
|
||||
# Clean up
|
||||
DROP USER u1;
|
||||
|
||||
--echo # End of 10.2 tests
|
@ -3163,5 +3163,22 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR
|
||||
id a b code num
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value
|
||||
#
|
||||
create table t1 (pk int, i int, v int, primary key (pk), key(v));
|
||||
insert into t1 (pk,i,v) values (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,5,10),(6,6,12),(7,7,14),(8,8,16);
|
||||
create table t2 (a int, b int);
|
||||
insert into t2 values (1,2),(2,4);
|
||||
EXPLAIN
|
||||
select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t1 ALL PRIMARY,v NULL NULL NULL 8 Range checked for each record (index map: 0x3)
|
||||
select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
|
||||
pk i v a b
|
||||
1 1 2 1 2
|
||||
2 2 4 2 4
|
||||
drop table t1, t2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@ -2189,6 +2189,20 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value
|
||||
--echo #
|
||||
|
||||
create table t1 (pk int, i int, v int, primary key (pk), key(v));
|
||||
insert into t1 (pk,i,v) values (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,5,10),(6,6,12),(7,7,14),(8,8,16);
|
||||
create table t2 (a int, b int);
|
||||
insert into t2 values (1,2),(2,4);
|
||||
EXPLAIN
|
||||
select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
|
||||
select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
|
||||
drop table t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
@ -3175,6 +3175,23 @@ SELECT * FROM t1 JOIN t2 ON (t2.code = t1.b) WHERE t1.a NOT IN ('baz', 'qux') OR
|
||||
id a b code num
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# MDEV-22251: get_key_scans_params: Conditional jump or move depends on uninitialised value
|
||||
#
|
||||
create table t1 (pk int, i int, v int, primary key (pk), key(v));
|
||||
insert into t1 (pk,i,v) values (1,1,2),(2,2,4),(3,3,6),(4,4,8),(5,5,10),(6,6,12),(7,7,14),(8,8,16);
|
||||
create table t2 (a int, b int);
|
||||
insert into t2 values (1,2),(2,4);
|
||||
EXPLAIN
|
||||
select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE t1 ALL PRIMARY,v NULL NULL NULL 8 Range checked for each record (index map: 0x3)
|
||||
select * from t1 inner join t2 on ( t2.b = t1.v or t2.a = t1.pk);
|
||||
pk i v a b
|
||||
1 1 2 1 2
|
||||
2 2 4 2 4
|
||||
drop table t1, t2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
set optimizer_switch=@mrr_icp_extra_tmp;
|
||||
|
@ -1,14 +1,4 @@
|
||||
use test;
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP VIEW IF EXISTS v2;
|
||||
DROP VIEW IF EXISTS v3;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP PROCEDURE IF EXISTS p3;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
DROP FUNCTION IF EXISTS f2;
|
||||
DROP FUNCTION IF EXISTS f3;
|
||||
CREATE TABLE t1(c INT);
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1
|
||||
FOR EACH ROW
|
||||
@ -58,10 +48,16 @@ DROP PROCEDURE p3;
|
||||
DROP FUNCTION f1;
|
||||
DROP FUNCTION f2;
|
||||
DROP FUNCTION f3;
|
||||
#
|
||||
# Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
|
||||
#
|
||||
set global event_scheduler=1;
|
||||
Warnings:
|
||||
Note 1408 Event Scheduler: Loaded 0 events
|
||||
set global event_scheduler=0;
|
||||
#
|
||||
# Bug#26285 Selecting information_schema crahes server
|
||||
#
|
||||
select count(*) from information_schema.COLUMN_PRIVILEGES;
|
||||
count(*)
|
||||
0
|
||||
@ -74,14 +70,21 @@ count(*)
|
||||
select count(*) from information_schema.USER_PRIVILEGES;
|
||||
count(*)
|
||||
0
|
||||
End of 5.0 tests
|
||||
#
|
||||
# End of 5.0 tests
|
||||
#
|
||||
#
|
||||
# Bug#29817 Queries with UDF fail with non-descriptive error
|
||||
# if mysql.proc is missing
|
||||
#
|
||||
select no_such_function(1);
|
||||
ERROR 42000: FUNCTION test.no_such_function does not exist
|
||||
End of 5.1 tests
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8280 crash in 'show global status' with --skip-grant-tables
|
||||
#
|
||||
show global status like 'Acl%';
|
||||
Variable_name Value
|
||||
Acl_column_grants 0
|
||||
@ -95,3 +98,14 @@ Acl_role_grants 0
|
||||
Acl_roles 0
|
||||
Acl_table_grants 0
|
||||
Acl_users 0
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-22966 Server crashes or hangs with SET ROLE when started with skip-grant-tables
|
||||
#
|
||||
set role x;
|
||||
ERROR HY000: The MariaDB server is running with the --skip-grant-tables option so it cannot execute this statement
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@ -17,24 +17,6 @@ use test;
|
||||
|
||||
# Prepare.
|
||||
|
||||
--disable_warnings
|
||||
|
||||
DROP VIEW IF EXISTS v1;
|
||||
DROP VIEW IF EXISTS v2;
|
||||
DROP VIEW IF EXISTS v3;
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP PROCEDURE IF EXISTS p3;
|
||||
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
DROP FUNCTION IF EXISTS f2;
|
||||
DROP FUNCTION IF EXISTS f3;
|
||||
|
||||
--enable_warnings
|
||||
|
||||
# Test case.
|
||||
|
||||
CREATE TABLE t1(c INT);
|
||||
@ -109,20 +91,23 @@ DROP FUNCTION f1;
|
||||
DROP FUNCTION f2;
|
||||
DROP FUNCTION f3;
|
||||
|
||||
#
|
||||
# Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug #26807 "set global event_scheduler=1" and --skip-grant-tables crashes server
|
||||
--echo #
|
||||
set global event_scheduler=1;
|
||||
set global event_scheduler=0;
|
||||
|
||||
#
|
||||
# Bug#26285 Selecting information_schema crahes server
|
||||
#
|
||||
--echo #
|
||||
--echo # Bug#26285 Selecting information_schema crahes server
|
||||
--echo #
|
||||
select count(*) from information_schema.COLUMN_PRIVILEGES;
|
||||
select count(*) from information_schema.SCHEMA_PRIVILEGES;
|
||||
select count(*) from information_schema.TABLE_PRIVILEGES;
|
||||
select count(*) from information_schema.USER_PRIVILEGES;
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # End of 5.0 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # Bug#29817 Queries with UDF fail with non-descriptive error
|
||||
@ -131,9 +116,26 @@ select count(*) from information_schema.USER_PRIVILEGES;
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
select no_such_function(1);
|
||||
|
||||
--echo End of 5.1 tests
|
||||
--echo #
|
||||
--echo # End of 5.1 tests
|
||||
--echo #
|
||||
|
||||
#
|
||||
# MDEV-8280 crash in 'show global status' with --skip-grant-tables
|
||||
#
|
||||
--echo #
|
||||
--echo # MDEV-8280 crash in 'show global status' with --skip-grant-tables
|
||||
--echo #
|
||||
show global status like 'Acl%';
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-22966 Server crashes or hangs with SET ROLE when started with skip-grant-tables
|
||||
--echo #
|
||||
|
||||
--error ER_OPTION_PREVENTS_STATEMENT
|
||||
set role x;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
@ -100,20 +100,20 @@ RETURNS VARCHAR(64) CHARACTER SET ucs2
|
||||
BEGIN
|
||||
RETURN 'str';
|
||||
END|
|
||||
ERROR 42000: COLLATION 'ucs2_unicode_ci' is not valid for CHARACTER SET 'latin1'
|
||||
DROP FUNCTION f|
|
||||
CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2)
|
||||
RETURNS VARCHAR(64) COLLATE ucs2_unicode_ci
|
||||
BEGIN
|
||||
RETURN 'str';
|
||||
END|
|
||||
ERROR 42000: COLLATION 'ucs2_unicode_ci' is not valid for CHARACTER SET 'latin1'
|
||||
DROP FUNCTION f|
|
||||
CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2)
|
||||
RETURNS VARCHAR(64) CHARACTER SET ucs2
|
||||
BEGIN
|
||||
DECLARE f2 VARCHAR(64) COLLATE ucs2_unicode_ci;
|
||||
RETURN 'str';
|
||||
END|
|
||||
ERROR 42000: COLLATION 'ucs2_unicode_ci' is not valid for CHARACTER SET 'latin1'
|
||||
DROP FUNCTION f|
|
||||
SET NAMES utf8;
|
||||
CREATE FUNCTION bug48766 ()
|
||||
RETURNS ENUM( 'w' ) CHARACTER SET ucs2
|
||||
|
@ -114,35 +114,35 @@ DROP FUNCTION f1|
|
||||
#
|
||||
# COLLATE with no CHARACTER SET in IN param
|
||||
#
|
||||
--error ER_COLLATION_CHARSET_MISMATCH
|
||||
CREATE FUNCTION f(f1 VARCHAR(64) COLLATE ucs2_unicode_ci)
|
||||
RETURNS VARCHAR(64) CHARACTER SET ucs2
|
||||
BEGIN
|
||||
RETURN 'str';
|
||||
END|
|
||||
DROP FUNCTION f|
|
||||
|
||||
|
||||
#
|
||||
# COLLATE with no CHARACTER SET in RETURNS
|
||||
#
|
||||
--error ER_COLLATION_CHARSET_MISMATCH
|
||||
CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2)
|
||||
RETURNS VARCHAR(64) COLLATE ucs2_unicode_ci
|
||||
BEGIN
|
||||
RETURN 'str';
|
||||
END|
|
||||
DROP FUNCTION f|
|
||||
|
||||
|
||||
#
|
||||
# COLLATE with no CHARACTER SET in DECLARE
|
||||
#
|
||||
--error ER_COLLATION_CHARSET_MISMATCH
|
||||
CREATE FUNCTION f(f1 VARCHAR(64) CHARACTER SET ucs2)
|
||||
RETURNS VARCHAR(64) CHARACTER SET ucs2
|
||||
BEGIN
|
||||
DECLARE f2 VARCHAR(64) COLLATE ucs2_unicode_ci;
|
||||
RETURN 'str';
|
||||
END|
|
||||
DROP FUNCTION f|
|
||||
|
||||
|
||||
delimiter ;|
|
||||
|
@ -825,5 +825,19 @@ length(a)
|
||||
set names latin1;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-23753: SIGSEGV in Column_stat::store_stat_fields
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT) PARTITION BY HASH (b) PARTITIONS 2;
|
||||
LOCK TABLES t1 WRITE;
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a) INDEXES ();
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (nonexisting) INDEXES (nonexisting);
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze error Invalid argument
|
||||
DROP TABLE t1;
|
||||
# please keep this at the last
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
|
@ -1,4 +1,5 @@
|
||||
--source include/have_stat_tables.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
select @@global.use_stat_tables;
|
||||
select @@session.use_stat_tables;
|
||||
@ -568,5 +569,16 @@ set names latin1;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-23753: SIGSEGV in Column_stat::store_stat_fields
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT, b INT) PARTITION BY HASH (b) PARTITIONS 2;
|
||||
LOCK TABLES t1 WRITE;
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a) INDEXES ();
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (nonexisting) INDEXES (nonexisting);
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo # please keep this at the last
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
|
@ -852,6 +852,20 @@ length(a)
|
||||
set names latin1;
|
||||
set @@use_stat_tables=@save_use_stat_tables;
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-23753: SIGSEGV in Column_stat::store_stat_fields
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT) PARTITION BY HASH (b) PARTITIONS 2;
|
||||
LOCK TABLES t1 WRITE;
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (a) INDEXES ();
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze status OK
|
||||
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS (nonexisting) INDEXES (nonexisting);
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 analyze status Engine-independent statistics collected
|
||||
test.t1 analyze error Invalid argument
|
||||
DROP TABLE t1;
|
||||
# please keep this at the last
|
||||
set @@global.histogram_size=@save_histogram_size;
|
||||
set optimizer_switch=@save_optimizer_switch_for_stat_tables_test;
|
||||
|
@ -544,7 +544,7 @@ drop table t0,t1,t2,t3,t4,t5,t6;
|
||||
CREATE TABLE t1 (f1 int(11), PRIMARY KEY (f1)) ;
|
||||
CREATE TABLE t2 (f4 varchar(1024), KEY (f4)) ;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT IGNORE INTO t2 VALUES ('xcddwntkbxyorzdv'),
|
||||
('cnxxcddwntkbxyor'),('r'),('r'), ('did'),('I'),('when'),
|
||||
('hczkfqjeggivdvac'),('e'),('okay'),('up');
|
||||
|
@ -186,3 +186,30 @@ connection default;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop table t1;
|
||||
set global max_user_connections= @my_max_user_connections;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-17852 Altered connection limits for user have no effect
|
||||
#
|
||||
create user foo@'%' with max_user_connections 1;
|
||||
connect con1,localhost,foo;
|
||||
select current_user();
|
||||
current_user()
|
||||
foo@%
|
||||
connect(localhost,foo,,test,MYSQL_PORT,MYSQL_SOCK);
|
||||
connect con2,localhost,foo;
|
||||
ERROR 42000: User 'foo' has exceeded the 'max_user_connections' resource (current value: 1)
|
||||
connection default;
|
||||
alter user foo with max_user_connections 2;
|
||||
connect con3,localhost,foo;
|
||||
select current_user();
|
||||
current_user()
|
||||
foo@%
|
||||
disconnect con3;
|
||||
disconnect con1;
|
||||
connection default;
|
||||
drop user foo@'%';
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
|
@ -216,3 +216,29 @@ drop table t1;
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
set global max_user_connections= @my_max_user_connections;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.1 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-17852 Altered connection limits for user have no effect
|
||||
--echo #
|
||||
create user foo@'%' with max_user_connections 1;
|
||||
--connect con1,localhost,foo
|
||||
select current_user();
|
||||
--replace_result $MASTER_MYPORT MYSQL_PORT $MASTER_MYSOCK MYSQL_SOCK
|
||||
--error ER_USER_LIMIT_REACHED
|
||||
--connect con2,localhost,foo
|
||||
--connection default
|
||||
alter user foo with max_user_connections 2;
|
||||
--connect con3,localhost,foo
|
||||
select current_user();
|
||||
--disconnect con3
|
||||
--disconnect con1
|
||||
--connection default
|
||||
drop user foo@'%';
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
@ -6746,6 +6746,22 @@ drop database db1;
|
||||
create database test;
|
||||
use test;
|
||||
#
|
||||
# MDEV-16940: update of multi-table view returning error used in SP
|
||||
#
|
||||
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (2), (3);
|
||||
CREATE VIEW v1 AS SELECT a, b FROM t1,t2;
|
||||
CREATE PROCEDURE sp1() UPDATE v1 SET a = 8, b = 9;
|
||||
CALL sp1;
|
||||
ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
|
||||
CALL sp1;
|
||||
ERROR HY000: Can not modify more than one base table through a join view 'test.v1'
|
||||
DROP PROCEDURE sp1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 10.2 tests
|
||||
#
|
||||
#
|
||||
|
@ -6461,6 +6461,28 @@ drop database db1;
|
||||
create database test;
|
||||
use test;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16940: update of multi-table view returning error used in SP
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
CREATE TABLE t2 (b INT) ENGINE=MyISAM;
|
||||
INSERT INTO t2 VALUES (2), (3);
|
||||
|
||||
CREATE VIEW v1 AS SELECT a, b FROM t1,t2;
|
||||
|
||||
CREATE PROCEDURE sp1() UPDATE v1 SET a = 8, b = 9;
|
||||
|
||||
--error ER_VIEW_MULTIUPDATE
|
||||
CALL sp1;
|
||||
--error ER_VIEW_MULTIUPDATE
|
||||
CALL sp1;
|
||||
|
||||
DROP PROCEDURE sp1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.2 tests
|
||||
--echo #
|
||||
|
@ -1329,7 +1329,7 @@ sub command_line_setup {
|
||||
'rr' => \$opt_rr,
|
||||
'rr-arg=s' => \@rr_record_args,
|
||||
'rr-dir=s' => \$opt_rr_dir,
|
||||
'client-gdb' => \$opt_client_gdb,
|
||||
'client-gdb=s' => \$opt_client_gdb,
|
||||
'manual-gdb' => \$opt_manual_gdb,
|
||||
'manual-lldb' => \$opt_manual_lldb,
|
||||
'boot-gdb' => \$opt_boot_gdb,
|
||||
@ -1427,7 +1427,7 @@ sub command_line_setup {
|
||||
);
|
||||
|
||||
# fix options (that take an optional argument and *only* after = sign
|
||||
my %fixopt = ( '--gdb' => '--gdb=#' );
|
||||
my %fixopt = ( '--gdb' => '--gdb=#', '--client-gdb' => '--client-gdb=#' );
|
||||
@ARGV = map { $fixopt{$_} or $_ } @ARGV;
|
||||
GetOptions(%options) or usage("Can't read options");
|
||||
usage("") if $opt_usage;
|
||||
@ -6081,7 +6081,11 @@ sub gdb_arguments {
|
||||
$input = $input ? "< $input" : "";
|
||||
|
||||
if ($type eq 'client') {
|
||||
mtr_tofile($gdb_init_file, "set args @$$args $input");
|
||||
mtr_tofile($gdb_init_file,
|
||||
join("\n",
|
||||
"set args @$$args $input",
|
||||
split /;/, $opt_client_gdb || ""
|
||||
));
|
||||
} elsif ($opt_valgrind_mysqld) {
|
||||
my $v = $$exe;
|
||||
my $vargs = [];
|
||||
|
@ -180,12 +180,11 @@ connection default;
|
||||
# commit checkpoint, otherwise we get nondeterministic results.
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
|
||||
|
||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
||||
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
||||
connection con12;
|
||||
reap;
|
||||
connection default;
|
||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
|
||||
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
||||
|
@ -148,10 +148,10 @@ connection con10;
|
||||
connection default;
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
|
||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
||||
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
||||
connection con12;
|
||||
connection default;
|
||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
||||
connection con11;
|
||||
|
@ -153,10 +153,10 @@ connection con10;
|
||||
connection default;
|
||||
SET @old_dbug= @@global.DEBUG_DBUG;
|
||||
SET GLOBAL debug_dbug="+d,binlog_background_checkpoint_processed";
|
||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
||||
SET DEBUG_SYNC= "now SIGNAL con12_cont";
|
||||
connection con12;
|
||||
connection default;
|
||||
SET DEBUG_SYNC= "now WAIT_FOR binlog_background_checkpoint_processed";
|
||||
SET GLOBAL debug_dbug= @old_dbug;
|
||||
SET DEBUG_SYNC= "now SIGNAL con11_cont";
|
||||
connection con11;
|
||||
|
@ -15,9 +15,12 @@ MW-328A : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600
|
||||
MW-328B : MDEV-22666 galera.MW-328A MTR failed: "Semaphore wait has lasted > 600 seconds" and do not release port 16002
|
||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
|
||||
galera_bf_lock_wait : MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_owned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex<GenericPolicy>
|
||||
galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
|
||||
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
|
||||
galera_mdl_race : MDEV-21524: galera.galera_mdl_race MTR failed: query 'reap' succeeded - should have failed with errno 1213
|
||||
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
|
||||
galera_partition : MDEV-21806: galera.galera_partition MTR failed: failed to recover from DONOR state
|
||||
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
|
||||
galera_ssl_upgrade : MDEV-19950 Galera test failure on galera_ssl_upgrade
|
||||
galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encrypt_with_key
|
||||
@ -26,4 +29,4 @@ galera_wan : MDEV-17259 Test failure on galera.galera_wan
|
||||
partition : MDEV-19958 Galera test failure on galera.partition
|
||||
query_cache: MDEV-15805 Test failure on galera.query_cache
|
||||
sql_log_bin : MDEV-21491 galera.sql_log_bin
|
||||
MW-328A : MDEV-22666?
|
||||
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
|
||||
|
89
mysql-test/suite/galera/r/galera_UK_conflict.result
Normal file
89
mysql-test/suite/galera/r/galera_UK_conflict.result
Normal file
@ -0,0 +1,89 @@
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
|
||||
INSERT INTO t1 VALUES (1, 1, 0);
|
||||
INSERT INTO t1 VALUES (3, 3, 0);
|
||||
INSERT INTO t1 VALUES (10, 10, 0);
|
||||
SET GLOBAL wsrep_slave_threads = 3;
|
||||
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
|
||||
connection node_1;
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
START TRANSACTION;
|
||||
DELETE FROM t1 WHERE f2 = 3;
|
||||
INSERT INTO t1 VALUES (3, 3, 1);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (5, 5, 2);
|
||||
connection node_1a;
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (4, 4, 2);
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL DEBUG_DBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
SET debug_sync='RESET';
|
||||
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
|
||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL DEBUG_DBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
SET debug_sync='RESET';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f3
|
||||
1 1 0
|
||||
3 3 1
|
||||
4 4 2
|
||||
5 5 2
|
||||
10 10 0
|
||||
wsrep_local_replays
|
||||
1
|
||||
SET GLOBAL wsrep_slave_threads = DEFAULT;
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f3
|
||||
1 1 0
|
||||
3 3 1
|
||||
4 4 2
|
||||
5 5 2
|
||||
10 10 0
|
||||
INSERT INTO t1 VALUES (7,7,7);
|
||||
INSERT INTO t1 VALUES (8,8,8);
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f3
|
||||
1 1 0
|
||||
3 3 1
|
||||
4 4 2
|
||||
5 5 2
|
||||
7 7 7
|
||||
8 8 8
|
||||
10 10 0
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1 f2 f3
|
||||
1 1 0
|
||||
3 3 1
|
||||
4 4 2
|
||||
5 5 2
|
||||
7 7 7
|
||||
10 10 0
|
||||
DROP TABLE t1;
|
@ -2,7 +2,6 @@
|
||||
# test phase with cascading foreign key through 3 tables
|
||||
#
|
||||
connection node_1;
|
||||
set wsrep_sync_wait=0;
|
||||
CREATE TABLE grandparent (
|
||||
id INT NOT NULL PRIMARY KEY
|
||||
) ENGINE=InnoDB;
|
||||
@ -24,15 +23,26 @@ INSERT INTO grandparent VALUES (1),(2);
|
||||
INSERT INTO parent VALUES (1,1), (2,2);
|
||||
INSERT INTO child VALUES (1,1), (2,2);
|
||||
connection node_2;
|
||||
set wsrep_sync_wait=0;
|
||||
DELETE FROM grandparent WHERE id = 1;
|
||||
SELECT * FROM grandparent;
|
||||
id
|
||||
2
|
||||
SELECT * FROM parent;
|
||||
id grandparent_id
|
||||
2 2
|
||||
SELECT * FROM child;
|
||||
id parent_id
|
||||
2 2
|
||||
connection node_1;
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM parent WHERE grandparent_id = 1;
|
||||
COUNT(*) COUNT(*) = 0
|
||||
0 1
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM child WHERE parent_id = 1;
|
||||
COUNT(*) COUNT(*) = 0
|
||||
0 1
|
||||
SELECT * FROM grandparent;
|
||||
id
|
||||
2
|
||||
SELECT * FROM parent;
|
||||
id grandparent_id
|
||||
2 2
|
||||
SELECT * FROM child;
|
||||
id parent_id
|
||||
2 2
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
DROP TABLE grandparent;
|
||||
|
@ -18,12 +18,10 @@ INSERT INTO child VALUES (1,'row one'), (2,'row two');
|
||||
connection node_2;
|
||||
DELETE FROM parent;
|
||||
connection node_1;
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM parent;
|
||||
COUNT(*) COUNT(*) = 0
|
||||
0 1
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM child;
|
||||
COUNT(*) COUNT(*) = 0
|
||||
0 1
|
||||
SELECT * FROM parent;
|
||||
id
|
||||
SELECT * FROM child;
|
||||
id parent_id
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
#
|
||||
@ -44,6 +42,7 @@ ON DELETE CASCADE
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO parent VALUES (1);
|
||||
INSERT INTO child VALUES (1,0,1);
|
||||
connection node_2;
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
||||
connection node_2;
|
||||
@ -57,11 +56,9 @@ SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET GLOBAL debug_dbug = "";
|
||||
SET DEBUG_SYNC = "RESET";
|
||||
connection node_1;
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM parent;
|
||||
COUNT(*) COUNT(*) = 0
|
||||
0 1
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM child;
|
||||
COUNT(*) COUNT(*) = 0
|
||||
0 1
|
||||
SELECT * FROM parent;
|
||||
id
|
||||
SELECT * FROM child;
|
||||
id j parent_id
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
|
@ -1,6 +1,3 @@
|
||||
#
|
||||
# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
|
||||
#
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
********
|
||||
@ -8,5 +5,14 @@ SET @@global.wsrep_sst_auth='foo:bar';
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
********
|
||||
disconnect node_2;
|
||||
disconnect node_1;
|
||||
connection node_2;
|
||||
SET @@global.wsrep_sst_auth= 'abcdefghijklmnopqrstuvwxyz';
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
********
|
||||
Shutdown node_2
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
********
|
||||
|
@ -3,32 +3,34 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SET session wsrep_sync_wait=0;
|
||||
FLUSH TABLE WITH READ LOCK;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
connection node_1;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
INSERT INTO t1 VALUES (2,3);
|
||||
connection node_2a;
|
||||
SET session wsrep_sync_wait=0;
|
||||
# node_1 DDL should not yet be applied
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2';
|
||||
FLUSH TABLES t1 WITH READ LOCK;;
|
||||
connection node_2;
|
||||
SET debug_sync='now WAIT_FOR parked2';
|
||||
SET debug_sync='now SIGNAL go2';
|
||||
UNLOCK TABLES;
|
||||
# node_1 DDL should not yet be applied 2
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
set debug_sync= 'RESET';
|
||||
connection node_2a;
|
||||
UNLOCK TABLES;
|
||||
# node_1 DDL should be applied 2
|
||||
SET SESSION wsrep_sync_wait = DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
148
mysql-test/suite/galera/t/galera_UK_conflict.test
Normal file
148
mysql-test/suite/galera/t/galera_UK_conflict.test
Normal file
@ -0,0 +1,148 @@
|
||||
#
|
||||
# This test tests the operation of transaction replay with a scenario
|
||||
# where two subsequent write sets in applying conflict with local transaction
|
||||
# in commit phase. The conflict is "false positive" confict on GAP lock in
|
||||
# secondary unique index.
|
||||
# The first applier will cause BF abort for the local committer, which
|
||||
# starts replaying because of positive certification.
|
||||
# In buggy version, scenatio continues so that ehile the local transaction
|
||||
# is replaying, the latter applier experiences similar UK GAP lock conflict
|
||||
# and forces the replayer to abort second time.
|
||||
# In fixed version, this latter BF abort should not happen.
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/galera_have_debug_sync.inc
|
||||
|
||||
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
|
||||
INSERT INTO t1 VALUES (1, 1, 0);
|
||||
INSERT INTO t1 VALUES (3, 3, 0);
|
||||
INSERT INTO t1 VALUES (10, 10, 0);
|
||||
|
||||
# we will need 2 appliers threads for applyin two write sets in parallel in node1
|
||||
# and 1 applier thread for handling replaying
|
||||
SET GLOBAL wsrep_slave_threads = 3;
|
||||
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
|
||||
|
||||
--connection node_1
|
||||
# starting a transaction, which deletes and inserts the middle row in test table
|
||||
# this will be victim of false positive conflict with appliers
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
START TRANSACTION;
|
||||
|
||||
DELETE FROM t1 WHERE f2 = 3;
|
||||
INSERT INTO t1 VALUES (3, 3, 1);
|
||||
|
||||
# Control connection to manage sync points for appliers
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--connection node_1a
|
||||
SET SESSION wsrep_sync_wait=0;
|
||||
|
||||
# send from node 2 first INSERT transaction, which will conflict on GAP lock in node 1
|
||||
--connection node_2
|
||||
INSERT INTO t1 VALUES (5, 5, 2);
|
||||
|
||||
--connection node_1a
|
||||
# wait to see the INSERT in apply_cb sync point
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
|
||||
# first applier seen in wait point, set sync point for the second INSERT
|
||||
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||
--source include/galera_set_sync_point.inc
|
||||
|
||||
--connection node_2
|
||||
# send second insert into same GAP in test table
|
||||
INSERT INTO t1 VALUES (4, 4, 2);
|
||||
|
||||
--connection node_1a
|
||||
# wait for the second insert to arrive in his sync point
|
||||
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||
--source include/galera_wait_sync_point.inc
|
||||
--source include/galera_clear_sync_point.inc
|
||||
|
||||
# both appliers are now waiting in separate sync points
|
||||
|
||||
# Block the local commit, send the COMMIT and wait until it gets blocked
|
||||
--let $galera_sync_point = commit_monitor_enter_sync
|
||||
--source include/galera_set_sync_point.inc
|
||||
|
||||
--connection node_1
|
||||
--send COMMIT
|
||||
|
||||
--connection node_1a
|
||||
# wait for the local commit to enter in commit monitor wait state
|
||||
--let $galera_sync_point = apply_monitor_slave_enter_sync commit_monitor_enter_sync
|
||||
--source include/galera_wait_sync_point.inc
|
||||
--source include/galera_clear_sync_point.inc
|
||||
|
||||
# release the local transaction to continue with commit
|
||||
--let $galera_sync_point = commit_monitor_enter_sync
|
||||
--source include/galera_signal_sync_point.inc
|
||||
--source include/galera_clear_sync_point.inc
|
||||
|
||||
# and now release the first applier, it should force local trx to abort
|
||||
SET GLOBAL DEBUG_DBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
SET debug_sync='RESET';
|
||||
|
||||
# set another sync point for second applier
|
||||
SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
|
||||
|
||||
# letting the second appier to move forward
|
||||
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||
--source include/galera_signal_sync_point.inc
|
||||
|
||||
# waiting until second applier is in wait
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
|
||||
# stopping second applier before commit
|
||||
--let $galera_sync_point = commit_monitor_enter_sync
|
||||
--source include/galera_set_sync_point.inc
|
||||
--source include/galera_clear_sync_point.inc
|
||||
|
||||
# releasing the second insert, with buggy version it will conflict with
|
||||
# replayer
|
||||
SET GLOBAL DEBUG_DBUG = "";
|
||||
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
SET debug_sync='RESET';
|
||||
|
||||
# with fixed version, second applier has reached commit monitor, and we can
|
||||
# release it to complete
|
||||
--let $galera_sync_point = commit_monitor_enter_sync
|
||||
--source include/galera_signal_sync_point.inc
|
||||
--source include/galera_clear_sync_point.inc
|
||||
|
||||
# local commit should succeed
|
||||
--connection node_1
|
||||
--reap
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
# wsrep_local_replays has increased by 1
|
||||
--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
|
||||
--disable_query_log
|
||||
--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old = 1 AS wsrep_local_replays;
|
||||
--enable_query_log
|
||||
|
||||
# returning original slave thread count
|
||||
SET GLOBAL wsrep_slave_threads = DEFAULT;
|
||||
|
||||
--connection node_2
|
||||
SELECT * FROM t1;
|
||||
|
||||
# replicate some transactions, so that wsrep slave thread count can reach
|
||||
# original state in node 1
|
||||
INSERT INTO t1 VALUES (7,7,7);
|
||||
INSERT INTO t1 VALUES (8,8,8);
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connection node_1
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
@ -9,7 +9,6 @@
|
||||
--echo #
|
||||
|
||||
--connection node_1
|
||||
set wsrep_sync_wait=0;
|
||||
|
||||
CREATE TABLE grandparent (
|
||||
id INT NOT NULL PRIMARY KEY
|
||||
@ -36,8 +35,12 @@ INSERT INTO parent VALUES (1,1), (2,2);
|
||||
INSERT INTO child VALUES (1,1), (2,2);
|
||||
|
||||
--connection node_2
|
||||
set wsrep_sync_wait=0;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'grandparent'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'parent'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'child'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM parent;
|
||||
@ -46,6 +49,10 @@ set wsrep_sync_wait=0;
|
||||
--source include/wait_condition.inc
|
||||
DELETE FROM grandparent WHERE id = 1;
|
||||
|
||||
SELECT * FROM grandparent;
|
||||
SELECT * FROM parent;
|
||||
SELECT * FROM child;
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
@ -53,8 +60,10 @@ DELETE FROM grandparent WHERE id = 1;
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM grandparent;
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM parent WHERE grandparent_id = 1;
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM child WHERE parent_id = 1;
|
||||
|
||||
SELECT * FROM grandparent;
|
||||
SELECT * FROM parent;
|
||||
SELECT * FROM child;
|
||||
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
|
@ -25,16 +25,25 @@ INSERT INTO parent VALUES ('row one'), ('row two');
|
||||
INSERT INTO child VALUES (1,'row one'), (2,'row two');
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'parent'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'child'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM parent;
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
DELETE FROM parent;
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM parent;
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM parent;
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM child;
|
||||
SELECT * FROM parent;
|
||||
SELECT * FROM child;
|
||||
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
@ -61,20 +70,27 @@ CREATE TABLE child (
|
||||
INSERT INTO parent VALUES (1);
|
||||
INSERT INTO child VALUES (1,0,1);
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'parent'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'child'
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM parent;
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# block applier before applying
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
SET GLOBAL debug_dbug = "d,sync.wsrep_apply_cb";
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
DELETE FROM parent;
|
||||
|
||||
--connection node_1a
|
||||
# wait until applier has reached the sync point
|
||||
SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
|
||||
|
||||
|
||||
--connection node_1
|
||||
# issue conflicting write to child table, it should fail in certification
|
||||
--error ER_LOCK_DEADLOCK
|
||||
@ -88,11 +104,13 @@ SET DEBUG_SYNC = "RESET";
|
||||
|
||||
--connection node_1
|
||||
--reap
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM parent;
|
||||
--source include/wait_condition.inc
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM child;
|
||||
--source include/wait_condition.inc
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM parent;
|
||||
SELECT COUNT(*), COUNT(*) = 0 FROM child;
|
||||
|
||||
SELECT * FROM parent;
|
||||
SELECT * FROM child;
|
||||
|
||||
DROP TABLE child;
|
||||
DROP TABLE parent;
|
||||
|
@ -32,6 +32,9 @@ CREATE TABLE t2 (f1 VARCHAR(255)) Engine=InnoDB;
|
||||
INSERT INTO t2 VALUES ('abc');
|
||||
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t2';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
TRUNCATE TABLE t2;
|
||||
|
||||
--connection node_2
|
||||
|
@ -1,12 +1,33 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
|
||||
--echo #
|
||||
#
|
||||
# MDEV-10492: Assertion failure on shutdown when wsrep_sst_auth set in config
|
||||
#
|
||||
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
SET @@global.wsrep_sst_auth='foo:bar';
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
|
||||
--source include/galera_end.inc
|
||||
#
|
||||
# MDEV-24509 Warning: Memory not freed: 56 on SET @@global.wsrep_sst_auth
|
||||
#
|
||||
--connection node_2
|
||||
SET @@global.wsrep_sst_auth= 'abcdefghijklmnopqrstuvwxyz';
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
--echo Shutdown node_2
|
||||
--source include/shutdown_mysqld.inc
|
||||
|
||||
# On node_1, verify that the node has left the cluster.
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Restart node_2
|
||||
--connection node_2
|
||||
--source include/start_mysqld.inc
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
--source include/wait_condition.inc
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
|
||||
|
||||
|
@ -5,7 +5,8 @@
|
||||
# after provider is unpaused
|
||||
#
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
--source include/have_debug_sync.inc
|
||||
|
||||
--let $galera_connection_name = node_2a
|
||||
--let $galera_server_number = 2
|
||||
@ -17,7 +18,7 @@ INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
SET session wsrep_sync_wait=0;
|
||||
FLUSH TABLE WITH READ LOCK;
|
||||
FLUSH TABLES WITH READ LOCK;
|
||||
|
||||
--connection node_1
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
@ -25,32 +26,33 @@ INSERT INTO t1 VALUES (2,3);
|
||||
|
||||
--connection node_2a
|
||||
SET session wsrep_sync_wait=0;
|
||||
|
||||
--echo # node_1 DDL should not yet be applied
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
SET debug_sync='flush_tables_with_read_lock_after_acquire_locks SIGNAL parked2 WAIT_FOR go2';
|
||||
--send FLUSH TABLES t1 WITH READ LOCK;
|
||||
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE LIKE '%committed%';
|
||||
--source include/wait_condition.inc
|
||||
SET debug_sync='now WAIT_FOR parked2';
|
||||
|
||||
# let the flush table wait in pause state before we unlock
|
||||
# table otherwise there is window where-in flush table is
|
||||
# yet to wait in pause and unlock allows alter table to proceed.
|
||||
# this is because send is asynchronous.
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE Info LIKE 'FLUSH TABLES t1 WITH READ LOCK';
|
||||
--let $wait_condition_on_error_output = SHOW PROCESSLIST
|
||||
--source include/wait_condition_with_debug.inc
|
||||
|
||||
SET debug_sync='now SIGNAL go2';
|
||||
# this will release existing lock but will not resume
|
||||
# the cluster as there is new FTRL that is still pausing it.
|
||||
UNLOCK TABLES;
|
||||
|
||||
--echo # node_1 DDL should not yet be applied 2
|
||||
SHOW CREATE TABLE t1;
|
||||
set debug_sync= 'RESET';
|
||||
|
||||
--connection node_2a
|
||||
--reap
|
||||
UNLOCK TABLES;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 't1';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
--echo # node_1 DDL should be applied 2
|
||||
SET SESSION wsrep_sync_wait = DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * from t1;
|
||||
|
||||
|
@ -10,7 +10,15 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
GAL-501 : MDEV-24645 galera_3nodes.GAL-501 MTR failed: failed to open gcomm backend connection: 110
|
||||
galera_gtid_2_cluster : MDEV-23775 Galera test failure on galera_3nodes.galera_gtid_2_cluster
|
||||
galera_ipv6_mariabackup : MDEV-24440: galera_3nodes.galera_ipv6_mariabackup MTR fails sporadically: Failed to read from: wsrep_sst_mariabackup --role 'donor' --address '[::1]:16028/xtrabackup_sst//1'
|
||||
galera_ipv6_mariabackup_section : MDEV-22195: galera_3nodes.galera_ipv6_mariabackup_section MTR failed: assert_grep.inc failed
|
||||
galera_ipv6_mysqldump : MDEV-24036: galera_3nodes.galera_ipv6_mysqldump: rare random crashes during shutdown
|
||||
galera_ipv6_rsync_section : MDEV-23580: galera_3nodes.galera_ipv6_rsync_section MTR failed: WSREP_SST: [ERROR] rsync daemon port '16008' has been taken
|
||||
galera_ist_gcache_rollover : MDEV-23578 WSREP: exception caused by message: {v=0,t=1,ut=255,o=4,s=0,sr=0,as=1,f=6,src=50524cfe,srcvid=view_id(REG,50524cfe,4),insvid=view_id(UNKNOWN,00000000,0),ru=00000000,r=[-1,-1],fs=75,nl=(}
|
||||
galera_slave_options_do :MDEV-8798
|
||||
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
|
||||
galera_load_data_ist : MDEV-24639 galera_3nodes.galera_load_data_ist MTR failed with SIGABRT: query 'reap' failed: 2013: Lost connection to MySQL server during query
|
||||
galera_pc_bootstrap : MDEV-24650 galera_pc_bootstrap MTR failed: Could not execute 'check-testcase' before testcase
|
||||
galera_slave_options_do : MDEV-8798
|
||||
galera_slave_options_ignore : MDEV-8798
|
||||
|
@ -343,11 +343,12 @@ DELETE FROM t1 WHERE c=1;
|
||||
DROP TABLE t1;
|
||||
}
|
||||
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar"));
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (i INT);
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 ADD COLUMN c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar");
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
--error ER_PARSE_ERROR
|
||||
CREATE TABLE t1 (i INT COLLATE utf8_bin, c INT COLLATE utf8_bin GENERATED ALWAYS AS (10));
|
||||
|
@ -426,10 +426,20 @@ INSERT INTO t1(a) VALUES(0);
|
||||
DELETE FROM t1 WHERE c=1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar"));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar"))' at line 1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (i INT);
|
||||
ALTER TABLE t1 ADD COLUMN c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar");
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar")' at line 1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (i INT COLLATE utf8_bin, c INT COLLATE utf8_bin GENERATED ALWAYS AS (10));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS (10))' at line 1
|
||||
|
@ -426,10 +426,20 @@ INSERT INTO t1(a) VALUES(0);
|
||||
DELETE FROM t1 WHERE c=1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar"));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar"))' at line 1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (i INT);
|
||||
ALTER TABLE t1 ADD COLUMN c CHAR(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ("foo bar");
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS ("foo bar")' at line 1
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`i` int(11) DEFAULT NULL,
|
||||
`c` char(10) CHARACTER SET utf8 COLLATE utf8_bin GENERATED ALWAYS AS ('foo bar') VIRTUAL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (i INT COLLATE utf8_bin, c INT COLLATE utf8_bin GENERATED ALWAYS AS (10));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'GENERATED ALWAYS AS (10))' at line 1
|
||||
|
@ -793,6 +793,9 @@ DROP TABLE t1;
|
||||
#
|
||||
# MDEV-24041 Generated column DELETE with FOREIGN KEY crash InnoDB
|
||||
#
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
CREATE DATABASE `a-b`;
|
||||
USE `a-b`;
|
||||
CREATE TABLE emails (
|
||||
id int,
|
||||
PRIMARY KEY (id)
|
||||
@ -802,6 +805,7 @@ id int,
|
||||
email_id int,
|
||||
date_sent char(4),
|
||||
generated_email_id int as (email_id),
|
||||
#generated_sent_date DATE GENERATED ALWAYS AS (date_sent),
|
||||
PRIMARY KEY (id),
|
||||
KEY mautic_generated_sent_date_email_id (generated_email_id),
|
||||
FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE SET NULL
|
||||
@ -818,3 +822,4 @@ DELETE FROM emails;
|
||||
DROP TABLE email_stats;
|
||||
DROP TABLE emails_metadata;
|
||||
DROP TABLE emails;
|
||||
DROP DATABASE `a-b`;
|
||||
|
@ -653,7 +653,9 @@ DROP TABLE t1;
|
||||
--echo #
|
||||
--echo # MDEV-24041 Generated column DELETE with FOREIGN KEY crash InnoDB
|
||||
--echo #
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=1;
|
||||
CREATE DATABASE `a-b`;
|
||||
USE `a-b`;
|
||||
CREATE TABLE emails (
|
||||
id int,
|
||||
PRIMARY KEY (id)
|
||||
@ -664,6 +666,7 @@ CREATE TABLE email_stats (
|
||||
email_id int,
|
||||
date_sent char(4),
|
||||
generated_email_id int as (email_id),
|
||||
#generated_sent_date DATE GENERATED ALWAYS AS (date_sent),
|
||||
PRIMARY KEY (id),
|
||||
KEY mautic_generated_sent_date_email_id (generated_email_id),
|
||||
FOREIGN KEY (email_id) REFERENCES emails (id) ON DELETE SET NULL
|
||||
@ -686,3 +689,4 @@ DELETE FROM emails;
|
||||
DROP TABLE email_stats;
|
||||
DROP TABLE emails_metadata;
|
||||
DROP TABLE emails;
|
||||
DROP DATABASE `a-b`;
|
||||
|
23
mysql-test/suite/innodb/r/alter_mdl_timeout.result
Normal file
23
mysql-test/suite/innodb/r/alter_mdl_timeout.result
Normal file
@ -0,0 +1,23 @@
|
||||
create table t1(f1 char(10), f2 char(10) not null, f3 int not null,
|
||||
f4 int not null, primary key(f3))engine=innodb;
|
||||
insert into t1 values('a','a', 1, 1), ('b','b', 2, 2), ('c', 'c', 3, 3), ('d', 'd', 4, 4);
|
||||
SET DEBUG_SYNC="row_merge_after_scan SIGNAL con1_start WAIT_FOR con1_insert";
|
||||
SET DEBUG_SYNC="innodb_commit_inplace_alter_table_wait SIGNAL con1_wait WAIT_FOR con1_update";
|
||||
ALTER TABLE t1 ADD UNIQUE INDEX(f1(3), f4), ADD UNIQUE INDEX(f2), ALGORITHM=INPLACE;
|
||||
connect con1,localhost,root,,,;
|
||||
SET DEBUG_SYNC="now WAIT_FOR con1_start";
|
||||
begin;
|
||||
INSERT INTO t1 VALUES('e','e',5, 5);
|
||||
SET DEBUG_SYNC="now SIGNAL con1_insert";
|
||||
SET DEBUG_SYNC="now WAIT_FOR con1_wait";
|
||||
SET DEBUG_SYNC="before_row_upd_sec_new_index_entry SIGNAL con1_update WAIT_FOR alter_rollback";
|
||||
UPDATE t1 set f4 = 10 order by f1 desc limit 2;
|
||||
connection default;
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SET DEBUG_SYNC="now SIGNAL alter_rollback";
|
||||
connection con1;
|
||||
commit;
|
||||
connection default;
|
||||
disconnect con1;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC="RESET";
|
@ -8,7 +8,7 @@ SELECT @@innodb_file_per_table;
|
||||
SET SQL_MODE=strict_all_tables;
|
||||
CREATE TABLE tab0 (c1 VARCHAR(65530), KEY(c1(3073))) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
SHOW CREATE TABLE tab0;
|
||||
Table Create Table
|
||||
tab0 CREATE TABLE `tab0` (
|
||||
|
@ -2299,7 +2299,7 @@ drop table t1;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
create table t1 (v varchar(65530), key(v));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
drop table t1;
|
||||
create table t1 (v varchar(65536));
|
||||
Warnings:
|
||||
|
1
mysql-test/suite/innodb/t/alter_mdl_timeout.opt
Normal file
1
mysql-test/suite/innodb/t/alter_mdl_timeout.opt
Normal file
@ -0,0 +1 @@
|
||||
--lock_wait_timeout=2
|
32
mysql-test/suite/innodb/t/alter_mdl_timeout.test
Normal file
32
mysql-test/suite/innodb/t/alter_mdl_timeout.test
Normal file
@ -0,0 +1,32 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug.inc
|
||||
|
||||
create table t1(f1 char(10), f2 char(10) not null, f3 int not null,
|
||||
f4 int not null, primary key(f3))engine=innodb;
|
||||
insert into t1 values('a','a', 1, 1), ('b','b', 2, 2), ('c', 'c', 3, 3), ('d', 'd', 4, 4);
|
||||
SET DEBUG_SYNC="row_merge_after_scan SIGNAL con1_start WAIT_FOR con1_insert";
|
||||
SET DEBUG_SYNC="innodb_commit_inplace_alter_table_wait SIGNAL con1_wait WAIT_FOR con1_update";
|
||||
send ALTER TABLE t1 ADD UNIQUE INDEX(f1(3), f4), ADD UNIQUE INDEX(f2), ALGORITHM=INPLACE;
|
||||
|
||||
connect(con1,localhost,root,,,);
|
||||
SET DEBUG_SYNC="now WAIT_FOR con1_start";
|
||||
begin;
|
||||
INSERT INTO t1 VALUES('e','e',5, 5);
|
||||
SET DEBUG_SYNC="now SIGNAL con1_insert";
|
||||
SET DEBUG_SYNC="now WAIT_FOR con1_wait";
|
||||
SET DEBUG_SYNC="before_row_upd_sec_new_index_entry SIGNAL con1_update WAIT_FOR alter_rollback";
|
||||
SEND UPDATE t1 set f4 = 10 order by f1 desc limit 2;
|
||||
|
||||
connection default;
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
reap;
|
||||
SET DEBUG_SYNC="now SIGNAL alter_rollback";
|
||||
|
||||
connection con1;
|
||||
reap;
|
||||
commit;
|
||||
|
||||
connection default;
|
||||
disconnect con1;
|
||||
DROP TABLE t1;
|
||||
SET DEBUG_SYNC="RESET";
|
@ -178,3 +178,13 @@ Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save;
|
||||
#
|
||||
# MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields
|
||||
#
|
||||
create table t1 (
|
||||
f1 int, f2 text,
|
||||
FTS_DOC_ID bigint unsigned not null,
|
||||
unique key FTS_DOC_ID_INDEX(FTS_DOC_ID, f1),
|
||||
fulltext (f2))
|
||||
engine=innodb;
|
||||
ERROR 42000: Incorrect index name 'FTS_DOC_ID_INDEX'
|
||||
|
@ -106,3 +106,14 @@ SET GLOBAL innodb_optimize_fulltext_only= 1;
|
||||
OPTIMIZE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_optimize_fulltext_only= @optimize_fulltext.save;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-24403 Segfault on CREATE TABLE with explicit FTS_DOC_ID_INDEX by multiple fields
|
||||
--echo #
|
||||
--error ER_WRONG_NAME_FOR_INDEX
|
||||
create table t1 (
|
||||
f1 int, f2 text,
|
||||
FTS_DOC_ID bigint unsigned not null,
|
||||
unique key FTS_DOC_ID_INDEX(FTS_DOC_ID, f1),
|
||||
fulltext (f2))
|
||||
engine=innodb;
|
||||
|
@ -325,10 +325,10 @@ ROW_FORMAT=DYNAMIC;
|
||||
SET sql_mode='';
|
||||
create index idx1 on worklog5743(a2);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx2 on worklog5743(a3);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx3 on worklog5743(a4);
|
||||
show warnings;
|
||||
Level Code Message
|
||||
@ -337,7 +337,7 @@ create index idx4 on worklog5743(a1, a2);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Error 1071 Specified key was too long; max key length is 3072 bytes
|
||||
create index idx5 on worklog5743(a1, a5);
|
||||
ERROR 42000: Specified key was too long; max key length is 3072 bytes
|
||||
|
@ -1224,7 +1224,7 @@ DROP INDEX prefix_idx ON worklog5743;
|
||||
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
|
||||
CREATE INDEX prefix_idx ON worklog5743(col_1_varbinary (4000));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 3072 bytes
|
||||
Note 1071 Specified key was too long; max key length is 3072 bytes
|
||||
SET sql_mode = default;
|
||||
INSERT INTO worklog5743 VALUES(REPEAT("a", 4000),REPEAT("o", 4000));
|
||||
SELECT col_1_varbinary = REPEAT("a", 4000) FROM worklog5743;
|
||||
|
@ -17,7 +17,7 @@ test.t1 check status OK
|
||||
SET STATEMENT sql_mode = 'NO_ENGINE_SUBSTITUTION' FOR
|
||||
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
@ -30,7 +30,7 @@ t1 CREATE TABLE `t1` (
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a VARCHAR(800),KEY(a)) ENGINE=Aria CHARACTER SET ucs2;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES (REPEAT('abc ',200));
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
|
@ -1585,7 +1585,7 @@ a b
|
||||
drop table t1;
|
||||
create table t1 (v varchar(65530), key(v));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
drop table if exists t1;
|
||||
set statement sql_mode = 'NO_ENGINE_SUBSTITUTION' for
|
||||
create table t1 (v varchar(65536));
|
||||
@ -1855,7 +1855,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a));
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1865,7 +1865,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a) key_block_size=1024);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1875,7 +1875,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=1024;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1942,7 +1942,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b varchar(2048), key (a), key(b)) key_block_size=8192;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1954,7 +1954,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a int not null, b varchar(2048), key (a) key_block_size=1024, key(b)) key_block_size=8192;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -1984,7 +1984,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -17,7 +17,7 @@ t1 CREATE TABLE `t1` (
|
||||
drop table t1;
|
||||
create table t1 (a varchar(2048), key `a` (a) key_block_size=1000000000000000000);
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
|
@ -393,7 +393,7 @@ PRIMARY KEY (pk),
|
||||
KEY col_varchar_1024_latin1_key (col_varchar_1024_latin1_key)
|
||||
) ENGINE=Aria;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
INSERT INTO t1 VALUES
|
||||
(1,'z'), (2,'abcdefjhjkl'), (3,'in'), (4,'abcdefjhjkl'), (6,'abcdefjhjkl'),
|
||||
(11,'zx'), (12,'abcdefjhjm'), (13,'jn'), (14,'abcdefjhjp'), (16,'abcdefjhjr');
|
||||
@ -430,7 +430,7 @@ f5 varchar(1024) COLLATE latin1_bin,
|
||||
KEY (f5)
|
||||
) ENGINE=Aria TRANSACTIONAL=0 ;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
# Fill the table with some data
|
||||
SELECT alias2.* , alias1.f2
|
||||
FROM
|
||||
|
@ -62,7 +62,7 @@ users
|
||||
show create table accounts;
|
||||
Table Create Table
|
||||
accounts CREATE TABLE `accounts` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`CURRENT_CONNECTIONS` bigint(20) NOT NULL,
|
||||
`TOTAL_CONNECTIONS` bigint(20) NOT NULL
|
||||
@ -140,7 +140,7 @@ events_stages_summary_by_thread_by_event_name CREATE TABLE `events_stages_summar
|
||||
show create table events_stages_summary_by_user_by_event_name;
|
||||
Table Create Table
|
||||
events_stages_summary_by_user_by_event_name CREATE TABLE `events_stages_summary_by_user_by_event_name` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`EVENT_NAME` varchar(128) NOT NULL,
|
||||
`COUNT_STAR` bigint(20) unsigned NOT NULL,
|
||||
`SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
|
||||
@ -151,7 +151,7 @@ events_stages_summary_by_user_by_event_name CREATE TABLE `events_stages_summary_
|
||||
show create table events_stages_summary_by_account_by_event_name;
|
||||
Table Create Table
|
||||
events_stages_summary_by_account_by_event_name CREATE TABLE `events_stages_summary_by_account_by_event_name` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`EVENT_NAME` varchar(128) NOT NULL,
|
||||
`COUNT_STAR` bigint(20) unsigned NOT NULL,
|
||||
@ -398,7 +398,7 @@ events_statements_summary_by_thread_by_event_name CREATE TABLE `events_statement
|
||||
show create table events_statements_summary_by_user_by_event_name;
|
||||
Table Create Table
|
||||
events_statements_summary_by_user_by_event_name CREATE TABLE `events_statements_summary_by_user_by_event_name` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`EVENT_NAME` varchar(128) NOT NULL,
|
||||
`COUNT_STAR` bigint(20) unsigned NOT NULL,
|
||||
`SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
|
||||
@ -428,7 +428,7 @@ events_statements_summary_by_user_by_event_name CREATE TABLE `events_statements_
|
||||
show create table events_statements_summary_by_account_by_event_name;
|
||||
Table Create Table
|
||||
events_statements_summary_by_account_by_event_name CREATE TABLE `events_statements_summary_by_account_by_event_name` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`EVENT_NAME` varchar(128) NOT NULL,
|
||||
`COUNT_STAR` bigint(20) unsigned NOT NULL,
|
||||
@ -590,7 +590,7 @@ events_waits_summary_by_thread_by_event_name CREATE TABLE `events_waits_summary_
|
||||
show create table events_waits_summary_by_user_by_event_name;
|
||||
Table Create Table
|
||||
events_waits_summary_by_user_by_event_name CREATE TABLE `events_waits_summary_by_user_by_event_name` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`EVENT_NAME` varchar(128) NOT NULL,
|
||||
`COUNT_STAR` bigint(20) unsigned NOT NULL,
|
||||
`SUM_TIMER_WAIT` bigint(20) unsigned NOT NULL,
|
||||
@ -601,7 +601,7 @@ events_waits_summary_by_user_by_event_name CREATE TABLE `events_waits_summary_by
|
||||
show create table events_waits_summary_by_account_by_event_name;
|
||||
Table Create Table
|
||||
events_waits_summary_by_account_by_event_name CREATE TABLE `events_waits_summary_by_account_by_event_name` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`EVENT_NAME` varchar(128) NOT NULL,
|
||||
`COUNT_STAR` bigint(20) unsigned NOT NULL,
|
||||
@ -762,8 +762,8 @@ show create table setup_actors;
|
||||
Table Create Table
|
||||
setup_actors CREATE TABLE `setup_actors` (
|
||||
`HOST` char(60) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
|
||||
`ROLE` char(16) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%',
|
||||
`ROLE` char(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '%'
|
||||
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
|
||||
show create table setup_consumers;
|
||||
Table Create Table
|
||||
@ -1028,7 +1028,7 @@ threads CREATE TABLE `threads` (
|
||||
`NAME` varchar(128) NOT NULL,
|
||||
`TYPE` varchar(10) NOT NULL,
|
||||
`PROCESSLIST_ID` bigint(20) unsigned DEFAULT NULL,
|
||||
`PROCESSLIST_USER` varchar(16) DEFAULT NULL,
|
||||
`PROCESSLIST_USER` varchar(128) DEFAULT NULL,
|
||||
`PROCESSLIST_HOST` varchar(60) DEFAULT NULL,
|
||||
`PROCESSLIST_DB` varchar(64) DEFAULT NULL,
|
||||
`PROCESSLIST_COMMAND` varchar(16) DEFAULT NULL,
|
||||
@ -1042,7 +1042,7 @@ threads CREATE TABLE `threads` (
|
||||
show create table users;
|
||||
Table Create Table
|
||||
users CREATE TABLE `users` (
|
||||
`USER` char(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`USER` char(128) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
|
||||
`CURRENT_CONNECTIONS` bigint(20) NOT NULL,
|
||||
`TOTAL_CONNECTIONS` bigint(20) NOT NULL
|
||||
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
|
||||
|
@ -1,7 +1,7 @@
|
||||
select * from information_schema.columns where table_schema="performance_schema"
|
||||
order by table_name, ordinal_position;
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT IS_GENERATED GENERATION_EXPRESSION
|
||||
def performance_schema accounts USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema accounts USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema accounts HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
|
||||
def performance_schema accounts CURRENT_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
|
||||
def performance_schema accounts TOTAL_CONNECTIONS 4 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
|
||||
@ -37,7 +37,7 @@ def performance_schema events_stages_history_long TIMER_END 7 NULL YES bigint NU
|
||||
def performance_schema events_stages_history_long TIMER_WAIT 8 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_history_long NESTING_EVENT_ID 9 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_history_long NESTING_EVENT_TYPE 10 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
@ -59,7 +59,7 @@ def performance_schema events_stages_summary_by_thread_by_event_name SUM_TIMER_W
|
||||
def performance_schema events_stages_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_user_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_stages_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
@ -192,7 +192,7 @@ def performance_schema events_statements_history_long NO_INDEX_USED 37 NULL NO b
|
||||
def performance_schema events_statements_history_long NO_GOOD_INDEX_USED 38 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_history_long NESTING_EVENT_ID 39 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_history_long NESTING_EVENT_TYPE 40 NULL YES enum 9 27 NULL NULL NULL utf8 utf8_general_ci enum('STATEMENT','STAGE','WAIT') select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
@ -300,7 +300,7 @@ def performance_schema events_statements_summary_by_thread_by_event_name SUM_SOR
|
||||
def performance_schema events_statements_summary_by_thread_by_event_name SUM_SORT_SCAN 24 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_thread_by_event_name SUM_NO_INDEX_USED 25 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_thread_by_event_name SUM_NO_GOOD_INDEX_USED 26 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_user_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_statements_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
@ -408,7 +408,7 @@ def performance_schema events_waits_history_long NESTING_EVENT_TYPE 16 NULL YES
|
||||
def performance_schema events_waits_history_long OPERATION 17 NULL NO varchar 32 96 NULL NULL NULL utf8 utf8_general_ci varchar(32) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_history_long NUMBER_OF_BYTES 18 NULL YES bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_history_long FLAGS 19 NULL YES int NULL NULL 10 0 NULL NULL NULL int(10) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_account_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_account_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_account_by_event_name HOST 2 NULL YES char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_account_by_event_name EVENT_NAME 3 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_account_by_event_name COUNT_STAR 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
@ -437,7 +437,7 @@ def performance_schema events_waits_summary_by_thread_by_event_name SUM_TIMER_WA
|
||||
def performance_schema events_waits_summary_by_thread_by_event_name MIN_TIMER_WAIT 5 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_thread_by_event_name AVG_TIMER_WAIT 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_thread_by_event_name MAX_TIMER_WAIT 7 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_user_by_event_name USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_user_by_event_name USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_user_by_event_name EVENT_NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_user_by_event_name COUNT_STAR 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema events_waits_summary_by_user_by_event_name SUM_TIMER_WAIT 4 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
@ -561,8 +561,8 @@ def performance_schema session_connect_attrs ATTR_NAME 2 NULL NO varchar 32 96 N
|
||||
def performance_schema session_connect_attrs ATTR_VALUE 3 NULL YES varchar 1024 3072 NULL NULL NULL utf8 utf8_bin varchar(1024) select,insert,update,references NEVER NULL
|
||||
def performance_schema session_connect_attrs ORDINAL_POSITION 4 NULL YES int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_actors HOST 1 '%' NO char 60 180 NULL NULL NULL utf8 utf8_bin char(60) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_actors USER 2 '%' NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_actors ROLE 3 '%' NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_actors USER 2 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_actors ROLE 3 '%' NO char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_consumers NAME 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_consumers ENABLED 2 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
|
||||
def performance_schema setup_instruments NAME 1 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
@ -783,7 +783,7 @@ def performance_schema threads THREAD_ID 1 NULL NO bigint NULL NULL 20 0 NULL NU
|
||||
def performance_schema threads NAME 2 NULL NO varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads TYPE 3 NULL NO varchar 10 30 NULL NULL NULL utf8 utf8_general_ci varchar(10) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads PROCESSLIST_ID 4 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads PROCESSLIST_USER 5 NULL YES varchar 128 384 NULL NULL NULL utf8 utf8_general_ci varchar(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads PROCESSLIST_HOST 6 NULL YES varchar 60 180 NULL NULL NULL utf8 utf8_general_ci varchar(60) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads PROCESSLIST_DB 7 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads PROCESSLIST_COMMAND 8 NULL YES varchar 16 48 NULL NULL NULL utf8 utf8_general_ci varchar(16) select,insert,update,references NEVER NULL
|
||||
@ -793,7 +793,7 @@ def performance_schema threads PROCESSLIST_INFO 11 NULL YES longtext 4294967295
|
||||
def performance_schema threads PARENT_THREAD_ID 12 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references NEVER NULL
|
||||
def performance_schema threads ROLE 13 NULL YES varchar 64 192 NULL NULL NULL utf8 utf8_general_ci varchar(64) select,insert,update,references NEVER NULL
|
||||
def performance_schema threads INSTRUMENTED 14 NULL NO enum 3 9 NULL NULL NULL utf8 utf8_general_ci enum('YES','NO') select,insert,update,references NEVER NULL
|
||||
def performance_schema users USER 1 NULL YES char 16 48 NULL NULL NULL utf8 utf8_bin char(16) select,insert,update,references NEVER NULL
|
||||
def performance_schema users USER 1 NULL YES char 128 384 NULL NULL NULL utf8 utf8_bin char(128) select,insert,update,references NEVER NULL
|
||||
def performance_schema users CURRENT_CONNECTIONS 2 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
|
||||
def performance_schema users TOTAL_CONNECTIONS 3 NULL NO bigint NULL NULL 19 0 NULL NULL NULL bigint(20) select,insert,update,references NEVER NULL
|
||||
select count(*) from information_schema.columns
|
||||
|
@ -17,6 +17,16 @@ processlist_info NULL
|
||||
unified_parent_thread_id NULL
|
||||
role NULL
|
||||
instrumented YES
|
||||
name thread/sql/manager
|
||||
type BACKGROUND
|
||||
processlist_user NULL
|
||||
processlist_host NULL
|
||||
processlist_db NULL
|
||||
processlist_command NULL
|
||||
processlist_info NULL
|
||||
unified_parent_thread_id unified parent_thread_id
|
||||
role NULL
|
||||
instrumented YES
|
||||
name thread/sql/one_connection
|
||||
type FOREGROUND
|
||||
processlist_user root
|
||||
@ -44,16 +54,6 @@ processlist_info NULL
|
||||
unified_parent_thread_id unified parent_thread_id
|
||||
role NULL
|
||||
instrumented YES
|
||||
name thread/sql/slave_background
|
||||
type BACKGROUND
|
||||
processlist_user NULL
|
||||
processlist_host NULL
|
||||
processlist_db NULL
|
||||
processlist_command NULL
|
||||
processlist_info NULL
|
||||
unified_parent_thread_id unified parent_thread_id
|
||||
role NULL
|
||||
instrumented YES
|
||||
CREATE TEMPORARY TABLE t1 AS
|
||||
SELECT thread_id FROM performance_schema.threads
|
||||
WHERE name LIKE 'thread/sql%';
|
||||
@ -113,7 +113,7 @@ WHERE t1.name LIKE 'thread/sql%'
|
||||
ORDER BY parent_thread_name, child_thread_name;
|
||||
parent_thread_name child_thread_name
|
||||
thread/sql/event_scheduler thread/sql/event_worker
|
||||
thread/sql/main thread/sql/manager
|
||||
thread/sql/main thread/sql/one_connection
|
||||
thread/sql/main thread/sql/signal_handler
|
||||
thread/sql/main thread/sql/slave_background
|
||||
thread/sql/one_connection thread/sql/event_scheduler
|
||||
|
@ -10,8 +10,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
rpl_spec_variables : BUG#11755836 2009-10-27 jasonh rpl_spec_variables fails on PB2 hpux
|
||||
#rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
|
||||
#rpl_get_master_version_and_clock : Bug#11766137 Jan 05 2011 joro Valgrind warnings
|
||||
rpl_partition_archive : MDEV-5077 2013-09-27 svoj Cannot exchange partition with archive table
|
||||
rpl_row_binlog_max_cache_size : MDEV-11092
|
||||
rpl_row_index_choice : MDEV-11666
|
||||
|
@ -49,14 +49,14 @@ connection master;
|
||||
|
||||
--echo *** Single statement on transactional table ***
|
||||
--disable_query_log
|
||||
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE, 1534
|
||||
eval INSERT INTO t1 (a, data) VALUES (1,
|
||||
CONCAT($data, $data, $data, $data, $data));
|
||||
--enable_query_log
|
||||
|
||||
--echo *** Single statement on non-transactional table ***
|
||||
--disable_query_log
|
||||
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE
|
||||
--error ER_TRANS_CACHE_FULL, ER_STMT_CACHE_FULL, ER_ERROR_ON_WRITE, 1534
|
||||
eval INSERT INTO t2 (a, data) VALUES (2,
|
||||
CONCAT($data, $data, $data, $data, $data, $data));
|
||||
--enable_query_log
|
||||
|
37
mysql-test/suite/rpl/r/rpl_relay_max_extension.result
Normal file
37
mysql-test/suite/rpl/r/rpl_relay_max_extension.result
Normal file
@ -0,0 +1,37 @@
|
||||
include/rpl_init.inc [topology=1->2]
|
||||
connection server_2;
|
||||
include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
include/start_slave.inc
|
||||
include/stop_slave.inc
|
||||
#
|
||||
# Stop slave server
|
||||
#
|
||||
#
|
||||
# Simulate file number get close to 999997
|
||||
# by renaming relay logs and modifying index/info files
|
||||
#
|
||||
# Restart slave server
|
||||
#
|
||||
SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
|
||||
SET @save_max_relay_log_size= @@GLOBAL.max_relay_log_size;
|
||||
SET GLOBAL slave_parallel_threads=1;
|
||||
SET GLOBAL max_relay_log_size=100 * 1024;
|
||||
include/start_slave.inc
|
||||
connection server_1;
|
||||
create table t1 (i int, c varchar(1024));
|
||||
#
|
||||
# Insert some data to generate enough amount of binary logs
|
||||
#
|
||||
connection server_2;
|
||||
#
|
||||
# Assert that 'slave-relay-bin.999999' is purged.
|
||||
#
|
||||
NOT FOUND /slave-relay-bin.999999/ in slave-relay-bin.index
|
||||
include/stop_slave.inc
|
||||
SET GLOBAL slave_parallel_threads= @save_slave_parallel_threads;
|
||||
SET GLOBAL max_relay_log_size= @save_max_relay_log_size;
|
||||
include/start_slave.inc
|
||||
connection server_1;
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
@ -3,7 +3,7 @@ include/master-slave.inc
|
||||
SET SQL_LOG_BIN=0;
|
||||
CREATE TABLE t1 (c1 char(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
SET SQL_LOG_BIN=1;
|
||||
connection slave;
|
||||
SET @saved_slave_type_conversions= @@global.slave_type_conversions;
|
||||
@ -13,7 +13,7 @@ include/start_slave.inc
|
||||
SET SQL_LOG_BIN=0;
|
||||
CREATE TABLE t1 ( c1 varchar(255) DEFAULT NULL, KEY c1 (c1)) DEFAULT CHARSET=utf32;
|
||||
Warnings:
|
||||
Warning 1071 Specified key was too long; max key length is 1000 bytes
|
||||
Note 1071 Specified key was too long; max key length is 1000 bytes
|
||||
SET SQL_LOG_BIN=1;
|
||||
connection master;
|
||||
INSERT INTO t1(c1) VALUES ('insert into t1');
|
||||
|
@ -2,14 +2,17 @@ include/master-slave.inc
|
||||
[connection master]
|
||||
|
||||
* auto_increment_increment, auto_increment_offset *
|
||||
connection master;
|
||||
SET @@global.auto_increment_increment=2;
|
||||
SET @@session.auto_increment_increment=2;
|
||||
SET @@global.auto_increment_offset=10;
|
||||
SET @@session.auto_increment_offset=10;
|
||||
connection slave;
|
||||
SET @@global.auto_increment_increment=3;
|
||||
SET @@session.auto_increment_increment=3;
|
||||
SET @@global.auto_increment_offset=20;
|
||||
SET @@session.auto_increment_offset=20;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 (b) VALUES ('master');
|
||||
INSERT INTO t1 (b) VALUES ('master');
|
||||
@ -17,6 +20,7 @@ SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
2 master
|
||||
4 master
|
||||
connection slave;
|
||||
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
|
||||
INSERT INTO t1 (b) VALUES ('slave');
|
||||
INSERT INTO t1 (b) VALUES ('slave');
|
||||
@ -32,102 +36,123 @@ SELECT * FROM t2 ORDER BY a;
|
||||
a b
|
||||
1 slave
|
||||
4 slave
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
SET @@global.auto_increment_increment=1;
|
||||
SET @@session.auto_increment_increment=1;
|
||||
SET @@global.auto_increment_offset=1;
|
||||
SET @@session.auto_increment_offset=1;
|
||||
connection slave;
|
||||
SET @@global.auto_increment_increment=1;
|
||||
SET @@session.auto_increment_increment=1;
|
||||
SET @@global.auto_increment_offset=1;
|
||||
SET @@session.auto_increment_offset=1;
|
||||
connection slave;
|
||||
SET auto_increment_increment=1;
|
||||
SET auto_increment_offset=1;
|
||||
|
||||
* character_set_database, collation_server *
|
||||
connection master;
|
||||
SET @restore_master_character_set_database=@@global.character_set_database;
|
||||
SET @restore_master_collation_server=@@global.collation_server;
|
||||
SET @@global.character_set_database=latin1;
|
||||
SET @@session.character_set_database=latin1;
|
||||
SET @@global.collation_server=latin1_german1_ci;
|
||||
SET @@session.collation_server=latin1_german1_ci;
|
||||
connection slave;
|
||||
SET @restore_slave_character_set_database=@@global.character_set_database;
|
||||
SET @restore_slave_collation_server=@@global.collation_server;
|
||||
SET @@global.character_set_database=utf8;
|
||||
SET @@session.character_set_database=utf8;
|
||||
SET @@global.collation_server=utf8_bin;
|
||||
SET @@session.collation_server=utf8_bin;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL,
|
||||
`b` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
connection slave;
|
||||
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` varchar(10) COLLATE latin1_german1_ci DEFAULT NULL,
|
||||
`b` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` varchar(10) COLLATE utf8_bin DEFAULT NULL,
|
||||
`b` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SET @@global.collation_server=latin1_swedish_ci;
|
||||
SET @@session.collation_server=latin1_swedish_ci;
|
||||
connection master;
|
||||
SET @@global.collation_server=latin1_swedish_ci;
|
||||
SET @@session.collation_server=latin1_swedish_ci;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
|
||||
* default_week_format *
|
||||
connection master;
|
||||
SET @@global.default_week_format=0;
|
||||
SET @@session.default_week_format=0;
|
||||
connection slave;
|
||||
SET @@global.default_week_format=1;
|
||||
SET @@session.default_week_format=1;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (1, 'master ', WEEK('2008-01-07'));
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c
|
||||
1 master 1
|
||||
connection slave;
|
||||
INSERT INTO t1 VALUES (2, 'slave ', WEEK('2008-01-07'));
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c
|
||||
1 master 1
|
||||
2 slave 2
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
connection slave;
|
||||
SET @@global.default_week_format=0;
|
||||
SET @@session.default_week_format=0;
|
||||
|
||||
* local_infile *
|
||||
connection slave;
|
||||
SET @@global.local_infile=0;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(20), c CHAR(254)) ENGINE=MyISAM;
|
||||
LOAD DATA LOCAL INFILE 'FILE' INTO TABLE t1 (b);
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
70
|
||||
connection slave;
|
||||
LOAD DATA LOCAL INFILE 'FILE2' INTO TABLE t1 (b);
|
||||
ERROR 42000: The used command is not allowed with this MySQL version
|
||||
ERROR 42000: The used command is not allowed with this MariaDB version
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
70
|
||||
SET @@global.local_infile=1;
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
* max_heap_table_size *
|
||||
connection slave;
|
||||
SET @restore_slave_max_heap_table_size=@@global.max_heap_table_size;
|
||||
SET @@global.max_heap_table_size=16384;
|
||||
SET @@session.max_heap_table_size=16384;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b VARCHAR(10), c CHAR(254)) ENGINE=MEMORY;
|
||||
SELECT COUNT(*)=2000 FROM t1;
|
||||
COUNT(*)=2000
|
||||
1
|
||||
connection slave;
|
||||
SELECT COUNT(*)=2000 FROM t1 WHERE b='master' GROUP BY b ORDER BY b;
|
||||
COUNT(*)=2000
|
||||
1
|
||||
@ -137,18 +162,24 @@ COUNT(*)<2000 AND COUNT(*)>0
|
||||
SELECT COUNT(*)<2000 AND COUNT(*)>0 FROM t2 WHERE b='slave' GROUP BY b ORDER BY b;
|
||||
COUNT(*)<2000 AND COUNT(*)>0
|
||||
1
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
|
||||
* storage_engine *
|
||||
connection master;
|
||||
SET @restore_master_storage_engine=@@global.storage_engine;
|
||||
SET @@global.storage_engine=InnoDB;
|
||||
SET @@session.storage_engine=InnoDB;
|
||||
connection slave;
|
||||
SET @restore_slave_storage_engine=@@global.storage_engine;
|
||||
SET @@global.storage_engine=Memory;
|
||||
SET @@session.storage_engine=Memory;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10));
|
||||
CREATE TABLE t2 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10)) ENGINE=InnoDB;
|
||||
connection slave;
|
||||
CREATE TABLE t3 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10));
|
||||
connection master;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -163,6 +194,7 @@ t2 CREATE TABLE `t2` (
|
||||
`b` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
connection slave;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@ -186,37 +218,49 @@ t3 CREATE TABLE `t3` (
|
||||
) ENGINE=MEMORY DEFAULT CHARSET=latin1
|
||||
SET @@global.storage_engine=InnoDB;
|
||||
SET @@session.storage_engine=InnoDB;
|
||||
connection master;
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
|
||||
* sql_mode *
|
||||
connection master;
|
||||
SET @old_sql_mode_master= @@global.sql_mode;
|
||||
SET @@global.sql_mode=ANSI;
|
||||
SET @@session.sql_mode=ANSI;
|
||||
connection slave;
|
||||
SET @old_sql_mode_slave= @@global.sql_mode;
|
||||
SET @@global.sql_mode=TRADITIONAL;
|
||||
SET @@session.sql_mode=TRADITIONAL;
|
||||
connection master;
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b VARCHAR(10), c DATE);
|
||||
INSERT INTO t1 VALUES (1, 'master', '0000-00-00');
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c
|
||||
1 master 0000-00-00
|
||||
connection slave;
|
||||
INSERT INTO t1 VALUES (1, 'slave', '0000-00-00');
|
||||
ERROR 22007: Incorrect date value: '0000-00-00' for column 'c' at row 1
|
||||
ERROR 22007: Incorrect date value: '0000-00-00' for column `test`.`t1`.`c` at row 1
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c
|
||||
1 master 0000-00-00
|
||||
SET @@global.sql_mode='';
|
||||
SET @@session.sql_mode='';
|
||||
connection master;
|
||||
SET @@global.sql_mode='';
|
||||
SET @@session.sql_mode='';
|
||||
DROP TABLE t1;
|
||||
|
||||
*** clean up ***
|
||||
connection master;
|
||||
SET @@global.character_set_database=@restore_master_character_set_database;
|
||||
SET @@global.collation_server=@restore_master_collation_server;
|
||||
SET @@global.storage_engine=@restore_master_storage_engine;
|
||||
SET @@global.sql_mode=@old_sql_mode_master;
|
||||
connection slave;
|
||||
SET @@global.character_set_database=@restore_slave_character_set_database;
|
||||
SET @@global.collation_server=@restore_slave_collation_server;
|
||||
SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size;
|
||||
SET @@global.storage_engine=@restore_slave_storage_engine;
|
||||
SET @@global.sql_mode=@old_sql_mode_slave;
|
||||
|
||||
call mtr.add_suppression("The table 't[12]' is full");
|
||||
include/rpl_end.inc
|
||||
|
@ -5,24 +5,27 @@ set storage_engine=example;
|
||||
connection slave;
|
||||
connection master;
|
||||
create table t1 (a int not null) ull=12340;
|
||||
alter table t1 ull=12350;
|
||||
Warnings:
|
||||
Note 1105 EXAMPLE DEBUG: ULL 12340 -> 12350
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL
|
||||
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12340
|
||||
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=12350
|
||||
connection slave;
|
||||
connection slave;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=12340 */
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 /* `ull`=12350 */
|
||||
set sql_mode=ignore_bad_table_options;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12340
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 `ull`=12350
|
||||
connection master;
|
||||
drop table t1;
|
||||
set storage_engine=default;
|
||||
|
109
mysql-test/suite/rpl/t/rpl_relay_max_extension.test
Normal file
109
mysql-test/suite/rpl/t/rpl_relay_max_extension.test
Normal file
@ -0,0 +1,109 @@
|
||||
# ==== Purpose ====
|
||||
#
|
||||
# Test verifies that auto purging mechanism of relay logs works fine when the
|
||||
# file extension grows beyond 999999.
|
||||
#
|
||||
# ==== Implementation ====
|
||||
#
|
||||
# Steps:
|
||||
# 0 - In master-slave setup clear all the relay logs on the slave server.
|
||||
# 1 - Start the slave so that new relay logs starting from
|
||||
# 'slave-relay-bin.000001' are created.
|
||||
# 2 - Get the active relay-log file name by using SHOW SLAVE STATUS.
|
||||
# Shutdown the slave server.
|
||||
# 3 - Rename active relay log to '999997' in both 'relay-log.info' and
|
||||
# 'slave-relay-bin.index' files.
|
||||
# 4 - Restart the slave server by configuring 'slave_parallel_threads=1'
|
||||
# and 'max_relay_log_size=100K'.
|
||||
# 5 - Generate load on master such that few relay logs are generated on
|
||||
# slave. The relay log sequence number will change to 7 digits.
|
||||
# 6 - Sync slave with master to ensure that relay logs are applied on
|
||||
# slave. They should have been automatically purged.
|
||||
# 7 - Assert that there is no 'slave-relay-bin.999999' file in
|
||||
# 'relay-log.info'.
|
||||
#
|
||||
# ==== References ====
|
||||
#
|
||||
# MDEV-8134: The relay-log is not flushed after the slave-relay-log.999999
|
||||
# showed
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_binlog_format_row.inc
|
||||
--let $rpl_topology=1->2
|
||||
--source include/rpl_init.inc
|
||||
|
||||
--connection server_2
|
||||
--source include/stop_slave.inc
|
||||
RESET SLAVE;
|
||||
--source include/start_slave.inc
|
||||
--source include/stop_slave.inc
|
||||
--let $relay_log=query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
|
||||
|
||||
--echo #
|
||||
--echo # Stop slave server
|
||||
--echo #
|
||||
|
||||
--let $datadir = `select @@datadir`
|
||||
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--shutdown_server 10
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--exec sed -i "s/$relay_log/slave-relay-bin.999997/g" $datadir/relay-log.info
|
||||
--exec sed -i "s/$relay_log/slave-relay-bin.999997/g" $datadir/slave-relay-bin.index
|
||||
|
||||
--echo #
|
||||
--echo # Simulate file number get close to 999997
|
||||
--echo # by renaming relay logs and modifying index/info files
|
||||
|
||||
--move_file $datadir/$relay_log $datadir/slave-relay-bin.999997
|
||||
|
||||
--echo #
|
||||
--echo # Restart slave server
|
||||
--echo #
|
||||
|
||||
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
|
||||
--enable_reconnect
|
||||
--source include/wait_until_connected_again.inc
|
||||
SET @save_slave_parallel_threads= @@GLOBAL.slave_parallel_threads;
|
||||
SET @save_max_relay_log_size= @@GLOBAL.max_relay_log_size;
|
||||
|
||||
SET GLOBAL slave_parallel_threads=1;
|
||||
SET GLOBAL max_relay_log_size=100 * 1024;
|
||||
--source include/start_slave.inc
|
||||
|
||||
--connection server_1
|
||||
create table t1 (i int, c varchar(1024));
|
||||
--echo #
|
||||
--echo # Insert some data to generate enough amount of binary logs
|
||||
--echo #
|
||||
--let $count = 1000
|
||||
--disable_query_log
|
||||
while ($count)
|
||||
{
|
||||
eval insert into t1 values (1001 - $count, repeat('a',1000));
|
||||
dec $count;
|
||||
}
|
||||
--enable_query_log
|
||||
--save_master_pos
|
||||
|
||||
--connection server_2
|
||||
--sync_with_master
|
||||
|
||||
--let $relay_log=query_get_value(SHOW SLAVE STATUS, Relay_Log_File, 1)
|
||||
|
||||
--echo #
|
||||
--echo # Assert that 'slave-relay-bin.999999' is purged.
|
||||
--echo #
|
||||
let SEARCH_FILE=$datadir/slave-relay-bin.index;
|
||||
let SEARCH_PATTERN=slave-relay-bin.999999;
|
||||
source include/search_pattern_in_file.inc;
|
||||
|
||||
--source include/stop_slave.inc
|
||||
SET GLOBAL slave_parallel_threads= @save_slave_parallel_threads;
|
||||
SET GLOBAL max_relay_log_size= @save_max_relay_log_size;
|
||||
--source include/start_slave.inc
|
||||
|
||||
--connection server_1
|
||||
DROP TABLE t1;
|
||||
--source include/rpl_end.inc
|
@ -7,11 +7,6 @@ connection slave;
|
||||
--source include/have_innodb.inc
|
||||
connection master;
|
||||
|
||||
# Bug#18326: Do not lock table for writing during prepare of statement
|
||||
# The use of the ps protocol causes extra table maps in the binlog, so
|
||||
# we disable the ps-protocol for this statement.
|
||||
--disable_ps_protocol
|
||||
|
||||
# Set the default storage engine to different values on master and
|
||||
# slave. We need to stop the slave for the server variable to take
|
||||
# effect, since the variable is only read on start-up.
|
||||
|
@ -4,10 +4,4 @@
|
||||
|
||||
let $rename_event_pos= `select @binlog_start_pos + 819`;
|
||||
|
||||
# Bug#18326: Do not lock table for writing during prepare of statement
|
||||
# The use of the ps protocol causes extra table maps in the binlog, so
|
||||
# we disable the ps-protocol for this statement.
|
||||
|
||||
--disable_ps_protocol
|
||||
-- source include/rpl_flsh_tbls.test
|
||||
--enable_ps_protocol
|
||||
|
@ -1 +0,0 @@
|
||||
--innodb
|
@ -260,10 +260,12 @@ DROP TABLE IF EXISTS t1,t2,t3;
|
||||
--echo * sql_mode *
|
||||
|
||||
--connection master
|
||||
SET @old_sql_mode_master= @@global.sql_mode;
|
||||
SET @@global.sql_mode=ANSI;
|
||||
SET @@session.sql_mode=ANSI;
|
||||
|
||||
--connection slave
|
||||
SET @old_sql_mode_slave= @@global.sql_mode;
|
||||
SET @@global.sql_mode=TRADITIONAL;
|
||||
SET @@session.sql_mode=TRADITIONAL;
|
||||
|
||||
@ -292,14 +294,16 @@ DROP TABLE t1;
|
||||
SET @@global.character_set_database=@restore_master_character_set_database;
|
||||
SET @@global.collation_server=@restore_master_collation_server;
|
||||
SET @@global.storage_engine=@restore_master_storage_engine;
|
||||
SET @@global.sql_mode=@old_sql_mode_master;
|
||||
--sync_slave_with_master
|
||||
SET @@global.character_set_database=@restore_slave_character_set_database;
|
||||
SET @@global.collation_server=@restore_slave_collation_server;
|
||||
SET @@global.max_heap_table_size=@restore_slave_max_heap_table_size;
|
||||
SET @@global.storage_engine=@restore_slave_storage_engine;
|
||||
|
||||
SET @@global.sql_mode=@old_sql_mode_slave;
|
||||
# Put at the end since the test otherwise emptied the table.
|
||||
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/words.dat;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/words2.dat;
|
||||
--echo
|
||||
call mtr.add_suppression("The table 't[12]' is full");
|
||||
|
||||
|
@ -18,6 +18,7 @@ connection master;
|
||||
# the option is unknown.
|
||||
#
|
||||
create table t1 (a int not null) ull=12340;
|
||||
alter table t1 ull=12350;
|
||||
show create table t1;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
@ -24,6 +24,8 @@ select * from information_schema.session_variables where variable_name='innodb_i
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_IDLE_FLUSH_PCT 100
|
||||
set global innodb_idle_flush_pct=10;
|
||||
Warnings:
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
select @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
10
|
||||
@ -44,6 +46,7 @@ ERROR 42000: Incorrect argument type to variable 'innodb_idle_flush_pct'
|
||||
set global innodb_idle_flush_pct=-7;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '-7'
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
select @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
0
|
||||
@ -53,6 +56,7 @@ INNODB_IDLE_FLUSH_PCT 0
|
||||
set global innodb_idle_flush_pct=106;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect innodb_idle_flush_pct value: '106'
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
select @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
100
|
||||
@ -60,18 +64,26 @@ select * from information_schema.global_variables where variable_name='innodb_id
|
||||
VARIABLE_NAME VARIABLE_VALUE
|
||||
INNODB_IDLE_FLUSH_PCT 100
|
||||
set global innodb_idle_flush_pct=0;
|
||||
Warnings:
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
select @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
0
|
||||
set global innodb_idle_flush_pct=100;
|
||||
Warnings:
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
select @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
100
|
||||
set global innodb_idle_flush_pct=DEFAULT;
|
||||
Warnings:
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
select @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
100
|
||||
SET @@global.innodb_idle_flush_pct = @start_global_value;
|
||||
Warnings:
|
||||
Warning 131 innodb_idle_flush_pct is DEPRECATED and has no effect.
|
||||
SELECT @@global.innodb_idle_flush_pct;
|
||||
@@global.innodb_idle_flush_pct
|
||||
100
|
||||
|
@ -250,7 +250,7 @@
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
-VARIABLE_TYPE BIGINT UNSIGNED
|
||||
+VARIABLE_TYPE INT UNSIGNED
|
||||
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
|
||||
VARIABLE_COMMENT DEPRECATED. This setting has no effect.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
@@ -1141,22 +1141,22 @@
|
||||
|
@ -1106,7 +1106,7 @@ SESSION_VALUE NULL
|
||||
DEFAULT_VALUE 100
|
||||
VARIABLE_SCOPE GLOBAL
|
||||
VARIABLE_TYPE BIGINT UNSIGNED
|
||||
VARIABLE_COMMENT Up to what percentage of dirty pages should be flushed when innodb finds it has spare resources to do so.
|
||||
VARIABLE_COMMENT DEPRECATED. This setting has no effect.
|
||||
NUMERIC_MIN_VALUE 0
|
||||
NUMERIC_MAX_VALUE 100
|
||||
NUMERIC_BLOCK_SIZE 0
|
||||
|
@ -142,7 +142,7 @@ SELECT @@global.wsrep_sst_auth;
|
||||
SET @@global.wsrep_sst_auth= '';
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
|
||||
NULL
|
||||
SET @@global.wsrep_sst_auth= NULL;
|
||||
SELECT @@global.wsrep_sst_auth;
|
||||
@@global.wsrep_sst_auth
|
||||
|
@ -683,16 +683,30 @@ UPDATE user SET Delete_history_priv = Super_priv WHERE @had_user_delete_history_
|
||||
ALTER TABLE user ADD plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL AFTER max_user_connections,
|
||||
ADD authentication_string TEXT NOT NULL AFTER plugin;
|
||||
ALTER TABLE user CHANGE auth_string authentication_string TEXT NOT NULL;
|
||||
ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL,
|
||||
MODIFY authentication_string TEXT NOT NULL;
|
||||
|
||||
ALTER TABLE user ADD password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER authentication_string;
|
||||
ALTER TABLE user ADD is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER password_expired;
|
||||
ALTER TABLE user ADD default_role char(80) binary DEFAULT '' NOT NULL AFTER is_role;
|
||||
ALTER TABLE user ADD max_statement_time decimal(12,6) DEFAULT 0 NOT NULL AFTER default_role;
|
||||
|
||||
-- Somewhere above, we ran ALTER TABLE user .... CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin.
|
||||
-- we want password_expired column to have collation utf8_general_ci.
|
||||
ALTER TABLE user MODIFY password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
||||
ALTER TABLE user MODIFY is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
|
||||
-- we want password_expired column to have collation utf8_general_ci.
|
||||
-- Order columns correctly that were not ordered until MDEV-23201 (ff8ffef3e1915d7a9caa07d9461cd8d47c4baf98)
|
||||
|
||||
ALTER TABLE user MODIFY plugin char(64) CHARACTER SET latin1 DEFAULT '' NOT NULL AFTER max_user_connections,
|
||||
MODIFY authentication_string TEXT NOT NULL AFTER plugin,
|
||||
MODIFY password_expired ENUM('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER authentication_string,
|
||||
MODIFY is_role enum('N', 'Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL AFTER password_expired,
|
||||
MODIFY default_role char(80) binary DEFAULT '' NOT NULL AFTER is_role,
|
||||
MODIFY max_statement_time decimal(12,6) DEFAULT 0 NOT NULL AFTER default_role,
|
||||
-- MDEV-24122 formerly mysql5.7 users may have the following columns password_last_changed,
|
||||
-- password_lifetime and account_locked. Ensure they are beyond the end of the user columns
|
||||
-- used by MariaDB. MariaDB-10.4 will use these in the creation of mysql.global_priv.
|
||||
-- password_last_changed has a DEFAULT/ON UPDATE of CURRENT_TIMESTAMP to keep track of
|
||||
-- time until 10.4 added.
|
||||
MODIFY IF EXISTS password_last_changed timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER max_statement_time,
|
||||
MODIFY IF EXISTS password_lifetime smallint unsigned DEFAULT NULL AFTER password_last_changed,
|
||||
MODIFY IF EXISTS account_locked enum('N', 'Y') CHARACTER SET utf8 DEFAULT 'N' NOT NULL after password_lifetime;
|
||||
|
||||
-- Need to pre-fill mysql.proxies_priv with access for root even when upgrading from
|
||||
-- older versions
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user