From 5acd391e8b2d4d760ae7f96a59413c9ea247e9b1 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Wed, 4 Sep 2019 04:29:03 +1000 Subject: MDEV-16039 Crash when selecting virtual columns generated using functions with DAYNAME() * Allocate items on thd->mem_root while refixing vcol exprs * Make vcol tree changes register and roll them back after the statement is executed. Explanation: Due to collation implementation specifics an Item tree could change while fixing. The tricky thing here is to make it on a proper arena. It's usually not a problem when a field is deterministic, however, makes a pain vice-versa, during allocation allocating. A non-deterministic field should be refixed on each statement, since it depends on the environment state. Changing the tree will be temporary and therefore it should be reverted after the statement execution. --- mysql-test/suite/gcol/r/gcol_bugfixes.result | 66 ++++++++++++++++++++++++++ mysql-test/suite/gcol/t/gcol_bugfixes.test | 70 ++++++++++++++++++++++++++++ 2 files changed, 136 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result index 9aff30aabc9..8eb7a9372b5 100644 --- a/mysql-test/suite/gcol/r/gcol_bugfixes.result +++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result @@ -603,3 +603,69 @@ test gcol_t1 sidea NEVER NULL test gcol_t1 sideb NEVER NULL test gcol_t1 sidec VIRTUAL GENERATED ALWAYS sqrt(`sidea` * `sidea` + `sideb` * `sideb`) DROP TABLE gcol_t1; +# +# MDEV-16039 Crash when selecting virtual columns +# generated using functions with DAYNAME() +# +CREATE TABLE t1 ( +suppliersenttoday INT NOT NULL, +suppliercaptoday CHAR(10) AS (CONCAT('',DAYNAME('2020-02-05'))) +) COLLATE utf8_bin; +INSERT INTO t1 (suppliersenttoday) VALUES (0); +INSERT INTO t1 (suppliersenttoday) VALUES (0); +SELECT * FROM t1; +suppliersenttoday suppliercaptoday +0 Wednesday +0 Wednesday +PREPARE STMT FROM 'INSERT INTO t1 (suppliersenttoday) VALUES (1)'; +CREATE OR REPLACE TABLE t1 ( +suppliersenttoday INT NOT NULL, +suppliercaptoday CHAR(10) AS (CONCAT('',DAYNAME('2020-02-05'))) +) COLLATE utf8_bin; +EXECUTE STMT; +EXECUTE STMT; +SELECT * FROM t1; +suppliersenttoday suppliercaptoday +1 Wednesday +1 Wednesday +DROP TABLE t1; +# (duplicate) MDEV-20380 Server crash during update +CREATE TABLE gafld ( +nuigafld INTEGER NOT NULL, +ucrgafld VARCHAR(30) COLLATE UTF8_BIN NOT NULL +DEFAULT SUBSTRING_INDEX(USER(),'@',1) +); +EXPLAIN UPDATE gafld SET nuigafld = 0 WHERE nuigafld = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE gafld ALL NULL NULL NULL NULL 1 Using where +EXPLAIN UPDATE gafld SET nuigafld = 0 WHERE nuigafld = 10; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE gafld ALL NULL NULL NULL NULL 1 Using where +DROP TABLE gafld; +# (duplicate) MDEV-17653 replace into generated columns is unstable +# Some columns are snipped from the MDEV test +CREATE TABLE t ( +c0 TIMESTAMP NOT NULL DEFAULT current_timestamp() +ON UPDATE current_timestamp(), +c1 DECIMAL(27,25) GENERATED ALWAYS AS (DAYOFMONTH('2020-02-05')), +c4 TIME NOT NULL, +c8 SMALLINT(6) GENERATED ALWAYS AS +(CONCAT_WS(CONVERT(C1 USING CP932), +'900') <> (c4 = 1)), +PRIMARY KEY (c4) +) DEFAULT CHARSET=latin1; +REPLACE INTO t SET c0 = '2018-06-03 10:31:43', c4 = '02:58:55'; +REPLACE INTO t SET c0 = '2018-06-03 10:31:44', c4 = '02:58:55'; +REPLACE INTO t SET c0 = '2018-06-03 10:31:45', c4 = '02:58:55'; +DROP TABLE t; +# (duplicate) MDEV-17986 crash when I insert on a table +CREATE OR REPLACE TABLE t2 ( +number BIGINT(20) NOT NULL, +lrn BIGINT(20) NOT NULL DEFAULT 0, +source VARCHAR(15) NOT NULL +DEFAULT (REVERSE(SUBSTRING_INDEX(REVERSE(user()), '@', 1))), +PRIMARY KEY (number) +); +REPLACE t2(number) VALUES('1'); +REPLACE t2(number) VALUES('1'); +DROP TABLE t2; diff --git a/mysql-test/suite/gcol/t/gcol_bugfixes.test b/mysql-test/suite/gcol/t/gcol_bugfixes.test index 5563347a02a..033c430853d 100644 --- a/mysql-test/suite/gcol/t/gcol_bugfixes.test +++ b/mysql-test/suite/gcol/t/gcol_bugfixes.test @@ -564,3 +564,73 @@ SELECT table_schema,table_name,column_name,extra,is_generated,generation_express FROM information_schema.columns WHERE table_name='gcol_t1'; DROP TABLE gcol_t1; + +--echo # +--echo # MDEV-16039 Crash when selecting virtual columns +--echo # generated using functions with DAYNAME() +--echo # + +CREATE TABLE t1 ( + suppliersenttoday INT NOT NULL, + suppliercaptoday CHAR(10) AS (CONCAT('',DAYNAME('2020-02-05'))) +) COLLATE utf8_bin; + +INSERT INTO t1 (suppliersenttoday) VALUES (0); +INSERT INTO t1 (suppliersenttoday) VALUES (0); +SELECT * FROM t1; + +PREPARE STMT FROM 'INSERT INTO t1 (suppliersenttoday) VALUES (1)'; + +CREATE OR REPLACE TABLE t1 ( + suppliersenttoday INT NOT NULL, + suppliercaptoday CHAR(10) AS (CONCAT('',DAYNAME('2020-02-05'))) +) COLLATE utf8_bin; + +EXECUTE STMT; +EXECUTE STMT; +SELECT * FROM t1; + +DROP TABLE t1; + +--echo # (duplicate) MDEV-20380 Server crash during update +CREATE TABLE gafld ( + nuigafld INTEGER NOT NULL, + ucrgafld VARCHAR(30) COLLATE UTF8_BIN NOT NULL + DEFAULT SUBSTRING_INDEX(USER(),'@',1) +); +EXPLAIN UPDATE gafld SET nuigafld = 0 WHERE nuigafld = 10; +EXPLAIN UPDATE gafld SET nuigafld = 0 WHERE nuigafld = 10; +DROP TABLE gafld; + +--echo # (duplicate) MDEV-17653 replace into generated columns is unstable +--echo # Some columns are snipped from the MDEV test +CREATE TABLE t ( + c0 TIMESTAMP NOT NULL DEFAULT current_timestamp() + ON UPDATE current_timestamp(), + c1 DECIMAL(27,25) GENERATED ALWAYS AS (DAYOFMONTH('2020-02-05')), + c4 TIME NOT NULL, + c8 SMALLINT(6) GENERATED ALWAYS AS + (CONCAT_WS(CONVERT(C1 USING CP932), + '900') <> (c4 = 1)), + PRIMARY KEY (c4) +) DEFAULT CHARSET=latin1; + +REPLACE INTO t SET c0 = '2018-06-03 10:31:43', c4 = '02:58:55'; +REPLACE INTO t SET c0 = '2018-06-03 10:31:44', c4 = '02:58:55'; +REPLACE INTO t SET c0 = '2018-06-03 10:31:45', c4 = '02:58:55'; + +DROP TABLE t; + +--echo # (duplicate) MDEV-17986 crash when I insert on a table +CREATE OR REPLACE TABLE t2 ( + number BIGINT(20) NOT NULL, + lrn BIGINT(20) NOT NULL DEFAULT 0, + source VARCHAR(15) NOT NULL + DEFAULT (REVERSE(SUBSTRING_INDEX(REVERSE(user()), '@', 1))), + PRIMARY KEY (number) +); + +REPLACE t2(number) VALUES('1'); +REPLACE t2(number) VALUES('1'); + +DROP TABLE t2; -- cgit v1.2.1 From c86accc7ac9ea503dc7988e7921e58a9bf7b2f80 Mon Sep 17 00:00:00 2001 From: Sujatha Date: Mon, 20 Jul 2020 17:57:39 +0530 Subject: MDEV-23108: Point in time recovery of binary log fails when sql_mode=ORACLE Problem: ======== During point in time recovery of binary log syntax error is reported for BEGIN statement and recovery fails. Analysis: ========= In MariaDB 10.3 and later, setting the sql_mode system variable to Oracle allows the server to understand a subset of Oracle's PL/SQL language. When sql_mode=ORACLE is set, it switches the parser from the MariaDB parser to Oracle compatible parser. With this change 'BEGIN' is not considered as 'START TRANSACTION'. Hence the syntax error is reported. Fix: === At preset 'BEGIN' query is generated from 'Gtid_log_event::print'. The current session specific 'sql_mode' information is not present as part of 'Gtid_log_event'. If it was available then, mysqlbinlog tool can make use of 'sql_mode == ORACLE' and can output "START TRANSACTION" in this particular mode and for other sql_modes it will write "BEGIN" as part of output. Since it is not available 'mysqlbinlog' tool will output all 'BEGIN' statements as 'START TRANSACTION' irrespective of 'sql_mode'. --- .../include/binlog_parallel_replication_marks.test | 2 +- mysql-test/main/mysqlbinlog-innodb.result | 8 +- mysql-test/main/mysqlbinlog.result | 74 ++--- mysql-test/main/mysqlbinlog_row_compressed.result | 16 +- mysql-test/main/mysqlbinlog_row_minimal.result | 18 +- mysql-test/main/mysqlbinlog_stmt_compressed.result | 16 +- mysql-test/main/user_var-binlog.result | 4 +- .../suite/binlog/r/binlog_mysqlbinlog2.result | 206 ++++++------ .../suite/binlog/r/binlog_mysqlbinlog_row.result | 358 ++++++++++----------- .../binlog/r/binlog_mysqlbinlog_row_innodb.result | 40 +-- .../binlog/r/binlog_mysqlbinlog_row_myisam.result | 40 +-- .../binlog/r/binlog_mysqlbinlog_row_trans.result | 16 +- .../r/binlog_parallel_replication_marks_row.result | 18 +- ...inlog_parallel_replication_marks_stm_mix.result | 18 +- .../suite/binlog/r/binlog_row_annotate.result | 72 ++--- .../suite/binlog/r/binlog_row_ctype_ucs.result | 14 +- .../binlog/r/binlog_row_mysqlbinlog_options.result | 28 +- .../suite/binlog/r/binlog_stm_ctype_ucs.result | 14 +- mysql-test/suite/binlog/r/flashback.result | 20 +- .../binlog_encryption/binlog_row_annotate.result | 36 +-- .../compat/oracle/r/binlog_ptr_mysqlbinlog.result | 100 ++++++ .../oracle/t/binlog_ptr_mysqlbinlog-master.opt | 1 + .../compat/oracle/t/binlog_ptr_mysqlbinlog.test | 117 +++++++ .../suite/rpl/r/rpl_blackhole_row_annotate.result | 22 +- mysql-test/suite/rpl/r/rpl_hrtime.result | 10 +- mysql-test/suite/rpl/r/rpl_mdev382.result | 10 +- mysql-test/suite/rpl/r/rpl_sp.result | 52 +-- 27 files changed, 774 insertions(+), 556 deletions(-) create mode 100644 mysql-test/suite/compat/oracle/r/binlog_ptr_mysqlbinlog.result create mode 100644 mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog-master.opt create mode 100644 mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog.test (limited to 'mysql-test') diff --git a/mysql-test/include/binlog_parallel_replication_marks.test b/mysql-test/include/binlog_parallel_replication_marks.test index 3976088ca43..29e86d64d3e 100644 --- a/mysql-test/include/binlog_parallel_replication_marks.test +++ b/mysql-test/include/binlog_parallel_replication_marks.test @@ -80,7 +80,7 @@ while () { s/table id \d+/table id #/; s/mapped to number \d+/mapped to number #/; s/CRC32 0x[0-9a-f]+/CRC32 0x########/; - print if /\b(GTID|BEGIN|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY)\b/; + print if /\b(GTID|START TRANSACTION|COMMIT|Table_map|Write_rows|Update_rows|Delete_rows|generated by server|40005 TEMPORARY)\b/; } close F; EOF diff --git a/mysql-test/main/mysqlbinlog-innodb.result b/mysql-test/main/mysqlbinlog-innodb.result index f9f48299f41..9d3bcc7c776 100644 --- a/mysql-test/main/mysqlbinlog-innodb.result +++ b/mysql-test/main/mysqlbinlog-innodb.result @@ -24,7 +24,7 @@ FLUSH LOGS; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -39,7 +39,7 @@ SET @@session.collation_database=DEFAULT/*!*/; INSERT INTO t1 VALUES (1) /*!*/; COMMIT/*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (2) @@ -55,7 +55,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; use `foo`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -70,7 +70,7 @@ SET @@session.collation_database=DEFAULT/*!*/; INSERT INTO t1 VALUES (1) /*!*/; COMMIT/*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (2) diff --git a/mysql-test/main/mysqlbinlog.result b/mysql-test/main/mysqlbinlog.result index decd095bbdf..4c82563e0f6 100644 --- a/mysql-test/main/mysqlbinlog.result +++ b/mysql-test/main/mysqlbinlog.result @@ -37,7 +37,7 @@ create table t1 (word varchar(20)) SET TIMESTAMP=1000000000/*!*/; create table t2 (id int auto_increment not null primary key) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("abirvalg") @@ -45,7 +45,7 @@ insert into t1 values ("abirvalg") SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -54,7 +54,7 @@ insert into t2 values () SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -62,7 +62,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -70,7 +70,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -78,7 +78,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -97,7 +97,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -114,7 +114,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("Alas") @@ -134,7 +134,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; @@ -147,28 +147,28 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -184,7 +184,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -231,7 +231,7 @@ create table t1 (word varchar(20)) SET TIMESTAMP=1000000000/*!*/; create table t2 (id int auto_increment not null primary key) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("abirvalg") @@ -239,7 +239,7 @@ insert into t1 values ("abirvalg") SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -248,7 +248,7 @@ insert into t2 values () SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -256,7 +256,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -264,7 +264,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -272,7 +272,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`) @@ -291,7 +291,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -308,7 +308,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; insert into t1 values ("Alas") @@ -328,7 +328,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.pseudo_thread_id=999999999/*!*/; @@ -341,28 +341,28 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; COMMIT @@ -378,7 +378,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -553,7 +553,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a varchar(64) character set utf8) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) @@ -561,7 +561,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; @@ -570,7 +570,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; @@ -579,7 +579,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) @@ -587,7 +587,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; @@ -596,7 +596,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; @@ -605,7 +605,7 @@ LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FI SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`) diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result index 94125352654..cb8d60704f9 100644 --- a/mysql-test/main/mysqlbinlog_row_compressed.result +++ b/mysql-test/main/mysqlbinlog_row_compressed.result @@ -53,7 +53,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN # at 727 # server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3 /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 769 # at 843 @@ -82,7 +82,7 @@ COMMIT # at 1040 # server id 1 end_log_pos 1082 CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1082 # at 1158 @@ -111,7 +111,7 @@ COMMIT # at 1354 # server id 1 end_log_pos 1396 CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1396 # at 1474 @@ -140,7 +140,7 @@ COMMIT # at 1669 # server id 1 end_log_pos 1711 CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1711 # at 1786 @@ -169,7 +169,7 @@ COMMIT # at 1982 # server id 1 end_log_pos 2024 CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2024 # at 2078 @@ -231,7 +231,7 @@ COMMIT # at 2298 # server id 1 end_log_pos 2340 CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2340 # at 2406 @@ -312,7 +312,7 @@ COMMIT # at 2634 # server id 1 end_log_pos 2676 CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2676 # at 2713 @@ -374,7 +374,7 @@ COMMIT # at 2934 # server id 1 end_log_pos 2976 CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2976 # at 3013 diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result index 6f3dbab55a8..933457edc25 100644 --- a/mysql-test/main/mysqlbinlog_row_minimal.result +++ b/mysql-test/main/mysqlbinlog_row_minimal.result @@ -51,7 +51,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN # at 774 # server id 1 end_log_pos 816 CRC32 XXX GTID 0-1-3 /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 816 # at 890 @@ -80,7 +80,7 @@ COMMIT # at 1088 # server id 1 end_log_pos 1130 CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1130 # at 1206 @@ -109,7 +109,7 @@ COMMIT # at 1403 # server id 1 end_log_pos 1445 CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1445 # at 1523 @@ -138,7 +138,7 @@ COMMIT # at 1719 # server id 1 end_log_pos 1761 CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1761 # at 1836 @@ -167,7 +167,7 @@ COMMIT # at 2035 # server id 1 end_log_pos 2077 CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2077 # at 2131 @@ -229,7 +229,7 @@ COMMIT # at 2427 # server id 1 end_log_pos 2469 CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2469 # at 2535 @@ -262,7 +262,7 @@ COMMIT # at 2730 # server id 1 end_log_pos 2772 CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2772 # at 2809 @@ -292,7 +292,7 @@ COMMIT # at 2992 # server id 1 end_log_pos 3034 CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 3034 # at 3071 @@ -357,7 +357,7 @@ DELIMITER /*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=16*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 429 # at 543 diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.result b/mysql-test/main/mysqlbinlog_stmt_compressed.result index 42717bccd01..654dff9e90d 100644 --- a/mysql-test/main/mysqlbinlog_stmt_compressed.result +++ b/mysql-test/main/mysqlbinlog_stmt_compressed.result @@ -53,7 +53,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN # at 727 # server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3 /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 769 # server id 1 end_log_pos 897 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -68,7 +68,7 @@ COMMIT # at 970 # server id 1 end_log_pos 1012 CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1012 # server id 1 end_log_pos 1140 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -83,7 +83,7 @@ COMMIT # at 1213 # server id 1 end_log_pos 1255 CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1255 # server id 1 end_log_pos 1385 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -98,7 +98,7 @@ COMMIT # at 1458 # server id 1 end_log_pos 1500 CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1500 # server id 1 end_log_pos 1627 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -113,7 +113,7 @@ COMMIT # at 1700 # server id 1 end_log_pos 1742 CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1742 # server id 1 end_log_pos 1850 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -128,7 +128,7 @@ COMMIT # at 1923 # server id 1 end_log_pos 1965 CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 1965 # server id 1 end_log_pos 2082 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -143,7 +143,7 @@ COMMIT # at 2155 # server id 1 end_log_pos 2197 CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2197 # server id 1 end_log_pos 2288 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 @@ -158,7 +158,7 @@ COMMIT # at 2361 # server id 1 end_log_pos 2403 CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at 2403 # server id 1 end_log_pos 2494 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 diff --git a/mysql-test/main/user_var-binlog.result b/mysql-test/main/user_var-binlog.result index 0d8732399c7..0a9fe956aee 100644 --- a/mysql-test/main/user_var-binlog.result +++ b/mysql-test/main/user_var-binlog.result @@ -23,7 +23,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET @`a b`:=_latin1 X'68656C6C6F' COLLATE `latin1_swedish_ci`/*!*/; use `test`/*!*/; @@ -41,7 +41,7 @@ INSERT INTO t1 VALUES(@`a b`) SET TIMESTAMP=10000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET @`var1`:=_latin1 X'273B616161' COLLATE `latin1_swedish_ci`/*!*/; SET @`var2`:=_binary X'61' COLLATE `binary`/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result index 8ecd4d37b1f..2a0e1d3c810 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result @@ -34,7 +34,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -43,7 +43,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -52,7 +52,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -61,7 +61,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -70,7 +70,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -91,7 +91,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; use `test`/*!*/; @@ -109,7 +109,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -118,7 +118,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -127,7 +127,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -136,7 +136,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -157,7 +157,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -175,7 +175,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -184,7 +184,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -217,7 +217,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -226,7 +226,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -247,7 +247,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -274,7 +274,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -292,7 +292,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -301,7 +301,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -334,7 +334,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -343,7 +343,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -377,7 +377,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -386,7 +386,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -395,7 +395,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -404,7 +404,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -413,7 +413,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -424,7 +424,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -454,7 +454,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; use `test`/*!*/; @@ -472,7 +472,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -481,7 +481,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -490,7 +490,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -499,7 +499,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -510,7 +510,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -540,7 +540,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -558,7 +558,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -567,7 +567,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -578,7 +578,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -620,7 +620,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -629,7 +629,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -638,7 +638,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -647,7 +647,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -656,7 +656,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -667,7 +667,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; DELIMITER ; # End of log file @@ -681,7 +681,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -699,7 +699,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -708,7 +708,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -719,7 +719,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -761,7 +761,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -770,7 +770,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -803,7 +803,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -812,7 +812,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -821,7 +821,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -830,7 +830,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -839,7 +839,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -860,7 +860,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; use `test`/*!*/; @@ -878,7 +878,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -887,7 +887,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -896,7 +896,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -905,7 +905,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -925,7 +925,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -943,7 +943,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -952,7 +952,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -985,7 +985,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -994,7 +994,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1014,7 +1014,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -1041,7 +1041,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -1059,7 +1059,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1068,7 +1068,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1101,7 +1101,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1110,7 +1110,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1143,7 +1143,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1152,7 +1152,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1161,7 +1161,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -1170,7 +1170,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1179,7 +1179,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1190,7 +1190,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -1220,7 +1220,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; use `test`/*!*/; @@ -1238,7 +1238,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1247,7 +1247,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -1256,7 +1256,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1265,7 +1265,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1276,7 +1276,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -1305,7 +1305,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -1323,7 +1323,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1332,7 +1332,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1343,7 +1343,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -1385,7 +1385,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1394,7 +1394,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1403,7 +1403,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -1412,7 +1412,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1421,7 +1421,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1444,7 +1444,7 @@ ROLLBACK /* added by mysqlbinlog */; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; use `test`/*!*/; @@ -1462,7 +1462,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1471,7 +1471,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1482,7 +1482,7 @@ COMMIT /*!*/; DELIMITER ; DELIMITER /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; use `test`/*!*/; @@ -1524,7 +1524,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1533,7 +1533,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1566,7 +1566,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a int auto_increment not null primary key, b char(3)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=1/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1575,7 +1575,7 @@ insert into t1 values(null, "a") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=2/*!*/; SET TIMESTAMP=1773142/*!*/; @@ -1584,7 +1584,7 @@ insert into t1 values(null, "b") SET TIMESTAMP=1773142/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=3/*!*/; SET TIMESTAMP=1773144/*!*/; @@ -1593,7 +1593,7 @@ insert into t1 values(null, "c") SET TIMESTAMP=1773144/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=4/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1602,7 +1602,7 @@ insert into t1 values(null, "d") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=5/*!*/; SET TIMESTAMP=1773146/*!*/; @@ -1611,7 +1611,7 @@ insert into t1 values(null, "e") SET TIMESTAMP=1773146/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET INSERT_ID=6/*!*/; SET TIMESTAMP=1773143/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result index 0cc1805eadc..469eb97badc 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result @@ -383,7 +383,7 @@ CREATE TABLE t1 (c01 BIT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -404,7 +404,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -441,7 +441,7 @@ CREATE TABLE t1 (c01 BIT(7)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -462,7 +462,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -483,7 +483,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -504,7 +504,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -525,7 +525,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -546,7 +546,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 /*!100001 SET @@session.gtid_seq_no=11*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -567,7 +567,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 /*!100001 SET @@session.gtid_seq_no=12*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -588,7 +588,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-13 /*!100001 SET @@session.gtid_seq_no=13*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -609,7 +609,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-14 /*!100001 SET @@session.gtid_seq_no=14*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -630,7 +630,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-15 /*!100001 SET @@session.gtid_seq_no=15*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -669,7 +669,7 @@ CREATE TABLE t1 (a BIT(20), b CHAR(2)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-18 /*!100001 SET @@session.gtid_seq_no=18*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -707,7 +707,7 @@ CREATE TABLE t1 (c02 BIT(64)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-21 /*!100001 SET @@session.gtid_seq_no=21*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -728,7 +728,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-22 /*!100001 SET @@session.gtid_seq_no=22*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -749,7 +749,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-23 /*!100001 SET @@session.gtid_seq_no=23*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -770,7 +770,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-24 /*!100001 SET @@session.gtid_seq_no=24*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -807,7 +807,7 @@ CREATE TABLE t1 (c03 TINYINT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-27 /*!100001 SET @@session.gtid_seq_no=27*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -834,7 +834,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-28 /*!100001 SET @@session.gtid_seq_no=28*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -855,7 +855,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-29 /*!100001 SET @@session.gtid_seq_no=29*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -878,7 +878,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-30 /*!100001 SET @@session.gtid_seq_no=30*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -915,7 +915,7 @@ CREATE TABLE t1 (c04 TINYINT UNSIGNED) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-33 /*!100001 SET @@session.gtid_seq_no=33*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -939,7 +939,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-34 /*!100001 SET @@session.gtid_seq_no=34*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -976,7 +976,7 @@ CREATE TABLE t1 (c06 BOOL) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-37 /*!100001 SET @@session.gtid_seq_no=37*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -997,7 +997,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-38 /*!100001 SET @@session.gtid_seq_no=38*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1034,7 +1034,7 @@ CREATE TABLE t1 (c07 SMALLINT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-41 /*!100001 SET @@session.gtid_seq_no=41*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1055,7 +1055,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-42 /*!100001 SET @@session.gtid_seq_no=42*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1092,7 +1092,7 @@ CREATE TABLE t1 (c08 SMALLINT UNSIGNED) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-45 /*!100001 SET @@session.gtid_seq_no=45*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1116,7 +1116,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-46 /*!100001 SET @@session.gtid_seq_no=46*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1139,7 +1139,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-47 /*!100001 SET @@session.gtid_seq_no=47*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1176,7 +1176,7 @@ CREATE TABLE t1 (c10 MEDIUMINT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-50 /*!100001 SET @@session.gtid_seq_no=50*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1197,7 +1197,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-51 /*!100001 SET @@session.gtid_seq_no=51*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1234,7 +1234,7 @@ CREATE TABLE t1 (c11 MEDIUMINT UNSIGNED) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-54 /*!100001 SET @@session.gtid_seq_no=54*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1258,7 +1258,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-55 /*!100001 SET @@session.gtid_seq_no=55*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1281,7 +1281,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-56 /*!100001 SET @@session.gtid_seq_no=56*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1318,7 +1318,7 @@ CREATE TABLE t1 (c13 INT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-59 /*!100001 SET @@session.gtid_seq_no=59*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1339,7 +1339,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-60 /*!100001 SET @@session.gtid_seq_no=60*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1376,7 +1376,7 @@ CREATE TABLE t1 (c14 INT UNSIGNED) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-63 /*!100001 SET @@session.gtid_seq_no=63*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1400,7 +1400,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-64 /*!100001 SET @@session.gtid_seq_no=64*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1423,7 +1423,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-65 /*!100001 SET @@session.gtid_seq_no=65*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1460,7 +1460,7 @@ CREATE TABLE t1 (c16 BIGINT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-68 /*!100001 SET @@session.gtid_seq_no=68*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1481,7 +1481,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-69 /*!100001 SET @@session.gtid_seq_no=69*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1518,7 +1518,7 @@ CREATE TABLE t1 (c17 BIGINT UNSIGNED) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-72 /*!100001 SET @@session.gtid_seq_no=72*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1542,7 +1542,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-73 /*!100001 SET @@session.gtid_seq_no=73*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1565,7 +1565,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-74 /*!100001 SET @@session.gtid_seq_no=74*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1602,7 +1602,7 @@ CREATE TABLE t1 (c19 FLOAT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-77 /*!100001 SET @@session.gtid_seq_no=77*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1623,7 +1623,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-78 /*!100001 SET @@session.gtid_seq_no=78*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1660,7 +1660,7 @@ CREATE TABLE t1 (c22 DOUBLE) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-81 /*!100001 SET @@session.gtid_seq_no=81*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1681,7 +1681,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-82 /*!100001 SET @@session.gtid_seq_no=82*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1718,7 +1718,7 @@ CREATE TABLE t1 (c25 DECIMAL(10,5)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-85 /*!100001 SET @@session.gtid_seq_no=85*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1739,7 +1739,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-86 /*!100001 SET @@session.gtid_seq_no=86*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1760,7 +1760,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-87 /*!100001 SET @@session.gtid_seq_no=87*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1797,7 +1797,7 @@ CREATE TABLE t1 (c28 DATE) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-90 /*!100001 SET @@session.gtid_seq_no=90*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1818,7 +1818,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-91 /*!100001 SET @@session.gtid_seq_no=91*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1855,7 +1855,7 @@ CREATE TABLE t1 (c29 DATETIME) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-94 /*!100001 SET @@session.gtid_seq_no=94*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1876,7 +1876,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-95 /*!100001 SET @@session.gtid_seq_no=95*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1913,7 +1913,7 @@ CREATE TABLE t1 (c30 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-98 /*!100001 SET @@session.gtid_seq_no=98*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1935,7 +1935,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-99 /*!100001 SET @@session.gtid_seq_no=99*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1972,7 +1972,7 @@ CREATE TABLE t1 (c31 TIME) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-102 /*!100001 SET @@session.gtid_seq_no=102*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1993,7 +1993,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-103 /*!100001 SET @@session.gtid_seq_no=103*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2030,7 +2030,7 @@ CREATE TABLE t1 (c32 YEAR) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-106 /*!100001 SET @@session.gtid_seq_no=106*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2051,7 +2051,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-107 /*!100001 SET @@session.gtid_seq_no=107*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2088,7 +2088,7 @@ CREATE TABLE t1 (c33 CHAR) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-110 /*!100001 SET @@session.gtid_seq_no=110*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2109,7 +2109,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-111 /*!100001 SET @@session.gtid_seq_no=111*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2146,7 +2146,7 @@ CREATE TABLE t1 (c34 CHAR(0)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-114 /*!100001 SET @@session.gtid_seq_no=114*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2167,7 +2167,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-115 /*!100001 SET @@session.gtid_seq_no=115*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2204,7 +2204,7 @@ CREATE TABLE t1 (c35 CHAR(1)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-118 /*!100001 SET @@session.gtid_seq_no=118*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2225,7 +2225,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-119 /*!100001 SET @@session.gtid_seq_no=119*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2262,7 +2262,7 @@ CREATE TABLE t1 (c36 CHAR(255)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-122 /*!100001 SET @@session.gtid_seq_no=122*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2283,7 +2283,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-123 /*!100001 SET @@session.gtid_seq_no=123*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2320,7 +2320,7 @@ CREATE TABLE t1 (c37 NATIONAL CHAR) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-126 /*!100001 SET @@session.gtid_seq_no=126*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2341,7 +2341,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-127 /*!100001 SET @@session.gtid_seq_no=127*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2378,7 +2378,7 @@ CREATE TABLE t1 (c38 NATIONAL CHAR(0)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-130 /*!100001 SET @@session.gtid_seq_no=130*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2399,7 +2399,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-131 /*!100001 SET @@session.gtid_seq_no=131*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2436,7 +2436,7 @@ CREATE TABLE t1 (c39 NATIONAL CHAR(1)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-134 /*!100001 SET @@session.gtid_seq_no=134*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2457,7 +2457,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-135 /*!100001 SET @@session.gtid_seq_no=135*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2494,7 +2494,7 @@ CREATE TABLE t1 (c40 NATIONAL CHAR(255)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-138 /*!100001 SET @@session.gtid_seq_no=138*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2515,7 +2515,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-139 /*!100001 SET @@session.gtid_seq_no=139*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2536,7 +2536,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-140 /*!100001 SET @@session.gtid_seq_no=140*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2576,7 +2576,7 @@ CREATE TABLE t1 (c41 CHAR CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-143 /*!100001 SET @@session.gtid_seq_no=143*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2597,7 +2597,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-144 /*!100001 SET @@session.gtid_seq_no=144*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2634,7 +2634,7 @@ CREATE TABLE t1 (c42 CHAR(0) CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-147 /*!100001 SET @@session.gtid_seq_no=147*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2655,7 +2655,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-148 /*!100001 SET @@session.gtid_seq_no=148*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2692,7 +2692,7 @@ CREATE TABLE t1 (c43 CHAR(1) CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-151 /*!100001 SET @@session.gtid_seq_no=151*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2713,7 +2713,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-152 /*!100001 SET @@session.gtid_seq_no=152*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2750,7 +2750,7 @@ CREATE TABLE t1 (c44 CHAR(255) CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-155 /*!100001 SET @@session.gtid_seq_no=155*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2771,7 +2771,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-156 /*!100001 SET @@session.gtid_seq_no=156*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2792,7 +2792,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-157 /*!100001 SET @@session.gtid_seq_no=157*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2832,7 +2832,7 @@ CREATE TABLE t1 (c45 VARCHAR(0)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-160 /*!100001 SET @@session.gtid_seq_no=160*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2853,7 +2853,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-161 /*!100001 SET @@session.gtid_seq_no=161*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2890,7 +2890,7 @@ CREATE TABLE t1 (c46 VARCHAR(1)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-164 /*!100001 SET @@session.gtid_seq_no=164*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2911,7 +2911,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-165 /*!100001 SET @@session.gtid_seq_no=165*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2948,7 +2948,7 @@ CREATE TABLE t1 (c47 VARCHAR(255)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-168 /*!100001 SET @@session.gtid_seq_no=168*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2969,7 +2969,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-169 /*!100001 SET @@session.gtid_seq_no=169*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3006,7 +3006,7 @@ CREATE TABLE t1 (c48 VARCHAR(261)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-172 /*!100001 SET @@session.gtid_seq_no=172*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3027,7 +3027,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-173 /*!100001 SET @@session.gtid_seq_no=173*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3064,7 +3064,7 @@ CREATE TABLE t1 (c49 NATIONAL VARCHAR(0)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-176 /*!100001 SET @@session.gtid_seq_no=176*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3085,7 +3085,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-177 /*!100001 SET @@session.gtid_seq_no=177*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3122,7 +3122,7 @@ CREATE TABLE t1 (c50 NATIONAL VARCHAR(1)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-180 /*!100001 SET @@session.gtid_seq_no=180*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3143,7 +3143,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-181 /*!100001 SET @@session.gtid_seq_no=181*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3180,7 +3180,7 @@ CREATE TABLE t1 (c51 NATIONAL VARCHAR(255)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-184 /*!100001 SET @@session.gtid_seq_no=184*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3201,7 +3201,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-185 /*!100001 SET @@session.gtid_seq_no=185*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3222,7 +3222,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-186 /*!100001 SET @@session.gtid_seq_no=186*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3262,7 +3262,7 @@ CREATE TABLE t1 (c52 NATIONAL VARCHAR(261)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-189 /*!100001 SET @@session.gtid_seq_no=189*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3283,7 +3283,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-190 /*!100001 SET @@session.gtid_seq_no=190*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3304,7 +3304,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-191 /*!100001 SET @@session.gtid_seq_no=191*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3344,7 +3344,7 @@ CREATE TABLE t1 (c53 VARCHAR(0) CHARACTER SET ucs2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-194 /*!100001 SET @@session.gtid_seq_no=194*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3365,7 +3365,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-195 /*!100001 SET @@session.gtid_seq_no=195*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3402,7 +3402,7 @@ CREATE TABLE t1 (c54 VARCHAR(1) CHARACTER SET ucs2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-198 /*!100001 SET @@session.gtid_seq_no=198*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3423,7 +3423,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-199 /*!100001 SET @@session.gtid_seq_no=199*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3460,7 +3460,7 @@ CREATE TABLE t1 (c55 VARCHAR(255) CHARACTER SET ucs2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-202 /*!100001 SET @@session.gtid_seq_no=202*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3481,7 +3481,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-203 /*!100001 SET @@session.gtid_seq_no=203*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3518,7 +3518,7 @@ CREATE TABLE t1 (c56 VARCHAR(261) CHARACTER SET ucs2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-206 /*!100001 SET @@session.gtid_seq_no=206*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3539,7 +3539,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-207 /*!100001 SET @@session.gtid_seq_no=207*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3576,7 +3576,7 @@ CREATE TABLE t1 (c57 BINARY) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-210 /*!100001 SET @@session.gtid_seq_no=210*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3597,7 +3597,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-211 /*!100001 SET @@session.gtid_seq_no=211*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3618,7 +3618,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-212 /*!100001 SET @@session.gtid_seq_no=212*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3639,7 +3639,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-213 /*!100001 SET @@session.gtid_seq_no=213*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3676,7 +3676,7 @@ CREATE TABLE t1 (c58 BINARY(0)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-216 /*!100001 SET @@session.gtid_seq_no=216*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3697,7 +3697,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-217 /*!100001 SET @@session.gtid_seq_no=217*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3734,7 +3734,7 @@ CREATE TABLE t1 (c59 BINARY(1)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-220 /*!100001 SET @@session.gtid_seq_no=220*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3755,7 +3755,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-221 /*!100001 SET @@session.gtid_seq_no=221*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3776,7 +3776,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-222 /*!100001 SET @@session.gtid_seq_no=222*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3797,7 +3797,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-223 /*!100001 SET @@session.gtid_seq_no=223*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3834,7 +3834,7 @@ CREATE TABLE t1 (c60 BINARY(255)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-226 /*!100001 SET @@session.gtid_seq_no=226*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3855,7 +3855,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-227 /*!100001 SET @@session.gtid_seq_no=227*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3876,7 +3876,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-228 /*!100001 SET @@session.gtid_seq_no=228*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3897,7 +3897,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-229 /*!100001 SET @@session.gtid_seq_no=229*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3934,7 +3934,7 @@ CREATE TABLE t1 (c61 VARBINARY(0)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-232 /*!100001 SET @@session.gtid_seq_no=232*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3955,7 +3955,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-233 /*!100001 SET @@session.gtid_seq_no=233*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3992,7 +3992,7 @@ CREATE TABLE t1 (c62 VARBINARY(1)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-236 /*!100001 SET @@session.gtid_seq_no=236*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4013,7 +4013,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-237 /*!100001 SET @@session.gtid_seq_no=237*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4034,7 +4034,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-238 /*!100001 SET @@session.gtid_seq_no=238*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4055,7 +4055,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-239 /*!100001 SET @@session.gtid_seq_no=239*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4092,7 +4092,7 @@ CREATE TABLE t1 (c63 VARBINARY(255)) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-242 /*!100001 SET @@session.gtid_seq_no=242*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4113,7 +4113,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-243 /*!100001 SET @@session.gtid_seq_no=243*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4134,7 +4134,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-244 /*!100001 SET @@session.gtid_seq_no=244*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4155,7 +4155,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-245 /*!100001 SET @@session.gtid_seq_no=245*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4192,7 +4192,7 @@ CREATE TABLE t1 (c65 TINYBLOB) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-248 /*!100001 SET @@session.gtid_seq_no=248*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4213,7 +4213,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-249 /*!100001 SET @@session.gtid_seq_no=249*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4250,7 +4250,7 @@ CREATE TABLE t1 (c68 BLOB) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-252 /*!100001 SET @@session.gtid_seq_no=252*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4271,7 +4271,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-253 /*!100001 SET @@session.gtid_seq_no=253*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4308,7 +4308,7 @@ CREATE TABLE t1 (c71 MEDIUMBLOB) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-256 /*!100001 SET @@session.gtid_seq_no=256*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4329,7 +4329,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-257 /*!100001 SET @@session.gtid_seq_no=257*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4366,7 +4366,7 @@ CREATE TABLE t1 (c74 LONGBLOB) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-260 /*!100001 SET @@session.gtid_seq_no=260*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4387,7 +4387,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-261 /*!100001 SET @@session.gtid_seq_no=261*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4424,7 +4424,7 @@ CREATE TABLE t1 (c66 TINYTEXT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-264 /*!100001 SET @@session.gtid_seq_no=264*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4445,7 +4445,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-265 /*!100001 SET @@session.gtid_seq_no=265*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4482,7 +4482,7 @@ CREATE TABLE t1 (c69 TEXT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-268 /*!100001 SET @@session.gtid_seq_no=268*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4503,7 +4503,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-269 /*!100001 SET @@session.gtid_seq_no=269*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4540,7 +4540,7 @@ CREATE TABLE t1 (c72 MEDIUMTEXT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-272 /*!100001 SET @@session.gtid_seq_no=272*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4561,7 +4561,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-273 /*!100001 SET @@session.gtid_seq_no=273*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4598,7 +4598,7 @@ CREATE TABLE t1 (c75 LONGTEXT) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-276 /*!100001 SET @@session.gtid_seq_no=276*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4619,7 +4619,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-277 /*!100001 SET @@session.gtid_seq_no=277*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4656,7 +4656,7 @@ CREATE TABLE t1 (c67 TINYTEXT CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-280 /*!100001 SET @@session.gtid_seq_no=280*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4677,7 +4677,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-281 /*!100001 SET @@session.gtid_seq_no=281*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4714,7 +4714,7 @@ CREATE TABLE t1 (c70 TEXT CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-284 /*!100001 SET @@session.gtid_seq_no=284*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4735,7 +4735,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-285 /*!100001 SET @@session.gtid_seq_no=285*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4772,7 +4772,7 @@ CREATE TABLE t1 (c73 MEDIUMTEXT CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-288 /*!100001 SET @@session.gtid_seq_no=288*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4793,7 +4793,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-289 /*!100001 SET @@session.gtid_seq_no=289*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4830,7 +4830,7 @@ CREATE TABLE t1 (c76 LONGTEXT CHARACTER SET UCS2) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-292 /*!100001 SET @@session.gtid_seq_no=292*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4851,7 +4851,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-293 /*!100001 SET @@session.gtid_seq_no=293*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4888,7 +4888,7 @@ CREATE TABLE t1 (c77 ENUM('a','b','c')) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-296 /*!100001 SET @@session.gtid_seq_no=296*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4909,7 +4909,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-297 /*!100001 SET @@session.gtid_seq_no=297*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4946,7 +4946,7 @@ CREATE TABLE t1 (c78 SET('a','b','c','d','e','f')) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-300 /*!100001 SET @@session.gtid_seq_no=300*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4967,7 +4967,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-301 /*!100001 SET @@session.gtid_seq_no=301*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4988,7 +4988,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-302 /*!100001 SET @@session.gtid_seq_no=302*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5009,7 +5009,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-303 /*!100001 SET @@session.gtid_seq_no=303*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5030,7 +5030,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-304 /*!100001 SET @@session.gtid_seq_no=304*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5051,7 +5051,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-305 /*!100001 SET @@session.gtid_seq_no=305*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5072,7 +5072,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-306 /*!100001 SET @@session.gtid_seq_no=306*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5093,7 +5093,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-307 /*!100001 SET @@session.gtid_seq_no=307*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5138,7 +5138,7 @@ CREATE TABLE t2 (a int NOT NULL DEFAULT 0, b int NOT NULL DEFAULT 0) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-311 /*!100001 SET @@session.gtid_seq_no=311*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5160,7 +5160,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-312 /*!100001 SET @@session.gtid_seq_no=312*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5182,7 +5182,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-313 /*!100001 SET @@session.gtid_seq_no=313*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5204,7 +5204,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-314 /*!100001 SET @@session.gtid_seq_no=314*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5226,7 +5226,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-315 /*!100001 SET @@session.gtid_seq_no=315*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5294,7 +5294,7 @@ c_text_utf8 blob ) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-318 /*!100001 SET @@session.gtid_seq_no=318*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5347,7 +5347,7 @@ DELIMITER /*!*/; /*!100001 SET @@session.gtid_domain_id=0*//*!*/; /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=320*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result index 22309e964be..d8a5864ba3d 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -2368,7 +2368,7 @@ crn INT -- row number # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2550,7 +2550,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2732,7 +2732,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3080,7 +3080,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3420,7 +3420,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3765,7 +3765,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 trans /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4108,7 +4108,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 trans /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4454,7 +4454,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 trans /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4634,7 +4634,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 trans /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4811,7 +4811,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 trans /*!100001 SET @@session.gtid_seq_no=11*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4991,7 +4991,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 trans /*!100001 SET @@session.gtid_seq_no=12*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5293,7 +5293,7 @@ crn INT -- row number # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5363,7 +5363,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5442,7 +5442,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5717,7 +5717,7 @@ c_3_n INT -- row number # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5787,7 +5787,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5857,7 +5857,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5927,7 +5927,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 trans /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -6117,7 +6117,7 @@ COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 trans /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -6331,7 +6331,7 @@ c3 VARCHAR(60) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result index 8091242dab7..a75593055d7 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -2368,7 +2368,7 @@ crn INT -- row number # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2553,7 +2553,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -2737,7 +2737,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3087,7 +3087,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3429,7 +3429,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -3776,7 +3776,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4121,7 +4121,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4469,7 +4469,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4651,7 +4651,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -4830,7 +4830,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 /*!100001 SET @@session.gtid_seq_no=11*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5012,7 +5012,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 /*!100001 SET @@session.gtid_seq_no=12*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5316,7 +5316,7 @@ crn INT -- row number # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5388,7 +5388,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5469,7 +5469,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5746,7 +5746,7 @@ c_3_n INT -- row number # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5818,7 +5818,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5890,7 +5890,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -5962,7 +5962,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -6154,7 +6154,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -6370,7 +6370,7 @@ c3 VARCHAR(60) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result index 28070fab374..545cb8f7857 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result @@ -172,7 +172,7 @@ c2 VARCHAR(20) # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -257,7 +257,7 @@ TRUNCATE TABLE t1 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -287,7 +287,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -326,7 +326,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -348,7 +348,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 trans /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -433,7 +433,7 @@ TRUNCATE TABLE t2 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 /*!100001 SET @@session.gtid_seq_no=12*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -463,7 +463,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-13 /*!100001 SET @@session.gtid_seq_no=13*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -502,7 +502,7 @@ COMMIT # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-14 /*!100001 SET @@session.gtid_seq_no=14*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result index c4a1ba9b83b..bca96dd5fd0 100644 --- a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result +++ b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result @@ -38,13 +38,13 @@ disconnect tmp_con; connection default; FLUSH LOGS; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (1,0) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (2,0) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F @@ -52,13 +52,13 @@ COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl /* GTID */ ALTER TABLE t1 ADD c INT # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (3,0,0) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ UPDATE t1 SET b=1, c=1 WHERE a=2 # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Update_rows: table id # flags: STMT_END_F @@ -70,7 +70,7 @@ BEGIN # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ DELETE FROM t1 WHERE a=5 # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Delete_rows: table id # flags: STMT_END_F @@ -82,25 +82,25 @@ BEGIN # server id 1 end_log_pos # CRC32 0x######## Update_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (8, 5, 0) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (9, 5, 1) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (10, 6, 0) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION #Q> /* GTID */ INSERT INTO t1 VALUES (11, 7, 0) # server id 1 end_log_pos # CRC32 0x######## Table_map: `test`.`t1` mapped to number # # server id 1 end_log_pos # CRC32 0x######## Write_rows: table id # flags: STMT_END_F diff --git a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result index c56dff9c8a0..4a6cd6f4ac0 100644 --- a/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result +++ b/mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result @@ -38,21 +38,21 @@ disconnect tmp_con; connection default; FLUSH LOGS; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION /* GTID */ INSERT INTO t1 VALUES (1,0) COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION /* GTID */ INSERT INTO t1 VALUES (2,0) COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl /* GTID */ ALTER TABLE t1 ADD c INT # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION /* GTID */ INSERT INTO t1 VALUES (3,0,0) COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl -BEGIN +START TRANSACTION /* GTID */ UPDATE t1 SET b=1, c=1 WHERE a=2 /* GTID */ CREATE TEMPORARY TABLE t2 (a INT PRIMARY KEY, b INT) ENGINE=InnoDB /* GTID */ INSERT INTO t2 VALUES (4,10), (5,20) @@ -63,7 +63,7 @@ COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl /* GTID */ CREATE TEMPORARY TABLE t3 (a INT PRIMARY KEY) ENGINE=InnoDB # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl -BEGIN +START TRANSACTION /* GTID */ DELETE FROM t1 WHERE a=5 /* GTID */ INSERT INTO t3 VALUES (7) /* GTID */ INSERT INTO t1 SELECT a, 4, 0 FROM t3 @@ -73,21 +73,21 @@ COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl /* GTID */ CREATE TEMPORARY TABLE t4 (a INT PRIMARY KEY) ENGINE=InnoDB # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION /* GTID */ INSERT INTO t1 VALUES (8, 5, 0) COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl /* GTID */ ALTER TABLE t4 ADD b INT # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION /* GTID */ INSERT INTO t1 VALUES (9, 5, 1) COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# trans -BEGIN +START TRANSACTION /* GTID */ INSERT INTO t1 VALUES (10, 6, 0) COMMIT/*!*/; # server id 1 end_log_pos # CRC32 0x######## GTID #-#-# ddl -BEGIN +START TRANSACTION /* GTID */ CREATE TEMPORARY TABLE t5 (a INT PRIMARY KEY) ENGINE=InnoDB /* GTID */ INSERT INTO t1 VALUES (11, 7, 0) COMMIT/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result index bbdfe547b18..e65569853aa 100644 --- a/mysql-test/suite/binlog/r/binlog_row_annotate.result +++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result @@ -144,7 +144,7 @@ CREATE DATABASE test3 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -171,7 +171,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -198,7 +198,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -225,7 +225,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -267,7 +267,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -294,7 +294,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -374,7 +374,7 @@ CREATE DATABASE test1 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -401,7 +401,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -414,7 +414,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -427,7 +427,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -458,7 +458,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -471,7 +471,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -542,7 +542,7 @@ CREATE DATABASE test3 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -567,7 +567,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -592,7 +592,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -617,7 +617,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -655,7 +655,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -680,7 +680,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -768,7 +768,7 @@ CREATE DATABASE test3 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -795,7 +795,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -822,7 +822,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -849,7 +849,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -891,7 +891,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -918,7 +918,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -998,7 +998,7 @@ CREATE DATABASE test1 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1025,7 +1025,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1038,7 +1038,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1051,7 +1051,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1082,7 +1082,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1095,7 +1095,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -1166,7 +1166,7 @@ CREATE DATABASE test3 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # @@ -1190,7 +1190,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # @@ -1214,7 +1214,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test3`.`t3` mapped to number # @@ -1238,7 +1238,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # @@ -1275,7 +1275,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # @@ -1299,7 +1299,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result index 9e95f0a365e..0fe726766d2 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -16,7 +16,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; # Annotate_rows: #Q> insert into t2 values (@v) @@ -104,7 +104,7 @@ CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8) # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -125,7 +125,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -146,7 +146,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -167,7 +167,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -188,7 +188,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -209,7 +209,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result index 8b138c461ab..0232443573a 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -62,7 +62,7 @@ CREATE TABLE t1 (a INT, b INT) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -97,7 +97,7 @@ CREATE TABLE t2 (a INT) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -121,7 +121,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -152,7 +152,7 @@ CREATE TABLE t3 (a INT) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -176,7 +176,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -198,7 +198,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -237,7 +237,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -303,7 +303,7 @@ CREATE TABLE t1 (a INT, b INT) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -338,7 +338,7 @@ CREATE TABLE t2 (a INT) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -362,7 +362,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -393,7 +393,7 @@ CREATE TABLE t3 (a INT) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -417,7 +417,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -439,7 +439,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -478,7 +478,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result index 00f7ce6ead0..05b1520724a 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -15,7 +15,7 @@ flush logs; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; SET @`v`:=_ucs2 X'006100620063' COLLATE `ucs2_general_ci`/*!*/; use `test`/*!*/; @@ -106,7 +106,7 @@ CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8) # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -121,7 +121,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -136,7 +136,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -151,7 +151,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -166,7 +166,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -181,7 +181,7 @@ COMMIT # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# /*!100001 SET @@session.gtid_seq_no=#*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result index bdffaabd673..eaced02b7a9 100644 --- a/mysql-test/suite/binlog/r/flashback.result +++ b/mysql-test/suite/binlog/r/flashback.result @@ -81,7 +81,7 @@ c08 TEXT # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans /*!100001 SET @@session.gtid_seq_no=2*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -107,7 +107,7 @@ COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -133,7 +133,7 @@ COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -159,7 +159,7 @@ COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -213,7 +213,7 @@ COMMIT/*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -296,7 +296,7 @@ ROLLBACK/*!*/; # Number of rows: 3 #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4 #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # -BEGIN/*!*/; +START TRANSACTION/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F ### INSERT INTO `test`.`t1` ### SET @@ -331,7 +331,7 @@ BEGIN/*!*/; COMMIT /*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # -BEGIN/*!*/; +START TRANSACTION/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F ### UPDATE `test`.`t1` ### WHERE @@ -374,7 +374,7 @@ BEGIN/*!*/; COMMIT /*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # -BEGIN/*!*/; +START TRANSACTION/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE @@ -389,7 +389,7 @@ BEGIN/*!*/; COMMIT /*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # -BEGIN/*!*/; +START TRANSACTION/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE @@ -404,7 +404,7 @@ BEGIN/*!*/; COMMIT /*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Xid = # -BEGIN/*!*/; +START TRANSACTION/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F ### DELETE FROM `test`.`t1` ### WHERE diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result index b783488b07a..004f163f192 100644 --- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result +++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result @@ -148,7 +148,7 @@ CREATE DATABASE test3 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -175,7 +175,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -202,7 +202,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -229,7 +229,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -271,7 +271,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -298,7 +298,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -381,7 +381,7 @@ CREATE DATABASE test1 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -408,7 +408,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -421,7 +421,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -434,7 +434,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -465,7 +465,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -478,7 +478,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -552,7 +552,7 @@ CREATE DATABASE test3 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # @@ -576,7 +576,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # @@ -600,7 +600,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test3`.`t3` mapped to number # @@ -624,7 +624,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number # @@ -661,7 +661,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 /*!100001 SET @@session.gtid_seq_no=8*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # @@ -685,7 +685,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # #010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number # diff --git a/mysql-test/suite/compat/oracle/r/binlog_ptr_mysqlbinlog.result b/mysql-test/suite/compat/oracle/r/binlog_ptr_mysqlbinlog.result new file mode 100644 index 00000000000..0656a685976 --- /dev/null +++ b/mysql-test/suite/compat/oracle/r/binlog_ptr_mysqlbinlog.result @@ -0,0 +1,100 @@ +SET @@SQL_MODE = 'ORACLE'; +########################################################################## +# Test verifies Gtid_log_event/Xid_log_event specific print # +########################################################################## +CREATE TABLE tm (f INT) ENGINE=MYISAM; +INSERT INTO tm VALUES (10); +CREATE TABLE t(f INT) ENGINE=INNODB; +INSERT INTO t VALUES (10); +CREATE OR REPLACE PROCEDURE simpleproc (param1 OUT INT) AS +BEGIN +SELECT COUNT(*) INTO param1 FROM t; +END; +/ +CREATE FUNCTION f1 RETURN INT +AS +BEGIN +RETURN 10; +END; +/ +FLUSH LOGS; +########################################################################## +# Delete data from master so that it can be restored from binlog # +########################################################################## +DROP FUNCTION f1; +DROP PROCEDURE simpleproc; +DROP TABLE tm; +DROP TABLE t; +########################################################################## +# Post recovery using mysqlbinlog # +########################################################################## +SHOW TABLES; +Tables_in_test +t +tm +SELECT * FROM tm; +f +10 +SELECT * FROM t; +f +10 +SELECT f1(); +f1() +10 +CALL simpleproc(@a); +SELECT @a; +@a +1 +"***** Clean Up *****" +DROP TABLE t,tm; +DROP PROCEDURE simpleproc; +DROP FUNCTION f1; +RESET MASTER; +########################################################################## +# Test verifies Gtid_log_event/Xid_log_event/Qery_log_event # +# specific print along with flashback option # +########################################################################## +CREATE TABLE tm(f INT) ENGINE=MYISAM; +INSERT INTO tm VALUES (10); +INSERT INTO tm VALUES (20); +CREATE TABLE t(f INT) ENGINE=INNODB; +INSERT INTO t VALUES (10); +INSERT INTO t VALUES (20); +########################################################################## +# Initial data # +########################################################################## +SELECT * FROM tm; +f +10 +20 +SELECT * FROM t; +f +10 +20 +FLUSH LOGS; +DELETE FROM tm WHERE f=20; +DELETE FROM t WHERE f=20; +FLUSH LOGS; +########################################################################## +# Data after deletion # +########################################################################## +SELECT * FROM tm; +f +10 +SELECT * FROM t; +f +10 +FOUND 2 /START TRANSACTION/ in test.sql +########################################################################## +# Data after recovery using flashback # +########################################################################## +SELECT * FROM tm; +f +10 +20 +SELECT * FROM t; +f +10 +20 +"***** Clean Up *****" +DROP TABLE t,tm; diff --git a/mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog-master.opt b/mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog-master.opt new file mode 100644 index 00000000000..8f0cc182f51 --- /dev/null +++ b/mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog-master.opt @@ -0,0 +1 @@ +--flashback diff --git a/mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog.test b/mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog.test new file mode 100644 index 00000000000..bda32af5d4e --- /dev/null +++ b/mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog.test @@ -0,0 +1,117 @@ +# ==== Purpose ==== +# +# Test verifies that point in time recovery of binary log works when +# sql_mode='ORACLE'. +# +# BEGIN statement is printed in three places +# 1) "Gtid_log_event::print" +# 2) "Xid_log_event::print" if flashback is enabled +# 3) "Query_log_event::print" if flashback is enabled and engine is +# non-transacional. +# +# Test verifies all these cases. +# +# ==== References ==== +# +# MDEV-23108: Point in time recovery of binary log fails when sql_mode=ORACLE +# +--source include/have_log_bin.inc +--source include/have_innodb.inc + +let $MYSQLD_DATADIR= `select @@datadir`; +SET @@SQL_MODE = 'ORACLE'; + +--echo ########################################################################## +--echo # Test verifies Gtid_log_event/Xid_log_event specific print # +--echo ########################################################################## +CREATE TABLE tm (f INT) ENGINE=MYISAM; +INSERT INTO tm VALUES (10); + +CREATE TABLE t(f INT) ENGINE=INNODB; +INSERT INTO t VALUES (10); + +DELIMITER /; +CREATE OR REPLACE PROCEDURE simpleproc (param1 OUT INT) AS + BEGIN + SELECT COUNT(*) INTO param1 FROM t; + END; +/ +CREATE FUNCTION f1 RETURN INT +AS +BEGIN + RETURN 10; +END; +/ +DELIMITER ;/ + +FLUSH LOGS; +--echo ########################################################################## +--echo # Delete data from master so that it can be restored from binlog # +--echo ########################################################################## +DROP FUNCTION f1; +DROP PROCEDURE simpleproc; +DROP TABLE tm; +DROP TABLE t; + +--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/test.sql +--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/test.sql + +--echo ########################################################################## +--echo # Post recovery using mysqlbinlog # +--echo ########################################################################## +SHOW TABLES; +SELECT * FROM tm; +SELECT * FROM t; +--horizontal_results +SELECT f1(); +CALL simpleproc(@a); +SELECT @a; + +--echo "***** Clean Up *****" +DROP TABLE t,tm; +DROP PROCEDURE simpleproc; +DROP FUNCTION f1; +--remove_file $MYSQLTEST_VARDIR/tmp/test.sql +RESET MASTER; + +--echo ########################################################################## +--echo # Test verifies Gtid_log_event/Xid_log_event/Qery_log_event # +--echo # specific print along with flashback option # +--echo ########################################################################## +CREATE TABLE tm(f INT) ENGINE=MYISAM; +INSERT INTO tm VALUES (10); +INSERT INTO tm VALUES (20); +CREATE TABLE t(f INT) ENGINE=INNODB; +INSERT INTO t VALUES (10); +INSERT INTO t VALUES (20); +--echo ########################################################################## +--echo # Initial data # +--echo ########################################################################## +SELECT * FROM tm; +SELECT * FROM t; +FLUSH LOGS; +DELETE FROM tm WHERE f=20; +DELETE FROM t WHERE f=20; +FLUSH LOGS; + +--echo ########################################################################## +--echo # Data after deletion # +--echo ########################################################################## +SELECT * FROM tm; +SELECT * FROM t; +--exec $MYSQL_BINLOG --flashback $MYSQLD_DATADIR/master-bin.000002 > $MYSQLTEST_VARDIR/tmp/test.sql + +--let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/test.sql +--let SEARCH_PATTERN=START TRANSACTION +--source include/search_pattern_in_file.inc +--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/test.sql + +--echo ########################################################################## +--echo # Data after recovery using flashback # +--echo ########################################################################## +SELECT * FROM tm; +SELECT * FROM t; + +--echo "***** Clean Up *****" +DROP TABLE t,tm; +--remove_file $MYSQLTEST_VARDIR/tmp/test.sql diff --git a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result index 3c5711855d8..2e75080810b 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result @@ -230,7 +230,7 @@ ALTER TABLE t1 ENGINE=BLACKHOLE #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 trans /*!100001 SET @@session.server_id=1*//*!*/; /*!100001 SET @@session.gtid_seq_no=3*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -248,7 +248,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4 trans /*!100001 SET @@session.gtid_seq_no=4*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -266,7 +266,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5 trans /*!100001 SET @@session.gtid_seq_no=5*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -284,7 +284,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 trans /*!100001 SET @@session.gtid_seq_no=6*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -302,7 +302,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7 trans /*!100001 SET @@session.gtid_seq_no=7*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -328,7 +328,7 @@ ALTER TABLE t1 ADD PRIMARY KEY pk_t1 (a,b) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9 trans /*!100001 SET @@session.gtid_seq_no=9*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -346,7 +346,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10 trans /*!100001 SET @@session.gtid_seq_no=10*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -364,7 +364,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-11 trans /*!100001 SET @@session.gtid_seq_no=11*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -390,7 +390,7 @@ ALTER TABLE t1 DROP PRIMARY KEY, ADD KEY key_t1 (a) # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-13 trans /*!100001 SET @@session.gtid_seq_no=13*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -408,7 +408,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-14 trans /*!100001 SET @@session.gtid_seq_no=14*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # @@ -426,7 +426,7 @@ COMMIT # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-15 trans /*!100001 SET @@session.gtid_seq_no=15*//*!*/; -BEGIN +START TRANSACTION /*!*/; # at # # at # diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result index 7717dcf6700..d878a8d9df9 100644 --- a/mysql-test/suite/rpl/r/rpl_hrtime.result +++ b/mysql-test/suite/rpl/r/rpl_hrtime.result @@ -46,7 +46,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; create table t1 (a timestamp(4) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, b varchar(100), c datetime(2)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1293832861.123456/*!*/; SET @@session.time_zone='+03:00'/*!*/; @@ -55,7 +55,7 @@ insert t1 (b,c) values (now(6), now(6)) SET TIMESTAMP=1293832861.123456/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1293832861/*!*/; insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010') @@ -63,7 +63,7 @@ insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','201 SET TIMESTAMP=1293832861/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1643756522.654321/*!*/; insert t1 (b,c) values (now(), now()) @@ -71,7 +71,7 @@ insert t1 (b,c) values (now(), now()) SET TIMESTAMP=1643756522.654321/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1643756522.654321/*!*/; insert t1 (b,c) values (0,0) @@ -79,7 +79,7 @@ insert t1 (b,c) values (0,0) SET TIMESTAMP=1643756522.654321/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1643756522.654321/*!*/; insert t1 (a,b,c) values (0,0,now(6)) diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result index ee9377906ad..7e26e82d8c9 100644 --- a/mysql-test/suite/rpl/r/rpl_mdev382.result +++ b/mysql-test/suite/rpl/r/rpl_mdev382.result @@ -189,7 +189,7 @@ SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE `t``1` (`a``1` VARCHAR(4) PRIMARY KEY, `b``2` VARCHAR(3), `c``3` VARCHAR(7)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; LOAD DATA LOCAL INFILE '' INTO TABLE `t``1` FIELDS TERMINATED BY ',' ENCLOSED BY '\'' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a``1`, @`b```) SET `b``2`= @`b```, `c``3`= concat('|', "b""a'z", "!") @@ -200,7 +200,7 @@ COMMIT SET TIMESTAMP=1000000000/*!*/; truncate `t``1` /*!*/; -BEGIN +START TRANSACTION /*!*/; use `test`/*!*/; SET TIMESTAMP=1000000000/*!*/; @@ -288,7 +288,7 @@ SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; CREATE TABLE t1 (a1 BIGINT PRIMARY KEY, a2 BIGINT, a3 BIGINT, a4 BIGINT UNSIGNED, b DOUBLE, c DECIMAL(65,10), d VARCHAR(100)) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=1000000000/*!*/; INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,18446744073709551615,-1234560123456789e110, -1234501234567890123456789012345678901234567890123456789.0123456789, REPEAT("x", 100)) @@ -296,7 +296,7 @@ INSERT INTO t1 VALUES (-9223372036854775808,42,9223372036854775807,1844674407370 SET TIMESTAMP=1000000000/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET @`a``1`:=-9223372036854775808/*!*/; SET @`a``2`:=42/*!*/; @@ -383,7 +383,7 @@ master-bin.000002 # Query 1 # COMMIT /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; ROLLBACK/*!*/; -BEGIN +START TRANSACTION /*!*/; use `ts``et`/*!*/; SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/rpl/r/rpl_sp.result b/mysql-test/suite/rpl/r/rpl_sp.result index 97cc4dad8ad..686380427b5 100644 --- a/mysql-test/suite/rpl/r/rpl_sp.result +++ b/mysql-test/suite/rpl/r/rpl_sp.result @@ -810,7 +810,7 @@ insert into t1 values (b); insert into t1 values (unix_timestamp()); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values ( NAME_CONST('b',8)) @@ -818,7 +818,7 @@ insert into t1 values ( NAME_CONST('b',8)) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (unix_timestamp()) @@ -826,7 +826,7 @@ insert into t1 values (unix_timestamp()) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -872,7 +872,7 @@ insert into t2 values(3); insert into t1 values (5); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(3) @@ -880,7 +880,7 @@ insert into t2 values(3) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (15) @@ -888,7 +888,7 @@ insert into t1 values (15) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(3) @@ -899,7 +899,7 @@ COMMIT SET TIMESTAMP=t/*!*/; alter procedure foo4 sql security invoker /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(3) @@ -907,7 +907,7 @@ insert into t2 values(3) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (5) @@ -915,7 +915,7 @@ insert into t1 values (5) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t2 @@ -936,7 +936,7 @@ begin insert into t2 values(20),(20); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(20),(20) @@ -964,7 +964,7 @@ insert into t1 values (x); return x+2; end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete t1,t2 from t1,t2 @@ -972,7 +972,7 @@ delete t1,t2 from t1,t2 SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest1`.`fn1`(20) @@ -980,7 +980,7 @@ SELECT `mysqltest1`.`fn1`(20) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t2 values(fn1(21)) @@ -998,7 +998,7 @@ begin return unix_timestamp(); end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -1006,7 +1006,7 @@ delete from t1 SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values(fn1()) @@ -1028,7 +1028,7 @@ begin return 0; end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t2 @@ -1049,7 +1049,7 @@ insert into t2 values(x),(x); return 10; end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest1`.`fn1`(100) @@ -1057,7 +1057,7 @@ SELECT `mysqltest1`.`fn1`(100) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; SELECT `mysqltest1`.`fn1`(20) @@ -1065,7 +1065,7 @@ SELECT `mysqltest1`.`fn1`(20) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -1076,7 +1076,7 @@ COMMIT SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10 /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (1) @@ -1084,7 +1084,7 @@ insert into t1 values (1) SET TIMESTAMP=t/*!*/; COMMIT /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; delete from t1 @@ -1095,7 +1095,7 @@ COMMIT SET TIMESTAMP=t/*!*/; drop trigger trg /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 values (1) @@ -1142,7 +1142,7 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW SET TIMESTAMP=t/*!*/; create table t1 (a int) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t1 (a) values (f1()) @@ -1169,7 +1169,7 @@ SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`(arg VARCHAR(10)) INSERT INTO t1 VALUES(arg) /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test' COLLATE 'latin1_swedish_ci')) @@ -1223,7 +1223,7 @@ SET TIMESTAMP=t/*!*/; CREATE DEFINER=`root`@`localhost` PROCEDURE `mysqltest`.`test`() begin end /*!*/; -BEGIN +START TRANSACTION /*!*/; SET TIMESTAMP=t/*!*/; insert into t values ( 1 ) @@ -1238,7 +1238,7 @@ insert into t values (1); return 0; end /*!*/; -BEGIN +START TRANSACTION /*!*/; use `mysqltest`/*!*/; SET TIMESTAMP=t/*!*/; -- cgit v1.2.1 From b3dd95e035c10ad30c52f582ce519b1713c37262 Mon Sep 17 00:00:00 2001 From: Sujatha Date: Thu, 23 Jul 2020 12:54:13 +0530 Subject: MDEV-14203: rpl.rpl_extra_col_master_myisam, rpl.rpl_slave_load_tmpdir_not_exist failed in buildbot with a warning Problem: ======= rpl.rpl_slave_load_tmpdir_not_exist 'stmt' w3 [ fail ] Found warnings/errors in server log file! Test ended at 2017-09-27 20:34:55 [Warning] Master is configured to log replication events with checksum, but will not send such events to slaves that cannot process them ^ Found warnings in /mnt/buildbot/build/mariadb-10.2.10/mysql-test/var/3/log/mysqld.1.err ok Analysis: ======== When slave tries to connect to master 'get_master_version_and_clock' function is invoked to perform elaborated slave-master handshake. During this process slave server queries master server, to know if it is checksum aware and at the same time master is notified about its CRC-awareness. The master's side instant value of @@global.binlog_checksum is stored in the dump thread's uservar area as well as cached locally to become known in consensus by master and slave. Post hand-shake slave requests master for binlog dump. It sends 'COM_BINLOG_DUMP'. This command is sent to master by 'cli_advanced_command' call. If there is some temporary network failure during this request_dump call, 'end_server' is invoked to close the current connection between master and slave. Upon connection close the dump thread on the master gets terminated and it clears the 'uservar' data it got through master-slave handshake. The 'COM_BINLOG_DUMP' command is sent once again without master-slave handshake. Since the checksum data is not available with new dump thread a warning gets reported. Fix: === Upon network write error donot attempt reconnect, proceed to master-slave handshake. This ensures that master is aware of slave's capability to use checksums. --- .../rpl/r/rpl_dump_request_retry_warning.result | 22 ++++++++ .../rpl/t/rpl_dump_request_retry_warning.test | 60 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_dump_request_retry_warning.result create mode 100644 mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_dump_request_retry_warning.result b/mysql-test/suite/rpl/r/rpl_dump_request_retry_warning.result new file mode 100644 index 00000000000..3a80d5b5f31 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_dump_request_retry_warning.result @@ -0,0 +1,22 @@ +include/master-slave.inc +[connection master] +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES(1); +connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; +SET @@global.debug_dbug= 'd,simulate_error_on_packet_write'; +START SLAVE; +SET DEBUG_SYNC= 'now WAIT_FOR parked'; +SET @@GLOBAL.debug_dbug = @saved_dbug; +SET DEBUG_SYNC= 'now SIGNAL continue'; +SET DEBUG_SYNC= 'RESET'; +include/wait_for_slave_io_to_start.inc +include/wait_for_slave_sql_to_start.inc +connection master; +include/sync_slave_sql_with_master.inc +SELECT * FROM t1; +a +1 +connection master; +DROP TABLE t1; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test b/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test new file mode 100644 index 00000000000..d750d44ae71 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test @@ -0,0 +1,60 @@ +# ==== Purpose ==== +# +# Test verifies that, due to a temporary network error, if request dump +# command specific packet write operation fails then the write error gets +# handled appropriately. Further retry will be initiated with appropriate +# slave registration on master. This will ensure that master has all the +# details of slave and no warnings are reported on the master side. +# +# ==== Implementation ==== +# +# Steps: +# 0 - Skip the slave start. +# 1 - Enable debug simulation which will simulate packet write error during +# dump request command execution. +# 2 - Start the slave. Observe that slave is able to reconnect post +# temporary network write error. +# +# ==== References ==== +# +# MDEV-14203: rpl.rpl_extra_col_master_myisam, +# rpl.rpl_slave_load_tmpdir_not_exist failed in buildbot with a +# warning +# +# MDEV-13258: rpl.rpl_skip_replication, rpl.rpl_set_statement_default_master +# failed in buildbot +# + +--source include/have_debug.inc +--source include/have_debug_sync.inc +--let $rpl_skip_start_slave=1 +--source include/master-slave.inc + +# Do an insert on master +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES(1); + +# Add a debug point and start the slave so that dump request fails. +connection slave; +SET @saved_dbug = @@GLOBAL.debug_dbug; +SET @@global.debug_dbug= 'd,simulate_error_on_packet_write'; + +START SLAVE; +SET DEBUG_SYNC= 'now WAIT_FOR parked'; +SET @@GLOBAL.debug_dbug = @saved_dbug; +SET DEBUG_SYNC= 'now SIGNAL continue'; +SET DEBUG_SYNC= 'RESET'; + +--source include/wait_for_slave_io_to_start.inc +--source include/wait_for_slave_sql_to_start.inc + +# Sync the slave and verify that slave has caught up with the master. +connection master; +--source include/sync_slave_sql_with_master.inc +SELECT * FROM t1; + +# Cleanup +connection master; +DROP TABLE t1; + +--source include/rpl_end.inc -- cgit v1.2.1 From 0ec641ea1ef1ef23183d8c1b4e6d9e4a9810eba2 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 21 Jul 2020 14:56:47 +0200 Subject: MDEV-22134: handle_fatal_signal (sig=11) in __strlen_avx2 on START SLAVE | Assertion `global_system_variables.session_track_system_variables' failed in Session_sysvars_tracker::init | *** buffer overflow detected *** (on optimized builds) Prohibit assigning NULL as for other system variables. --- mysql-test/main/mysqltest_tracking_info.result | 12 ++++++++++++ mysql-test/main/mysqltest_tracking_info.test | 15 +++++++++++++++ .../r/session_track_system_variables_basic.result | 10 ++-------- .../sys_vars/t/session_track_system_variables_basic.test | 7 ++----- 4 files changed, 31 insertions(+), 13 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/mysqltest_tracking_info.result b/mysql-test/main/mysqltest_tracking_info.result index bbbb2be9e01..7947a86d386 100644 --- a/mysql-test/main/mysqltest_tracking_info.result +++ b/mysql-test/main/mysqltest_tracking_info.result @@ -45,3 +45,15 @@ Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in set @@optimizer_switch=@save_optimizer_switch; SET @@session.session_track_system_variables= @save_session_track_system_variables; # End of 10.2 tests +# +# MDEV-22134 handle_fatal_signal (sig=11) in __strlen_avx2 on START +# SLAVE | Assertion +# `global_system_variables.session_track_system_variables' failed in +# Session_sysvars_tracker::init | *** buffer overflow detected *** +# (on optimized builds) +# +SET @@GLOBAL.session_track_system_variables=NULL; +ERROR 42000: Variable 'session_track_system_variables' can't be set to the value of 'NULL' +SET SESSION session_track_system_variables=NULL; +ERROR 42000: Variable 'session_track_system_variables' can't be set to the value of 'NULL' +# End of 10.3 tests diff --git a/mysql-test/main/mysqltest_tracking_info.test b/mysql-test/main/mysqltest_tracking_info.test index dc51167137a..ae52571b2b9 100644 --- a/mysql-test/main/mysqltest_tracking_info.test +++ b/mysql-test/main/mysqltest_tracking_info.test @@ -45,3 +45,18 @@ set @@optimizer_switch=@save_optimizer_switch; SET @@session.session_track_system_variables= @save_session_track_system_variables; --echo # End of 10.2 tests + +--echo # +--echo # MDEV-22134 handle_fatal_signal (sig=11) in __strlen_avx2 on START +--echo # SLAVE | Assertion +--echo # `global_system_variables.session_track_system_variables' failed in +--echo # Session_sysvars_tracker::init | *** buffer overflow detected *** +--echo # (on optimized builds) +--echo # + +--error ER_WRONG_VALUE_FOR_VAR +SET @@GLOBAL.session_track_system_variables=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET SESSION session_track_system_variables=NULL; + +--echo # End of 10.3 tests diff --git a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result index 78ca8ca4ad1..90d2fec3d0a 100644 --- a/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result +++ b/mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result @@ -110,15 +110,9 @@ autocommit,character_set_client,character_set_connection,character_set_results,t connection default; # Testing NULL SET @@global.session_track_system_variables = NULL; +ERROR 42000: Variable 'session_track_system_variables' can't be set to the value of 'NULL' SET @@session.session_track_system_variables = NULL; -# Global - expect "" instead of NULL -SELECT @@global.session_track_system_variables; -@@global.session_track_system_variables -NULL -# Session - expect "" instead of NULL -SELECT @@session.session_track_system_variables; -@@session.session_track_system_variables - +ERROR 42000: Variable 'session_track_system_variables' can't be set to the value of 'NULL' # testing with duplicate entries. SET @@global.session_track_system_variables= "time_zone"; SET @@session.session_track_system_variables= "time_zone"; diff --git a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test index 90e6052947c..2cb51e3e968 100644 --- a/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test +++ b/mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test @@ -85,14 +85,11 @@ SELECT @@session.session_track_system_variables; connection default; --echo # Testing NULL +--error ER_WRONG_VALUE_FOR_VAR SET @@global.session_track_system_variables = NULL; +--error ER_WRONG_VALUE_FOR_VAR SET @@session.session_track_system_variables = NULL; ---echo # Global - expect "" instead of NULL -SELECT @@global.session_track_system_variables; ---echo # Session - expect "" instead of NULL -SELECT @@session.session_track_system_variables; - --echo # testing with duplicate entries. # Lets first set it to some valid value. SET @@global.session_track_system_variables= "time_zone"; -- cgit v1.2.1 From 1656ea28e8e49318b34e98ffa408d891a451c3f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 23 Jul 2020 17:41:44 +0300 Subject: =?UTF-8?q?MDEV-23244=20ALTER=20TABLE=E2=80=A6ADD=20PRIMARY=20KEY?= =?UTF-8?q?=20fails=20to=20flag=20duplicates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The fix of MDEV-13654 (commit ff81faf670e083e1da4f3e7bce33fe9104410b2c) wrongly caused ADD PRIMARY KEY to ignore duplicate PRIMARY KEY values caused by concurrent DML transactions that had been started before the ALTER TABLE operation (but did not access the table before the ALTER TABLE started). row_ins_duplicate_online(): Always report a duplicate key error if DB_TRX_ID had been reset (it belongs to a transaction that had started before the ALTER TABLE operation). --- mysql-test/suite/innodb/r/alter_primary_key.result | 26 +++++++++++++++++ mysql-test/suite/innodb/t/alter_primary_key.test | 34 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 mysql-test/suite/innodb/r/alter_primary_key.result create mode 100644 mysql-test/suite/innodb/t/alter_primary_key.test (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/alter_primary_key.result b/mysql-test/suite/innodb/r/alter_primary_key.result new file mode 100644 index 00000000000..afe687871f3 --- /dev/null +++ b/mysql-test/suite/innodb/r/alter_primary_key.result @@ -0,0 +1,26 @@ +# +# MDEV-23244 ALTER TABLE…ADD PRIMARY KEY fails to flag +# duplicate key error from concurrent DML +# +CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t1 (c CHAR(2) NOT NULL) ENGINE=InnoDB; +connect con1,localhost,root,,; +BEGIN; +INSERT INTO t0 VALUES(1); +connection default; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done'; +ALTER TABLE t1 ADD PRIMARY KEY(c(1)); +connection con1; +SET DEBUG_SYNC='now WAIT_FOR dml'; +INSERT INTO t1 VALUES ('ab'),('ac'); +COMMIT; +SET DEBUG_SYNC='now SIGNAL dml_done'; +disconnect con1; +connection default; +ERROR 23000: Duplicate entry 'a' for key 'PRIMARY' +SET DEBUG_SYNC='RESET'; +SELECT * FROM t1; +c +ab +ac +DROP TABLE t0,t1; diff --git a/mysql-test/suite/innodb/t/alter_primary_key.test b/mysql-test/suite/innodb/t/alter_primary_key.test new file mode 100644 index 00000000000..4edc0cc023e --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_primary_key.test @@ -0,0 +1,34 @@ +--source innodb_default_row_format.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +--echo # +--echo # MDEV-23244 ALTER TABLE…ADD PRIMARY KEY fails to flag +--echo # duplicate key error from concurrent DML +--echo # + +CREATE TABLE t0 (pk INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t1 (c CHAR(2) NOT NULL) ENGINE=InnoDB; + +connect (con1,localhost,root,,); +BEGIN; +INSERT INTO t0 VALUES(1); + +connection default; +SET DEBUG_SYNC='row_log_table_apply1_before SIGNAL dml WAIT_FOR dml_done'; +send ALTER TABLE t1 ADD PRIMARY KEY(c(1)); + +connection con1; +SET DEBUG_SYNC='now WAIT_FOR dml'; +INSERT INTO t1 VALUES ('ab'),('ac'); +COMMIT; +SET DEBUG_SYNC='now SIGNAL dml_done'; +disconnect con1; + +connection default; +--error ER_DUP_ENTRY +reap; +SET DEBUG_SYNC='RESET'; + +SELECT * FROM t1; +DROP TABLE t0,t1; -- cgit v1.2.1 From ba23e6d76fde4abdb6666e8d78af98ce6d2414e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 23 Jul 2020 08:59:18 +0300 Subject: MDEV-18177 : Galera test failure on galera_autoinc_sst_mariabackup Add wait_condition --- mysql-test/suite/galera/include/galera_st_clean_slave.inc | 6 ++++++ mysql-test/suite/galera/include/galera_st_disconnect_slave.inc | 6 ++++++ mysql-test/suite/galera/include/galera_st_kill_slave.inc | 6 ++++++ mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc | 5 +++++ mysql-test/suite/galera/include/galera_st_shutdown_slave.inc | 6 ++++++ 5 files changed, 29 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/include/galera_st_clean_slave.inc b/mysql-test/suite/galera/include/galera_st_clean_slave.inc index 3a49f4f6ad2..44cbf67fd12 100644 --- a/mysql-test/suite/galera/include/galera_st_clean_slave.inc +++ b/mysql-test/suite/galera/include/galera_st_clean_slave.inc @@ -102,12 +102,18 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ROLLBACK; +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; COMMIT; SET AUTOCOMMIT=ON; --connection node_1 +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc index c8869746bd1..4674fc7867f 100644 --- a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc +++ b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc @@ -92,12 +92,18 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ROLLBACK; +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; COMMIT; SET AUTOCOMMIT=ON; --connection node_1 +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/include/galera_st_kill_slave.inc b/mysql-test/suite/galera/include/galera_st_kill_slave.inc index 0b96de55a32..a4d9e91e8be 100644 --- a/mysql-test/suite/galera/include/galera_st_kill_slave.inc +++ b/mysql-test/suite/galera/include/galera_st_kill_slave.inc @@ -96,12 +96,18 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ROLLBACK; +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; COMMIT; SET AUTOCOMMIT=ON; --connection node_1 +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; DROP TABLE t1; diff --git a/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc b/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc index 44a1513fa6e..bb8c68bd181 100644 --- a/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc +++ b/mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc @@ -110,6 +110,9 @@ INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after'); ROLLBACK; +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; @@ -117,6 +120,8 @@ COMMIT; SET AUTOCOMMIT=ON; --connection node_1 +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1'; SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; diff --git a/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc b/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc index 207282c8237..eeb6a15e0a3 100644 --- a/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc +++ b/mysql-test/suite/galera/include/galera_st_shutdown_slave.inc @@ -97,12 +97,18 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after'); ROLLBACK; +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; COMMIT; SET AUTOCOMMIT=ON; --connection node_1 +--let $wait_condition = SELECT COUNT(*)=35 FROM t1 +--source include/wait_condition.inc + SELECT COUNT(*) = 35 FROM t1; SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1; DROP TABLE t1; -- cgit v1.2.1 From 6b8b7b1e8cd876f798df10015c9853da8adb00f8 Mon Sep 17 00:00:00 2001 From: mkaruza Date: Wed, 24 Jun 2020 21:56:55 +0200 Subject: MDEV-21905: Galera test galera_var_notify_cmd causes hang Fixed wsrep_notify.sh script so it only reports status changes on 'joined', 'synced', 'donor'. --- mysql-test/std_data/wsrep_notify.sh | 18 +++++++++--------- mysql-test/suite/galera/disabled.def | 1 - mysql-test/suite/galera/r/galera_var_notify_cmd.result | 2 ++ 3 files changed, 11 insertions(+), 10 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/std_data/wsrep_notify.sh b/mysql-test/std_data/wsrep_notify.sh index 7036f603c84..48edad4306f 100755 --- a/mysql-test/std_data/wsrep_notify.sh +++ b/mysql-test/std_data/wsrep_notify.sh @@ -56,7 +56,7 @@ configuration_change() status_update() { - echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" + echo "$BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; $END;" } COM=status_update # not a configuration change by default @@ -89,11 +89,11 @@ do shift done -# Undefined means node is shutting down -if [ "$STATUS" != "Undefined" ] -then - $COM | mysql -B -u$USER -h$HOST -P$PORT -fi - -exit 0 -# +case $STATUS in + "joined" | "donor" | "synced") + $COM | mysql -B -u$USER -h$HOST -P$PORT + ;; + *) + exit 0 + ;; +esac diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index e4244c63297..36b0726609e 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -39,7 +39,6 @@ galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encr galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case galera_var_node_address : MDEV-20485 Galera test failure -galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang galera_var_reject_queries : assertion in inline_mysql_socket_send galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit galera_wan : MDEV-17259 Test failure on galera.galera_wan diff --git a/mysql-test/suite/galera/r/galera_var_notify_cmd.result b/mysql-test/suite/galera/r/galera_var_notify_cmd.result index 823407fbba7..432d6c0adbd 100644 --- a/mysql-test/suite/galera/r/galera_var_notify_cmd.result +++ b/mysql-test/suite/galera/r/galera_var_notify_cmd.result @@ -1,3 +1,5 @@ +connection node_2; +connection node_1; connection node_1; SELECT COUNT(DISTINCT uuid) AS EXPECT_2 FROM mtr_wsrep_notify.membership; EXPECT_2 -- cgit v1.2.1 From 4b4372af6a6e2e3c37220487bdb671054357698e Mon Sep 17 00:00:00 2001 From: mkaruza Date: Tue, 2 Jun 2020 09:18:59 +0200 Subject: MDEV-22458: Server with WSREP hangs after INSERT, wrong usage of mutex 'LOCK_thd_data' and 'share->intern_lock' / 'lock->mutex' Add `find_thread_by_id_with_thd_data_lock` which will be used only when killing thread. This version needs to take `thd->LOCK_thd_data` lock. --- mysql-test/suite/galera/r/MDEV-22458.result | 10 ++++++++++ mysql-test/suite/galera/t/MDEV-22458.test | 21 +++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 mysql-test/suite/galera/r/MDEV-22458.result create mode 100644 mysql-test/suite/galera/t/MDEV-22458.test (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/MDEV-22458.result b/mysql-test/suite/galera/r/MDEV-22458.result new file mode 100644 index 00000000000..d1f9d94bd1c --- /dev/null +++ b/mysql-test/suite/galera/r/MDEV-22458.result @@ -0,0 +1,10 @@ +connection node_2; +connection node_1; +CREATE TABLE t1 (a INT); +connect con1,localhost,root,,test; +INSERT INTO t1 VALUES (1),(2),(3),(4); +SHOW EXPLAIN FOR $con1; +ERROR HY000: Target is not running an EXPLAINable command +connection con1; +INSERT INTO t1 VALUES (5),(6),(7),(8); +DROP TABLE t1; diff --git a/mysql-test/suite/galera/t/MDEV-22458.test b/mysql-test/suite/galera/t/MDEV-22458.test new file mode 100644 index 00000000000..8f9ba1bb107 --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-22458.test @@ -0,0 +1,21 @@ +# MDEV-22458 +# +# When running SHOW command, thread lock `LOCK_thd_data` should not be taken. +# Lock will be taken only when we are killing thread +# + +--source include/galera_cluster.inc +CREATE TABLE t1 (a INT); + +--connect (con1,localhost,root,,test) +--let $con1 = `SELECT CONNECTION_ID()` + +INSERT INTO t1 VALUES (1),(2),(3),(4); + +--error ER_TARGET_NOT_EXPLAINABLE +EVALP SHOW EXPLAIN FOR $con1; + +--connection con1 +INSERT INTO t1 VALUES (5),(6),(7),(8); + +DROP TABLE t1; -- cgit v1.2.1 From 95132ade6d83232236e48e4aff1097deeef1dada Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 23 Jun 2020 10:23:40 +0300 Subject: MDEV-20928 mtr test galera.galera_var_innodb_disallow_writes test failure The sporadic test hangs happen because of mutex dealock between innodb background threads and two test connection executions. The test sets variable innodb_disallow_writes, which blocks all writes to filesyste. The test logic is to execute an INSERT, which should hang because of filesytstem writes are blocked, and through another session verify by SELECT that this hanging happens. The SELECT session will then release innodb_disallow_writes blocking. However, filesystem write blocking affects also innodb background threads and they may hang while keeping some other resources locked. As an example, in one test hang situation, buffer pool access was blocked. And, if buffer pool is blocked, the test connections will be blocked as well, and the SELECT session will not be able to continue to release the innodb_disallow_writes. The fix in this commit is refactoring of the test logic. The test will now set first innodb_disallow_writes blocking, and then record a hash of data directory's filesystem contents. This works as checksum of the state of data on the datadirectory. Then some SQL load is tried on both nodes, these sessions will be blocking due to frozen file system state. The test will have a short sleep to allow innodb background threads to loop and possibly encounter innodb_disallow_writes blocking as well. After the sleep, the test will record file system checksun for the second time, and then release the innodb_disallow-writes blocking. Finally, the two checksums are compared, they should be identical to verify that nothing was written on datadirectory during the test execution. The checksum is implemented by md5sum hash over all files found in datadirectory by find command. all these file hashes are hashed together by one more md5sum. The test therefore depends on md5sum and find. find may work differently with some OS distributions, e.g. freebsd may be problematic. --- .../r/galera_var_innodb_disallow_writes.result | 33 +++++++------- .../t/galera_var_innodb_disallow_writes.test | 50 ++++++++++++++++------ 2 files changed, 54 insertions(+), 29 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result index 3eb56d1a48d..758c34ee62e 100644 --- a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result +++ b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result @@ -1,27 +1,30 @@ connection node_2; connection node_1; -connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; connection node_1a; SET SESSION wsrep_sync_wait = 0; connection node_1; -CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); SET GLOBAL innodb_disallow_writes=ON; -INSERT INTO t1 VALUES (1);; +INSERT INTO t1 (f2) SELECT 'abcde ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; +connection node_2; +INSERT INTO t1 (f2) SELECT 'fghij ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SELECT COUNT(*) AS EXPECT_10000 FROM t1; +EXPECT_10000 +10000 connection node_1a; -SELECT COUNT(*) AS EXPECT_0 FROM t1; -EXPECT_0 -0 -SELECT COUNT(*) AS EXPECT_0 FROM t1; -EXPECT_0 -0 SET GLOBAL innodb_disallow_writes=OFF; connection node_1; -SELECT COUNT(*) AS EXPECT_1 FROM t1; -EXPECT_1 -1 +SELECT COUNT(*) AS EXPECT_20000 FROM t1; +EXPECT_20000 +20000 +connection node_2; +SELECT COUNT(*) AS EXPECT_20000 FROM t1; +EXPECT_20000 +20000 +connection node_1; connection node_2; -SELECT COUNT(*) AS EXPECT_1 FROM t1; -EXPECT_1 -1 DROP TABLE t1; +DROP TABLE ten; disconnect node_1a; diff --git a/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test b/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test index 37469d8a5fb..10f3815e135 100644 --- a/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test +++ b/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test @@ -11,40 +11,62 @@ # --source include/galera_cluster.inc +--source include/have_innodb.inc --source include/have_log_bin.inc +--let $datadir= `SELECT @@datadir` + + # Open a separate connection to be used to run SHOW PROCESSLIST ---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc --connection node_1a SET SESSION wsrep_sync_wait = 0; --connection node_1 -CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + SET GLOBAL innodb_disallow_writes=ON; ---send INSERT INTO t1 VALUES (1); +--exec find $datadir -type f-exec md5sum {} \; | md5sum >$MYSQLTEST_VARDIR/tmp/innodb_before + +# +# This insert has no effect before innodb_disallow_writes is OFF +# +--send INSERT INTO t1 (f2) SELECT 'abcde ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; + +--connection node_2 +INSERT INTO t1 (f2) SELECT 'fghij ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SELECT COUNT(*) AS EXPECT_10000 FROM t1; --connection node_1a ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; ---source include/wait_condition.inc -SELECT COUNT(*) AS EXPECT_0 FROM t1; -let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'INSERT INTO t1 VALUES (1)'; ---source include/wait_condition.inc -SELECT COUNT(*) AS EXPECT_0 FROM t1; +--sleep 5 + +--exec find $datadir -type f-exec md5sum {} \; | md5sum >$MYSQLTEST_VARDIR/tmp/innodb_after SET GLOBAL innodb_disallow_writes=OFF; --connection node_1 --reap -SELECT COUNT(*) AS EXPECT_1 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) AS EXPECT_20000 FROM t1; --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; ---source include/wait_condition.inc ---let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20000 FROM t1; --source include/wait_condition.inc -SELECT COUNT(*) AS EXPECT_1 FROM t1; +SELECT COUNT(*) AS EXPECT_20000 FROM t1; + +--connection node_1 +--diff_files $MYSQLTEST_VARDIR/tmp/innodb_before $MYSQLTEST_VARDIR/tmp/innodb_after + +--connection node_2 DROP TABLE t1; +DROP TABLE ten; --disconnect node_1a -- cgit v1.2.1 From 134a6a8d2f953a5634897b420b1302d32b0e53a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 24 Jul 2020 11:56:01 +0300 Subject: Silence unnecessary warning. --- mysql-test/suite/galera/r/MW-328A.result | 3 +++ mysql-test/suite/galera/t/MW-328A.test | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/MW-328A.result b/mysql-test/suite/galera/r/MW-328A.result index 448e927f09d..f256558644e 100644 --- a/mysql-test/suite/galera/r/MW-328A.result +++ b/mysql-test/suite/galera/r/MW-328A.result @@ -14,7 +14,10 @@ END| connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1; connection node_1X; CALL proc_update();; +connection node_1; +call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position"); connection node_2; +call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position"); SET SESSION wsrep_retry_autocommit = 0; connection node_1; connection node_1X; diff --git a/mysql-test/suite/galera/t/MW-328A.test b/mysql-test/suite/galera/t/MW-328A.test index a547823ced0..2435a9e2c2e 100644 --- a/mysql-test/suite/galera/t/MW-328A.test +++ b/mysql-test/suite/galera/t/MW-328A.test @@ -16,7 +16,11 @@ --source include/force_restart.inc --source suite/galera/t/MW-328-header.inc +--connection node_1 +call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position"); + --connection node_2 +call mtr.add_suppression("WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position"); --let $count = 100 --let $successes = 0 --let $deadlocks = 0 -- cgit v1.2.1 From c9928cc0fb1ddbe9253105f8cd2db0104e739ede Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 23 Jun 2020 10:23:40 +0300 Subject: MDEV-20928 mtr test galera.galera_var_innodb_disallow_writes test failure The sporadic test hangs happen because of mutex dealock between innodb background threads and two test connection executions. The test sets variable innodb_disallow_writes, which blocks all writes to filesyste. The test logic is to execute an INSERT, which should hang because of filesytstem writes are blocked, and through another session verify by SELECT that this hanging happens. The SELECT session will then release innodb_disallow_writes blocking. However, filesystem write blocking affects also innodb background threads and they may hang while keeping some other resources locked. As an example, in one test hang situation, buffer pool access was blocked. And, if buffer pool is blocked, the test connections will be blocked as well, and the SELECT session will not be able to continue to release the innodb_disallow_writes. The fix in this commit is refactoring of the test logic. The test will now set first innodb_disallow_writes blocking, and then record a hash of data directory's filesystem contents. This works as checksum of the state of data on the datadirectory. Then some SQL load is tried on both nodes, these sessions will be blocking due to frozen file system state. The test will have a short sleep to allow innodb background threads to loop and possibly encounter innodb_disallow_writes blocking as well. After the sleep, the test will record file system checksun for the second time, and then release the innodb_disallow-writes blocking. Finally, the two checksums are compared, they should be identical to verify that nothing was written on datadirectory during the test execution. The checksum is implemented by md5sum hash over all files found in datadirectory by find command. all these file hashes are hashed together by one more md5sum. The test therefore depends on md5sum and find. find may work differently with some OS distributions, e.g. freebsd may be problematic. --- .../r/galera_var_innodb_disallow_writes.result | 33 ++++++------ .../t/galera_var_innodb_disallow_writes.test | 58 ++++++++++++++++------ 2 files changed, 62 insertions(+), 29 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result index 54cebbee40c..8750651612d 100644 --- a/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result +++ b/mysql-test/suite/galera/r/galera_var_innodb_disallow_writes.result @@ -1,25 +1,28 @@ -connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; connection node_1a; SET SESSION wsrep_sync_wait = 0; connection node_1; -CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); SET GLOBAL innodb_disallow_writes=ON; -INSERT INTO t1 VALUES (1);; +INSERT INTO t1 (f2) SELECT 'abcde ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4;; +connection node_2; +INSERT INTO t1 (f2) SELECT 'fghij ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SELECT COUNT(*) AS EXPECT_10000 FROM t1; +EXPECT_10000 +10000 connection node_1a; -SELECT COUNT(*) AS EXPECT_0 FROM t1; -EXPECT_0 -0 -SELECT COUNT(*) AS EXPECT_0 FROM t1; -EXPECT_0 -0 SET GLOBAL innodb_disallow_writes=OFF; connection node_1; -SELECT COUNT(*) AS EXPECT_1 FROM t1; -EXPECT_1 -1 +SELECT COUNT(*) AS EXPECT_20000 FROM t1; +EXPECT_20000 +20000 +connection node_2; +SELECT COUNT(*) AS EXPECT_20000 FROM t1; +EXPECT_20000 +20000 +connection node_1; connection node_2; -SELECT COUNT(*) AS EXPECT_1 FROM t1; -EXPECT_1 -1 DROP TABLE t1; +DROP TABLE ten; disconnect node_1a; diff --git a/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test b/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test index 3754cff0123..0d2a6effd92 100644 --- a/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test +++ b/mysql-test/suite/galera/t/galera_var_innodb_disallow_writes.test @@ -1,41 +1,71 @@ # # This test checks that innodb_disallow_writes works as expected # +# Note that we need to enable binlog for this test: If the commit +# to InnoDB is done in one phase, the transaction is committed in +# memory before it is persisted to disk. This means that the +# innodb_disallow_writes=ON may not prevent transaction to +# become visible to other readers. On the other hand, if the +# commit is two phase (as it is with binlog), the transaction +# will be blocked in prepare phase. +# --source include/galera_cluster.inc +--source include/have_innodb.inc + +--let $datadir= `SELECT @@datadir` + # Open a separate connection to be used to run SHOW PROCESSLIST ---connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 +--let $galera_connection_name = node_1a +--let $galera_server_number = 1 +--source include/galera_connect.inc --connection node_1a SET SESSION wsrep_sync_wait = 0; --connection node_1 -CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB; +CREATE TABLE t1 (f1 INTEGER, f2 varchar(1024)) Engine=InnoDB; +CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB; +INSERT INTO ten VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); + SET GLOBAL innodb_disallow_writes=ON; ---send INSERT INTO t1 VALUES (1); +--exec find $datadir -type f-exec md5sum {} \; | md5sum >$MYSQLTEST_VARDIR/tmp/innodb_before + +# +# This insert has no effect before innodb_disallow_writes is OFF +# +--send INSERT INTO t1 (f2) SELECT 'abcde ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; + +--connection node_2 +INSERT INTO t1 (f2) SELECT 'fghij ' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4; +SELECT COUNT(*) AS EXPECT_10000 FROM t1; --connection node_1a ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; ---source include/wait_condition.inc -SELECT COUNT(*) AS EXPECT_0 FROM t1; -let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE INFO = 'INSERT INTO t1 VALUES (1)'; ---source include/wait_condition.inc -SELECT COUNT(*) AS EXPECT_0 FROM t1; +--sleep 5 + +--exec find $datadir -type f-exec md5sum {} \; | md5sum >$MYSQLTEST_VARDIR/tmp/innodb_after SET GLOBAL innodb_disallow_writes=OFF; --connection node_1 --reap -SELECT COUNT(*) AS EXPECT_1 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20000 FROM t1; +--source include/wait_condition.inc + +SELECT COUNT(*) AS EXPECT_20000 FROM t1; --connection node_2 ---let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.INNODB_SYS_TABLES WHERE NAME LIKE 'test/t1'; ---source include/wait_condition.inc ---let $wait_condition = SELECT COUNT(*) = 1 FROM t1; +--let $wait_condition = SELECT COUNT(*) = 20000 FROM t1; --source include/wait_condition.inc -SELECT COUNT(*) AS EXPECT_1 FROM t1; +SELECT COUNT(*) AS EXPECT_20000 FROM t1; + +--connection node_1 +--diff_files $MYSQLTEST_VARDIR/tmp/innodb_before $MYSQLTEST_VARDIR/tmp/innodb_after + +--connection node_2 DROP TABLE t1; +DROP TABLE ten; --disconnect node_1a -- cgit v1.2.1 From a3a249c72f07bf3270c059f60f68df030179f104 Mon Sep 17 00:00:00 2001 From: mkaruza Date: Mon, 20 Jul 2020 14:16:19 +0200 Subject: MDEV-15236: galera_ist_progress fails when trying to read transfer status Fixed by new recording test recording --- mysql-test/suite/galera/disabled.def | 1 - mysql-test/suite/galera/r/galera_ist_progress.result | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 125ea03474f..331260ef84e 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -17,7 +17,6 @@ galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc galera_gcache_recover_manytrx : MDEV-18834 Galera test failure -galera_ist_progress : MDEV-15236 fails when trying to read transfer status galera_load_data : MDEV-19968 galera.galera_load_data galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim diff --git a/mysql-test/suite/galera/r/galera_ist_progress.result b/mysql-test/suite/galera/r/galera_ist_progress.result index 9fc7febbea5..ed36a217624 100644 --- a/mysql-test/suite/galera/r/galera_ist_progress.result +++ b/mysql-test/suite/galera/r/galera_ist_progress.result @@ -1,6 +1,10 @@ +connection node_2; SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 1'; +connection node_1; +connection node_2; SET SESSION wsrep_on = OFF; SET SESSION wsrep_on = ON; +connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (2); @@ -12,8 +16,13 @@ INSERT INTO t1 VALUES (7); INSERT INTO t1 VALUES (8); INSERT INTO t1 VALUES (9); INSERT INTO t1 VALUES (10); +connection node_2; SET GLOBAL wsrep_provider_options = 'gmcast.isolate = 0'; +connection node_1; +connection node_2; +connection node_1; include/assert_grep.inc [Receiving IST: 11 writesets, seqnos] include/assert_grep.inc [Receiving IST\.\.\. 0\.0% \( 0/11 events\) complete] include/assert_grep.inc [Receiving IST\.\.\.100\.0% \(11/11 events\) complete] +connection node_1; DROP TABLE t1; -- cgit v1.2.1 From 1e2a4ed7ed41f3f6900e164dfad38c95d2af8b7b Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Thu, 23 Jul 2020 23:05:47 +0300 Subject: MDEV-21718 Assertion in wsrep::client_state::before_command(). An assertion `server_state_.rollback_mode() == wsrep::server_state::rm_async` fired in before_command() when - thread-handling was set to pool-of-threads and - a BF abort happened between client session calls to wait_rollback_complete_and_acquire_ownership() and before_command(). This commit introduces a test case to reproduce the crash and updates wsrep-lib submodule to fixed version. --- mysql-test/suite/galera/r/mdev_21718.result | 16 ++++++++++++++ mysql-test/suite/galera/t/mdev_21718.cnf | 4 ++++ mysql-test/suite/galera/t/mdev_21718.test | 33 +++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 mysql-test/suite/galera/r/mdev_21718.result create mode 100644 mysql-test/suite/galera/t/mdev_21718.cnf create mode 100644 mysql-test/suite/galera/t/mdev_21718.test (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/r/mdev_21718.result b/mysql-test/suite/galera/r/mdev_21718.result new file mode 100644 index 00000000000..ce938614854 --- /dev/null +++ b/mysql-test/suite/galera/r/mdev_21718.result @@ -0,0 +1,16 @@ +connection node_2; +connection node_1; +CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; +connection node_1; +START TRANSACTION; +INSERT INTO t1 VALUES (1); +SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL reached WAIT_FOR continue"; +COMMIT; +connection node_1_ctrl; +SET DEBUG_SYNC = "now WAIT_FOR reached"; +connection node_2; +INSERT INTO t1 VALUES (1); +connection node_1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +DROP TABLE t1; +SET DEBUG_SYNC = "RESET"; diff --git a/mysql-test/suite/galera/t/mdev_21718.cnf b/mysql-test/suite/galera/t/mdev_21718.cnf new file mode 100644 index 00000000000..9e066597a13 --- /dev/null +++ b/mysql-test/suite/galera/t/mdev_21718.cnf @@ -0,0 +1,4 @@ +!include ../galera_2nodes.cnf + +[mysqld] +thread-handling=pool-of-threads diff --git a/mysql-test/suite/galera/t/mdev_21718.test b/mysql-test/suite/galera/t/mdev_21718.test new file mode 100644 index 00000000000..413e9da0e83 --- /dev/null +++ b/mysql-test/suite/galera/t/mdev_21718.test @@ -0,0 +1,33 @@ +# +# MDEV-21718 Reproduce a case where BF abort after +# client session acquires the ownership but before calls +# before_command() causes an assertion in wsrep-lib. +# +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; + +--let $galera_connection_name = node_1_ctrl +--let $galera_server_number = 1 +--source include/galera_connect.inc + +--connection node_1 +START TRANSACTION; +INSERT INTO t1 VALUES (1); +SET DEBUG_SYNC = "wsrep_before_before_command SIGNAL reached WAIT_FOR continue"; +--send COMMIT + +--connection node_1_ctrl +SET DEBUG_SYNC = "now WAIT_FOR reached"; + +--connection node_2 +INSERT INTO t1 VALUES (1); + +# BF abort wakes up node_1 from sync wait. +--connection node_1 +--error ER_LOCK_DEADLOCK +--reap + +DROP TABLE t1; +SET DEBUG_SYNC = "RESET"; -- cgit v1.2.1 From bec81db1c28388337e5abe67726b9c540ebf0a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 24 Jul 2020 15:17:35 +0300 Subject: Update Galera global warning ignore list. --- mysql-test/suite/galera/suite.pm | 1 + mysql-test/suite/galera_3nodes/suite.pm | 7 +++++++ mysql-test/suite/galera_sr/suite.pm | 3 +++ 3 files changed, 11 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm index 671fd1688c9..c0b2da5f349 100644 --- a/mysql-test/suite/galera/suite.pm +++ b/mysql-test/suite/galera/suite.pm @@ -64,6 +64,7 @@ push @::global_suppressions, qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*), qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|, qr|WSREP: Trying to continue unpaused monitor|, + qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|, ); sub skip_combinations { diff --git a/mysql-test/suite/galera_3nodes/suite.pm b/mysql-test/suite/galera_3nodes/suite.pm index b808db6a50a..da02d4a9020 100644 --- a/mysql-test/suite/galera_3nodes/suite.pm +++ b/mysql-test/suite/galera_3nodes/suite.pm @@ -39,6 +39,13 @@ push @::global_suppressions, qr(WSREP: Action message in non-primary configuration from member [0-9]*), qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on), qr(WSREP: JOIN message from member .* in non-primary configuration. Ignored.), + qr|Query apply failed:*|, + qr(WSREP: Ignoring error*), + qr(WSREP: Failed to remove page file .*), + qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*), + qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|, + qr|WSREP: Trying to continue unpaused monitor|, + qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|, ); bless { }; diff --git a/mysql-test/suite/galera_sr/suite.pm b/mysql-test/suite/galera_sr/suite.pm index cc13421d66d..a9665b5252c 100644 --- a/mysql-test/suite/galera_sr/suite.pm +++ b/mysql-test/suite/galera_sr/suite.pm @@ -62,6 +62,9 @@ push @::global_suppressions, qr(WSREP: Ignoring error*), qr(WSREP: Failed to remove page file .*), qr(WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*), + qr|WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.|, + qr|WSREP: Trying to continue unpaused monitor|, + qr|WSREP: Wait for gtid returned error 3 while waiting for prior transactions to commit before setting position|, ); bless { }; -- cgit v1.2.1 From 468e56bfdeea4cac7a4f7eebab69606f41edc07c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 24 Jul 2020 19:25:32 +0300 Subject: Add missing includes. --- mysql-test/suite/galera/t/mdev_21718.test | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/t/mdev_21718.test b/mysql-test/suite/galera/t/mdev_21718.test index 413e9da0e83..3fbc4e773d5 100644 --- a/mysql-test/suite/galera/t/mdev_21718.test +++ b/mysql-test/suite/galera/t/mdev_21718.test @@ -5,6 +5,8 @@ # --source include/galera_cluster.inc --source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc CREATE TABLE t1 (f1 INT PRIMARY KEY) ENGINE=InnoDB; -- cgit v1.2.1 From 05d62518fb81b884685199a3cf269f24c01e3e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 24 Jul 2020 19:34:17 +0300 Subject: MDEV-22651: Bogus assertion in dict_table_t::init_instant() In commit 0e5a4ac2532c64a545796c787354dc41d61d0e62 (MDEV-15562) we introduced a bogus debug assertion, demanding that dict_col_t::len never exceed some maximum value. The intention was to match what dict_index_add_col() is doing. But, the assignment field->fixed_len = 0 applies to dict_field_t::fixed_len, not dict_col_t::len! --- mysql-test/suite/innodb/r/instant_alter_bugs.result | 8 ++++++++ mysql-test/suite/innodb/t/instant_alter_bugs.test | 10 ++++++++++ 2 files changed, 18 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/instant_alter_bugs.result b/mysql-test/suite/innodb/r/instant_alter_bugs.result index 871d296776c..81d4db79be0 100644 --- a/mysql-test/suite/innodb/r/instant_alter_bugs.result +++ b/mysql-test/suite/innodb/r/instant_alter_bugs.result @@ -399,4 +399,12 @@ INSERT INTO t1 SET a=1, b=NULL; ALTER TABLE t1 MODIFY COLUMN b INT FIRST; ALTER TABLE t1 ADD UNIQUE INDEX (va); DROP TABLE t1; +# +# MDEV-22651 Assertion dict_col_get_fixed_size... +# in dict_table_t::init_instant() +# +CREATE TABLE t (i INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t SET i=1; +ALTER TABLE t ADD e CHAR(255) CHARACTER SET UTF32 FIRST, ALGORITHM=INSTANT; +DROP TABLE t; SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency; diff --git a/mysql-test/suite/innodb/t/instant_alter_bugs.test b/mysql-test/suite/innodb/t/instant_alter_bugs.test index 2ee203d998e..b6a3aecd7da 100644 --- a/mysql-test/suite/innodb/t/instant_alter_bugs.test +++ b/mysql-test/suite/innodb/t/instant_alter_bugs.test @@ -419,4 +419,14 @@ ALTER TABLE t1 MODIFY COLUMN b INT FIRST; ALTER TABLE t1 ADD UNIQUE INDEX (va); DROP TABLE t1; +--echo # +--echo # MDEV-22651 Assertion dict_col_get_fixed_size... +--echo # in dict_table_t::init_instant() +--echo # +--source include/have_innodb.inc +CREATE TABLE t (i INT PRIMARY KEY) ENGINE=InnoDB; +INSERT INTO t SET i=1; +ALTER TABLE t ADD e CHAR(255) CHARACTER SET UTF32 FIRST, ALGORITHM=INSTANT; +DROP TABLE t; + SET GLOBAL innodb_purge_rseg_truncate_frequency=@save_frequency; -- cgit v1.2.1 From a6410deba99d5060a8c3fc0d5f267100125dc6ac Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Mon, 27 Jul 2020 13:53:33 +0530 Subject: MDEV-18916: crash in Window_spec::print_partition() with decimals Removed an unnecessary ifndef which was printing the window name for a named window only in the case of debug build. The print() for the window function should behave in the same way on both release and debug builds. --- mysql-test/r/win.result | 7 +++++++ mysql-test/t/win.test | 9 +++++++++ 2 files changed, 16 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result index 019cfd6115d..081aaedd323 100644 --- a/mysql-test/r/win.result +++ b/mysql-test/r/win.result @@ -3843,5 +3843,12 @@ ROW_NUMBER() OVER w2 5 DROP TABLE t1; # +# MDEV-18916: crash in Window_spec::print_partition() with decimals +# +SELECT cast((rank() over w1) as decimal (53,56)); +ERROR 42000: Too big scale 56 specified for 'rank() over w1'. Maximum is 38 +SELECT cast((rank() over w1) as decimal (53,30)); +ERROR HY000: Window specification with name 'w1' is not defined +# # End of 10.2 tests # diff --git a/mysql-test/t/win.test b/mysql-test/t/win.test index deed7de2d23..b749b235082 100644 --- a/mysql-test/t/win.test +++ b/mysql-test/t/win.test @@ -2497,6 +2497,15 @@ SELECT a,b FROM t1 WINDOW w2 AS (PARTITION BY -1,1,0,2,3,4); SELECT ROW_NUMBER() OVER w2 FROM t1 WINDOW w2 AS (PARTITION BY -1,0,1,2,3,4,5,6); DROP TABLE t1; +--echo # +--echo # MDEV-18916: crash in Window_spec::print_partition() with decimals +--echo # + +--error ER_TOO_BIG_SCALE +SELECT cast((rank() over w1) as decimal (53,56)); +--error ER_WRONG_WINDOW_SPEC_NAME +SELECT cast((rank() over w1) as decimal (53,30)); + --echo # --echo # End of 10.2 tests --echo # -- cgit v1.2.1 From b4c742108f8cd2d2ebe70a98d8c621a34a8b891a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 27 Jul 2020 14:34:24 +0300 Subject: Enable fixed test case. --- mysql-test/suite/galera/disabled.def | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 331260ef84e..453bbb139f5 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -14,7 +14,6 @@ MW-286 : MDEV-18464 Killing thread can cause mutex deadlock if done concurrently MW-329 : MDEV-19962 Galera test failure on MW-329 galera.galera_defaults : MDEV-21494 Galera test sporadic failure on galera.galera_defaults galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event() -galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc galera_gcache_recover_manytrx : MDEV-18834 Galera test failure galera_load_data : MDEV-19968 galera.galera_load_data -- cgit v1.2.1 From fd9ca2a742abe2e91b2b77e70915dec7bd3cd7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 27 Jul 2020 15:04:04 +0300 Subject: MDEV-23295 ROW_FORMAT mismatch in instant ALTER TABLE An instant ADD/DROP/reorder column could create a dummy table object with the wrong ROW_FORMAT when innodb_default_row_format was changed between CREATE TABLE and ALTER TABLE. prepare_inplace_alter_table_dict(): If we had promised that ALGORITHM=INPLACE is supported, we must preserve the ROW_FORMAT. dict_table_t::prepare_instant(): Add debug assertions to catch ROW_FORMAT mismatch. The rest of the changes are related to adding Alter_inplace_info::inplace_supported to cache the return value of handler::check_if_supported_inplace_alter(). --- .../suite/innodb/r/default_row_format_alter,compact.rdiff | 10 ++++++++++ .../suite/innodb/r/default_row_format_alter,redundant.rdiff | 10 ++++++++++ mysql-test/suite/innodb/r/default_row_format_alter.result | 11 +++++++++++ mysql-test/suite/innodb/t/default_row_format_alter.test | 11 +++++++++++ 4 files changed, 42 insertions(+) create mode 100644 mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff create mode 100644 mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff b/mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff new file mode 100644 index 00000000000..09095c90e29 --- /dev/null +++ b/mysql-test/suite/innodb/r/default_row_format_alter,compact.rdiff @@ -0,0 +1,10 @@ +--- default_row_format_alter.result ++++ default_row_format_alter,compact.reject +@@ -91,6 +91,6 @@ + ALTER TABLE t1 ADD b INT; + SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; + ROW_FORMAT +-Dynamic ++Compact + DROP TABLE t1; + SET GLOBAL innodb_default_row_format = @row_format; diff --git a/mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff b/mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff new file mode 100644 index 00000000000..972ee9bdac8 --- /dev/null +++ b/mysql-test/suite/innodb/r/default_row_format_alter,redundant.rdiff @@ -0,0 +1,10 @@ +--- default_row_format_alter.result ++++ default_row_format_alter,compact.reject +@@ -91,6 +91,6 @@ + ALTER TABLE t1 ADD b INT; + SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; + ROW_FORMAT +-Dynamic ++Redundant + DROP TABLE t1; + SET GLOBAL innodb_default_row_format = @row_format; diff --git a/mysql-test/suite/innodb/r/default_row_format_alter.result b/mysql-test/suite/innodb/r/default_row_format_alter.result index 1f349e6e2f6..42d006a2dd3 100644 --- a/mysql-test/suite/innodb/r/default_row_format_alter.result +++ b/mysql-test/suite/innodb/r/default_row_format_alter.result @@ -82,4 +82,15 @@ SHOW TABLE STATUS LIKE 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment Max_index_length Temporary t1 InnoDB # Compact # # # # # # NULL # # NULL latin1_swedish_ci NULL 0 N DROP TABLE t1; +# +# MDEV-23295 Assertion fields[i].same(instant.fields[i]) failed +# +SET GLOBAL innodb_default_row_format = @row_format; +CREATE TABLE t1 (a char(8)) ENGINE=InnoDB DEFAULT CHARSET utf8; +SET GLOBAL innodb_default_row_format= COMPACT; +ALTER TABLE t1 ADD b INT; +SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; +ROW_FORMAT +Dynamic +DROP TABLE t1; SET GLOBAL innodb_default_row_format = @row_format; diff --git a/mysql-test/suite/innodb/t/default_row_format_alter.test b/mysql-test/suite/innodb/t/default_row_format_alter.test index 8f7217bcf0c..6690bc5bddf 100644 --- a/mysql-test/suite/innodb/t/default_row_format_alter.test +++ b/mysql-test/suite/innodb/t/default_row_format_alter.test @@ -1,4 +1,5 @@ --source include/have_innodb.inc +--source include/innodb_row_format.inc SET @row_format = @@GLOBAL.innodb_default_row_format; @@ -95,4 +96,14 @@ ALTER TABLE t1 DROP INDEX k1; SHOW TABLE STATUS LIKE 't1'; DROP TABLE t1; +--echo # +--echo # MDEV-23295 Assertion fields[i].same(instant.fields[i]) failed +--echo # +SET GLOBAL innodb_default_row_format = @row_format; +CREATE TABLE t1 (a char(8)) ENGINE=InnoDB DEFAULT CHARSET utf8; +SET GLOBAL innodb_default_row_format= COMPACT; +ALTER TABLE t1 ADD b INT; +SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1'; +DROP TABLE t1; + SET GLOBAL innodb_default_row_format = @row_format; -- cgit v1.2.1 From 459b87f6b4ae9633f831e245e6a345bbab55cf27 Mon Sep 17 00:00:00 2001 From: Dan Solodko Date: Thu, 18 Jun 2020 11:02:19 +0300 Subject: MDEV-9911: NTILE must return an error when parameter is not stable --- mysql-test/r/win_ntile.result | 78 +++++++++++++++++++++++++++++++++++++++++++ mysql-test/t/win_ntile.test | 43 ++++++++++++++++++++++++ 2 files changed, 121 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/r/win_ntile.result b/mysql-test/r/win_ntile.result index 41cb1a594bf..4d02a230e13 100644 --- a/mysql-test/r/win_ntile.result +++ b/mysql-test/r/win_ntile.result @@ -433,3 +433,81 @@ ntile((select a from t1)) over (partition by b order by pk) from t1; ERROR 21000: Subquery returns more than 1 row drop table t1; +# +# MDEV-9911 NTILE must return an error when parameter is not stable +# +create table t1 ( +pk int primary key, +c1 nvarchar(10), +c2 nvarchar(10), +c3 int +); +insert into t1 values +(1, 'Mark', 'Male', 5), +(2, 'John', 'Male', 5), +(3, 'Pam', 'Female', 6), +(4, 'Sara', 'Female', 6), +(5, 'Todd', 'Male', 5), +(6, 'Mary', 'Female', 6), +(7, 'Ben', 'Male', 5), +(8, 'Jodi', 'Female', 6), +(9, 'Tom', 'Male', 5), +(10, 'Lucky', 'Male', 5), +(11, 'Mark', 'Male', 5), +(12, 'John', 'Male', 5), +(13, 'Pam', 'Female', 6), +(14, 'Sara', 'Female', 6), +(15, 'Todd', 'Male', 5), +(16, 'Mary', 'Female', 6), +(17, 'Ben', 'Male', 5), +(18, 'Jodi', 'Female', 6), +(19, 'Tom', 'Male', 5), +(20, 'Lucky', 'Male', 5); +select c1, c2, c3, ntile(6) over (partition by c2 order by pk) from t1; +c1 c2 c3 ntile(6) over (partition by c2 order by pk) +Pam Female 6 1 +Sara Female 6 1 +Mary Female 6 2 +Jodi Female 6 2 +Pam Female 6 3 +Sara Female 6 4 +Mary Female 6 5 +Jodi Female 6 6 +Mark Male 5 1 +John Male 5 1 +Todd Male 5 2 +Ben Male 5 2 +Tom Male 5 3 +Lucky Male 5 3 +Mark Male 5 4 +John Male 5 4 +Todd Male 5 5 +Ben Male 5 5 +Tom Male 5 6 +Lucky Male 5 6 +select c1, c2, c3, ntile(c3) over (partition by c2 order by pk) from t1; +c1 c2 c3 ntile(c3) over (partition by c2 order by pk) +Pam Female 6 1 +Sara Female 6 1 +Mary Female 6 2 +Jodi Female 6 2 +Pam Female 6 3 +Sara Female 6 4 +Mary Female 6 5 +Jodi Female 6 6 +Mark Male 5 1 +John Male 5 1 +Todd Male 5 1 +Ben Male 5 2 +Tom Male 5 2 +Lucky Male 5 2 +Mark Male 5 3 +John Male 5 3 +Todd Male 5 4 +Ben Male 5 4 +Tom Male 5 5 +Lucky Male 5 5 +update t1 set c3= 1 where pk = 1; +select c1, c2, c3, ntile(c3) over (partition by c2 order by pk) from t1; +ERROR HY000: Argument of NTILE must be greater than 0 +drop table t1; diff --git a/mysql-test/t/win_ntile.test b/mysql-test/t/win_ntile.test index 6f12e1f4005..c65ba7e1521 100644 --- a/mysql-test/t/win_ntile.test +++ b/mysql-test/t/win_ntile.test @@ -168,4 +168,47 @@ select pk, a, b, from t1; +drop table t1; + +--echo # +--echo # MDEV-9911 NTILE must return an error when parameter is not stable +--echo # + +create table t1 ( + pk int primary key, + c1 nvarchar(10), + c2 nvarchar(10), + c3 int +); + +insert into t1 values + (1, 'Mark', 'Male', 5), + (2, 'John', 'Male', 5), + (3, 'Pam', 'Female', 6), + (4, 'Sara', 'Female', 6), + (5, 'Todd', 'Male', 5), + (6, 'Mary', 'Female', 6), + (7, 'Ben', 'Male', 5), + (8, 'Jodi', 'Female', 6), + (9, 'Tom', 'Male', 5), + (10, 'Lucky', 'Male', 5), + (11, 'Mark', 'Male', 5), + (12, 'John', 'Male', 5), + (13, 'Pam', 'Female', 6), + (14, 'Sara', 'Female', 6), + (15, 'Todd', 'Male', 5), + (16, 'Mary', 'Female', 6), + (17, 'Ben', 'Male', 5), + (18, 'Jodi', 'Female', 6), + (19, 'Tom', 'Male', 5), + (20, 'Lucky', 'Male', 5); +# Correct usage of NTILE with a fix argument NTILE(6). +select c1, c2, c3, ntile(6) over (partition by c2 order by pk) from t1; +# Correct usage - constant NTILE (argument) in each partition. +select c1, c2, c3, ntile(c3) over (partition by c2 order by pk) from t1; + +update t1 set c3= 1 where pk = 1; +--error ER_INVALID_NTILE_ARGUMENT +select c1, c2, c3, ntile(c3) over (partition by c2 order by pk) from t1; + drop table t1; -- cgit v1.2.1 From c6eb21cd878f8762b3abb12813403ed8e04fee0c Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 24 Jul 2020 09:59:38 +0200 Subject: MDEV-21998: Server crashes in st_select_lex::add_table_to_list upon mix of KILL and sequences Continue support the hack of current select equal builtin select if selects stack is empty even after subselects. --- mysql-test/main/parser.result | 8 ++++++++ mysql-test/main/parser.test | 8 ++++++++ mysql-test/main/signal.result | 6 +++--- mysql-test/main/signal.test | 6 +++--- mysql-test/main/sp-error.result | 4 ++-- mysql-test/main/sp-error.test | 4 ++-- mysql-test/main/sp.result | 18 +++++++++--------- mysql-test/main/sp.test | 18 +++++++++--------- .../suite/compat/oracle/r/sp-cursor-rowtype.result | 2 +- mysql-test/suite/compat/oracle/r/sp.result | 8 ++++---- .../suite/compat/oracle/t/sp-cursor-rowtype.test | 2 +- mysql-test/suite/compat/oracle/t/sp.test | 8 ++++---- 12 files changed, 54 insertions(+), 38 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/parser.result b/mysql-test/main/parser.result index ad22cd886f7..37f510c8ce3 100644 --- a/mysql-test/main/parser.result +++ b/mysql-test/main/parser.result @@ -1893,4 +1893,12 @@ i 1 i 2 +# +# MDEV-21998: Server crashes in st_select_lex::add_table_to_list +# upon mix of KILL and sequences +# +KILL ( SELECT 1 ) + LASTVAL(s); +ERROR 42000: KILL does not support subqueries or stored functions +KILL LASTVAL(s); +ERROR 42000: KILL does not support subqueries or stored functions # End of 10.4 tests diff --git a/mysql-test/main/parser.test b/mysql-test/main/parser.test index 09fe73b7dbe..b8ea7bd22e4 100644 --- a/mysql-test/main/parser.test +++ b/mysql-test/main/parser.test @@ -1677,6 +1677,14 @@ $$ DELIMITER ;$$ +--echo # +--echo # MDEV-21998: Server crashes in st_select_lex::add_table_to_list +--echo # upon mix of KILL and sequences +--echo # +--error ER_SUBQUERIES_NOT_SUPPORTED +KILL ( SELECT 1 ) + LASTVAL(s); +--error ER_SUBQUERIES_NOT_SUPPORTED +KILL LASTVAL(s); --echo # End of 10.4 tests diff --git a/mysql-test/main/signal.result b/mysql-test/main/signal.result index 40b1609fc26..b5b479db017 100644 --- a/mysql-test/main/signal.result +++ b/mysql-test/main/signal.result @@ -2285,13 +2285,13 @@ begin DECLARE foo CONDITION FOR SQLSTATE '12345'; SIGNAL foo SET MYSQL_ERRNO = `65`; /* illegal */ end $$ -ERROR 42S22: Unknown column '65' in 'field list' +ERROR 42000: Undeclared variable: 65 create procedure test_signal() begin DECLARE foo CONDITION FOR SQLSTATE '12345'; SIGNAL foo SET MYSQL_ERRNO = `A`; /* illegal */ end $$ -ERROR 42S22: Unknown column 'A' in 'field list' +ERROR 42000: Undeclared variable: A create procedure test_signal() begin DECLARE foo CONDITION FOR SQLSTATE '12345'; @@ -2342,7 +2342,7 @@ DECLARE foo CONDITION FOR SQLSTATE '12345'; SIGNAL foo SET MYSQL_ERRNO = 1000, MESSAGE_TEXT = `Hello`; end $$ -ERROR 42S22: Unknown column 'Hello' in 'field list' +ERROR 42000: Undeclared variable: Hello create procedure test_signal() begin DECLARE foo CONDITION FOR SQLSTATE '12345'; diff --git a/mysql-test/main/signal.test b/mysql-test/main/signal.test index 5b40863b0e6..22cfc080895 100644 --- a/mysql-test/main/signal.test +++ b/mysql-test/main/signal.test @@ -2546,7 +2546,7 @@ end $$ call test_signal $$ drop procedure test_signal $$ --- error ER_BAD_FIELD_ERROR +-- error ER_SP_UNDECLARED_VAR create procedure test_signal() begin DECLARE foo CONDITION FOR SQLSTATE '12345'; @@ -2554,7 +2554,7 @@ begin end $$ --- error ER_BAD_FIELD_ERROR +-- error ER_SP_UNDECLARED_VAR create procedure test_signal() begin DECLARE foo CONDITION FOR SQLSTATE '12345'; @@ -2616,7 +2616,7 @@ end $$ call test_signal $$ drop procedure test_signal $$ --- error ER_BAD_FIELD_ERROR +-- error ER_SP_UNDECLARED_VAR create procedure test_signal() begin DECLARE foo CONDITION FOR SQLSTATE '12345'; diff --git a/mysql-test/main/sp-error.result b/mysql-test/main/sp-error.result index d77928fcf5e..1fe5bd6b77b 100644 --- a/mysql-test/main/sp-error.result +++ b/mysql-test/main/sp-error.result @@ -454,7 +454,7 @@ else set b = a; end if; end| -ERROR 42S22: Unknown column 'aa' in 'field list' +ERROR 42000: Undeclared variable: aa create procedure bug4344() drop procedure bug4344| ERROR HY000: Can't drop or alter a PROCEDURE from within another stored routine create procedure bug4344() drop function bug4344| @@ -1069,7 +1069,7 @@ IF bug13037_foo THEN SELECT 1; END IF; END| -ERROR 42S22: Unknown column 'bug13037_foo' in 'field list' +ERROR 42000: Undeclared variable: bug13037_foo CREATE PROCEDURE bug13037_p2() BEGIN SET @bug13037_foo = bug13037_bar; diff --git a/mysql-test/main/sp-error.test b/mysql-test/main/sp-error.test index 4b2169aad94..45a54fddad4 100644 --- a/mysql-test/main/sp-error.test +++ b/mysql-test/main/sp-error.test @@ -615,7 +615,7 @@ call bug2653_1(1, @b)| drop procedure bug2653_1| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug2653_2(a int, out b int) begin if aa < 0 then @@ -1508,7 +1508,7 @@ DROP PROCEDURE IF EXISTS bug13037_p3; delimiter |; ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR CREATE PROCEDURE bug13037_p1() BEGIN IF bug13037_foo THEN diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result index 376f44e3b01..d40516da88e 100644 --- a/mysql-test/main/sp.result +++ b/mysql-test/main/sp.result @@ -4186,7 +4186,7 @@ select v, isnull(v); end if; end; end| -ERROR 42S22: Unknown column 'undefined_var' in 'field list' +ERROR 42000: Undeclared variable: undefined_var create procedure bug14643_2() begin declare continue handler for sqlexception select 'boo' as 'Handler'; @@ -4198,7 +4198,7 @@ select 2; end case; select undefined_var; end| -ERROR 42S22: Unknown column 'undefined_var' in 'field list' +ERROR 42000: Undeclared variable: undefined_var drop procedure if exists bug14304| drop table if exists t3, t4| create table t3(a int primary key auto_increment)| @@ -4228,7 +4228,7 @@ create procedure bug14376() begin declare x int default x; end| -ERROR 42S22: Unknown column 'x' in 'field list' +ERROR 42000: Undeclared variable: x create procedure bug14376() begin declare x int default 42; @@ -4483,7 +4483,7 @@ select 'no' as 'v'; end if; select 'done' as 'End'; end| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42000: Undeclared variable: v create procedure bug14498_2() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -4492,7 +4492,7 @@ select 'yes' as 'v'; end while; select 'done' as 'End'; end| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42000: Undeclared variable: v create procedure bug14498_3() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -4501,7 +4501,7 @@ select 'maybe' as 'v'; until v end repeat; select 'done' as 'End'; end| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42000: Undeclared variable: v create procedure bug14498_4() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -4515,7 +4515,7 @@ select '?' as 'v'; end case; select 'done' as 'End'; end| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42000: Undeclared variable: v create procedure bug14498_5() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -4529,7 +4529,7 @@ select '?' as 'v'; end case; select 'done' as 'End'; end| -ERROR 42S22: Unknown column 'v' in 'field list' +ERROR 42000: Undeclared variable: v drop table if exists t3| drop procedure if exists bug15231_1| drop procedure if exists bug15231_2| @@ -8403,7 +8403,7 @@ DECLARE name VARCHAR(10); SET name="hello"; call p1(name2); END| -ERROR 42S22: Unknown column 'name2' in 'field list' +ERROR 42000: Undeclared variable: name2 call p2(); a hello diff --git a/mysql-test/main/sp.test b/mysql-test/main/sp.test index 7d1e8e2a8f9..bddd07bdb6c 100644 --- a/mysql-test/main/sp.test +++ b/mysql-test/main/sp.test @@ -5046,7 +5046,7 @@ drop procedure if exists bug14643_1| drop procedure if exists bug14643_2| --enable_warnings ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14643_1() begin declare continue handler for sqlexception select 'boo' as 'Handler'; @@ -5062,7 +5062,7 @@ begin end; end| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14643_2() begin declare continue handler for sqlexception select 'boo' as 'Handler'; @@ -5117,7 +5117,7 @@ drop table t3, t4| drop procedure if exists bug14376| --enable_warnings ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14376() begin declare x int default x; @@ -5344,7 +5344,7 @@ drop procedure if exists bug14498_4| drop procedure if exists bug14498_5| --enable_warnings ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14498_1() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -5357,7 +5357,7 @@ begin select 'done' as 'End'; end| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14498_2() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -5368,7 +5368,7 @@ begin select 'done' as 'End'; end| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14498_3() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -5379,7 +5379,7 @@ begin select 'done' as 'End'; end| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14498_4() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -5395,7 +5395,7 @@ begin select 'done' as 'End'; end| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR create procedure bug14498_5() begin declare continue handler for sqlexception select 'error' as 'Handler'; @@ -9931,7 +9931,7 @@ BEGIN call p1(name); END| ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR CREATE OR REPLACE PROCEDURE p3 () BEGIN DECLARE name VARCHAR(10); diff --git a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result index a60bbc38883..31d794c9f61 100644 --- a/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result +++ b/mysql-test/suite/compat/oracle/r/sp-cursor-rowtype.result @@ -1045,7 +1045,7 @@ NULL; END LOOP; END; $$ -ERROR 42000: Undefined CURSOR: c2 +ERROR 42000: Undeclared variable: c2 # Make sure "rec" shadows other declarations outside the loop CREATE TABLE t1 (a INT, b VARCHAR(10)); INSERT INTO t1 VALUES (10, 'b0'); diff --git a/mysql-test/suite/compat/oracle/r/sp.result b/mysql-test/suite/compat/oracle/r/sp.result index 6bcdf520edb..4b360241c01 100644 --- a/mysql-test/suite/compat/oracle/r/sp.result +++ b/mysql-test/suite/compat/oracle/r/sp.result @@ -1019,7 +1019,7 @@ LOOP EXIT WHEN unknown_ident IS NULL; END LOOP; END$$ -ERROR 42S22: Unknown column 'unknown_ident' in 'field list' +ERROR 42000: Undeclared variable: unknown_ident CREATE PROCEDURE p1 AS BEGIN @@ -1028,7 +1028,7 @@ LOOP EXIT label WHEN unknown_ident IS NULL; END LOOP; END$$ -ERROR 42S22: Unknown column 'unknown_ident' in 'field list' +ERROR 42000: Undeclared variable: unknown_ident CREATE PROCEDURE p1 AS BEGIN @@ -1036,7 +1036,7 @@ LOOP CONTINUE WHEN unknown_ident IS NULL; END LOOP; END$$ -ERROR 42S22: Unknown column 'unknown_ident' in 'field list' +ERROR 42000: Undeclared variable: unknown_ident CREATE PROCEDURE p1 AS BEGIN @@ -1045,7 +1045,7 @@ LOOP CONTINUE label WHEN unknown_ident IS NULL; END LOOP; END$$ -ERROR 42S22: Unknown column 'unknown_ident' in 'field list' +ERROR 42000: Undeclared variable: unknown_ident # # MDEV-10583 sql_mode=ORACLE: SQL%ROWCOUNT # diff --git a/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test b/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test index ba0ca9b6a60..78a38c5f4c6 100644 --- a/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test +++ b/mysql-test/suite/compat/oracle/t/sp-cursor-rowtype.test @@ -1128,7 +1128,7 @@ DELIMITER ;$$ --echo # IN followed by an unknown cursor name DELIMITER $$; ---error ER_SP_CURSOR_MISMATCH +--error ER_SP_UNDECLARED_VAR CREATE PROCEDURE p1 AS CURSOR c1 IS SELECT 'test' AS a FROM DUAL; BEGIN diff --git a/mysql-test/suite/compat/oracle/t/sp.test b/mysql-test/suite/compat/oracle/t/sp.test index 4fae03b7721..04b9f1be1e2 100644 --- a/mysql-test/suite/compat/oracle/t/sp.test +++ b/mysql-test/suite/compat/oracle/t/sp.test @@ -1094,7 +1094,7 @@ DROP FUNCTION f1; --echo # DELIMITER $$; ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR CREATE PROCEDURE p1 AS BEGIN @@ -1106,7 +1106,7 @@ DELIMITER ;$$ DELIMITER $$; ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR CREATE PROCEDURE p1 AS BEGIN @@ -1119,7 +1119,7 @@ DELIMITER ;$$ DELIMITER $$; ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR CREATE PROCEDURE p1 AS BEGIN @@ -1131,7 +1131,7 @@ DELIMITER ;$$ DELIMITER $$; ---error ER_BAD_FIELD_ERROR +--error ER_SP_UNDECLARED_VAR CREATE PROCEDURE p1 AS BEGIN -- cgit v1.2.1 From 6307b17aa11fb6179ed04f16abfa7ed9d5228e99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 28 Jul 2020 11:17:20 +0300 Subject: MDEV-20142 encryption.innodb_encrypt_temporary_tables failed in buildbot with wrong result Let us read both encrypted temporary tables to increase the changes of page flushing and eviction. --- mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result | 3 +++ mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test | 2 ++ 2 files changed, 5 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result index 9a291ae1354..541680ae862 100644 --- a/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result +++ b/mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result @@ -9,6 +9,9 @@ INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192; SELECT COUNT(*) FROM t1; COUNT(*) 8192 +SELECT COUNT(*) FROM t2; +COUNT(*) +8192 SELECT variable_value > @old_encrypted FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; variable_value > @old_encrypted diff --git a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test index 6c16afa28f4..c1a6ad38456 100644 --- a/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test +++ b/mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test @@ -15,6 +15,8 @@ CREATE TEMPORARY TABLE t2(f1 CHAR(100), f2 CHAR(200), f3 CHAR(200))ENGINE=InnoDB INSERT INTO t2 (f1,f2,f3) SELECT '', '', '' FROM seq_1_to_8192; SELECT COUNT(*) FROM t1; +SELECT COUNT(*) FROM t2; + SELECT variable_value > @old_encrypted FROM information_schema.global_status WHERE variable_name = 'innodb_encryption_n_temp_blocks_encrypted'; -- cgit v1.2.1 From 69cf6302f30e9bca7d2b0903c29fc1b26b09bcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 28 Jul 2020 14:22:45 +0300 Subject: galera_var_notify_cmd still hangs. --- mysql-test/suite/galera/disabled.def | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 36b0726609e..fb06cde5294 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -39,11 +39,12 @@ galera_sst_mariabackup_encrypt_with_key : MDEV-21484 galera_sst_mariabackup_encr galera_toi_ddl_nonconflicting : MDEV-21518 galera.galera_toi_ddl_nonconflicting galera_toi_truncate : MDEV-22996 Hang on galera_toi_truncate test case galera_var_node_address : MDEV-20485 Galera test failure +galera_var_notify_cmd : MDEV-21905 Galera test galera_var_notify_cmd causes hang galera_var_reject_queries : assertion in inline_mysql_socket_send galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit galera_wan : MDEV-17259 Test failure on galera.galera_wan -mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed. lp1376747-4 : MDEV-21911 Galera test failure on lp1376747-4 +mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed. 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 -- cgit v1.2.1 From 5b3b53ce36b9a05832af3a19ae8d846b6669a1f5 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 28 Jul 2020 17:32:19 +0400 Subject: MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() Fixing functions CEILING and FLOOR to return - TIME for TIME input - DATETIME for DATETIME and TIMESTAMP input --- mysql-test/main/type_datetime_hires.result | 165 +++++++++++++++++++ mysql-test/main/type_datetime_hires.test | 98 ++++++++++++ mysql-test/main/type_time_hires.result | 237 ++++++++++++++++++++++++++++ mysql-test/main/type_time_hires.test | 123 +++++++++++++++ mysql-test/main/type_timestamp_hires.result | 12 ++ mysql-test/main/type_timestamp_hires.test | 10 ++ 6 files changed, 645 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/main/type_datetime_hires.result b/mysql-test/main/type_datetime_hires.result index 5211515ea77..02adadd16c5 100644 --- a/mysql-test/main/type_datetime_hires.result +++ b/mysql-test/main/type_datetime_hires.result @@ -900,5 +900,170 @@ f NULL DROP TABLE t1; # +# MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +# +CREATE TABLE t1 AS SELECT +FLOOR(TIMESTAMP'2001-01-01 00:00:00.999999'), +CEILING(TIMESTAMP'2001-01-01 00:00:00.999999'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `FLOOR(TIMESTAMP'2001-01-01 00:00:00.999999')` datetime DEFAULT NULL, + `CEILING(TIMESTAMP'2001-01-01 00:00:00.999999')` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a DATETIME(6)); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.1'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.0'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.1'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.0'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.1'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.0'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.1'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.0'); +CREATE FUNCTION FLOOR_SP(a DATETIME(6)) RETURNS DATETIME +BEGIN +RETURN +CASE +WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a +ELSE TRUNCATE(a,0) +END; +END; +$$ +CREATE FUNCTION CEILING_SP(a DATETIME(6)) RETURNS DATETIME +BEGIN +RETURN +CASE +WHEN TRUNCATE(a,0)=TIMESTAMP'9999-12-31 23:59:59' THEN a +WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a +ELSE TRUNCATE(a,0)+INTERVAL 1 SECOND +END; +END; +$$ +SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a; +a FLOOR(a) FLOOR_SP(a) FLOOR(a)=FLOOR_SP(a) +0001-12-31 23:59:59.000000 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.100000 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.900000 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.990000 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.999000 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.999900 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.999990 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.999999 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0999-12-31 23:59:59.000000 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.100000 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.900000 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.990000 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.999000 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.999900 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.999990 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.999999 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +9999-12-30 23:59:59.000000 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.100000 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.900000 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.990000 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.999000 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.999900 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.999990 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.999999 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-31 23:59:59.000000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.100000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.900000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.990000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999900 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999990 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999999 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a; +a CEILING(a) CEILING_SP(a) CEILING(a)=CEILING_SP(a) +0001-12-31 23:59:59.000000 0001-12-31 23:59:59 0001-12-31 23:59:59 1 +0001-12-31 23:59:59.100000 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0001-12-31 23:59:59.900000 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0001-12-31 23:59:59.990000 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0001-12-31 23:59:59.999000 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0001-12-31 23:59:59.999900 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0001-12-31 23:59:59.999990 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0001-12-31 23:59:59.999999 0002-01-01 00:00:00 0002-01-01 00:00:00 1 +0999-12-31 23:59:59.000000 0999-12-31 23:59:59 0999-12-31 23:59:59 1 +0999-12-31 23:59:59.100000 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +0999-12-31 23:59:59.900000 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +0999-12-31 23:59:59.990000 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +0999-12-31 23:59:59.999000 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +0999-12-31 23:59:59.999900 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +0999-12-31 23:59:59.999990 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +0999-12-31 23:59:59.999999 1000-01-01 00:00:00 1000-01-01 00:00:00 1 +9999-12-30 23:59:59.000000 9999-12-30 23:59:59 9999-12-30 23:59:59 1 +9999-12-30 23:59:59.100000 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-30 23:59:59.900000 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-30 23:59:59.990000 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-30 23:59:59.999000 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-30 23:59:59.999900 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-30 23:59:59.999990 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-30 23:59:59.999999 9999-12-31 00:00:00 9999-12-31 00:00:00 1 +9999-12-31 23:59:59.000000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.100000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.900000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.990000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999000 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999900 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999990 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +9999-12-31 23:59:59.999999 9999-12-31 23:59:59 9999-12-31 23:59:59 1 +DROP FUNCTION FLOOR_SP; +DROP FUNCTION CEILING_SP; +DROP TABLE t1; +CREATE TABLE t1 (a DATETIME(6)); +INSERT INTO t1 VALUES ('0000-00-00 23:59:59.999999'); +INSERT INTO t1 VALUES ('0000-00-01 23:59:59.999999'); +INSERT INTO t1 VALUES ('0000-01-01 23:59:59.999999'); +INSERT INTO t1 VALUES ('0001-00-00 23:59:59.999999'); +SELECT a, FLOOR(a), CEILING(a) FROM t1; +a FLOOR(a) CEILING(a) +0000-00-00 23:59:59.999999 0000-00-00 23:59:59 NULL +0000-00-01 23:59:59.999999 0000-00-01 23:59:59 NULL +0000-01-01 23:59:59.999999 0000-01-01 23:59:59 NULL +0001-00-00 23:59:59.999999 0001-00-00 23:59:59 NULL +Warnings: +Warning 1411 Incorrect date value: '0000-00-00' for function round(datetime) +Warning 1411 Incorrect date value: '0000-00-01' for function round(datetime) +Warning 1411 Incorrect date value: '0000-01-01' for function round(datetime) +Warning 1411 Incorrect date value: '0001-00-00' for function round(datetime) +DROP TABLE t1; +SET sql_mode=ALLOW_INVALID_DATES; +CREATE TABLE t1 (a DATETIME(6)); +INSERT INTO t1 VALUES ('2001-02-28 23:59:59.999999'); +INSERT INTO t1 VALUES ('2001-02-29 23:59:59.999999'); +SELECT a, FLOOR(a), CEILING(a) FROM t1; +a FLOOR(a) CEILING(a) +2001-02-28 23:59:59.999999 2001-02-28 23:59:59 2001-03-01 00:00:00 +2001-02-29 23:59:59.999999 2001-02-29 23:59:59 NULL +Warnings: +Warning 1411 Incorrect date value: '2001-02-29' for function round(datetime) +DROP TABLE t1; +SET sql_mode=DEFAULT; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_datetime_hires.test b/mysql-test/main/type_datetime_hires.test index 7b3b37560a3..6476d7fb182 100644 --- a/mysql-test/main/type_datetime_hires.test +++ b/mysql-test/main/type_datetime_hires.test @@ -156,6 +156,104 @@ SELECT ROUND(a) AS f FROM t1 GROUP BY a WITH ROLLUP; DROP TABLE t1; +--echo # +--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +--echo # + +CREATE TABLE t1 AS SELECT + FLOOR(TIMESTAMP'2001-01-01 00:00:00.999999'), + CEILING(TIMESTAMP'2001-01-01 00:00:00.999999'); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a DATETIME(6)); + +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.999'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.99'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.9'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.1'); +INSERT INTO t1 VALUES ('9999-12-31 23:59:59.0'); + +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.999'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.99'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.9'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.1'); +INSERT INTO t1 VALUES ('9999-12-30 23:59:59.0'); + +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.999'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.99'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.9'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.1'); +INSERT INTO t1 VALUES ('0999-12-31 23:59:59.0'); + +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.999'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.99'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.9'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.1'); +INSERT INTO t1 VALUES ('0001-12-31 23:59:59.0'); + + +DELIMITER $$; +CREATE FUNCTION FLOOR_SP(a DATETIME(6)) RETURNS DATETIME +BEGIN + RETURN + CASE + WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a + ELSE TRUNCATE(a,0) + END; +END; +$$ +DELIMITER ;$$ + +DELIMITER $$; +CREATE FUNCTION CEILING_SP(a DATETIME(6)) RETURNS DATETIME +BEGIN + RETURN + CASE + WHEN TRUNCATE(a,0)=TIMESTAMP'9999-12-31 23:59:59' THEN a + WHEN EXTRACT(MICROSECOND FROM a)=0 THEN a + ELSE TRUNCATE(a,0)+INTERVAL 1 SECOND + END; +END; +$$ +DELIMITER ;$$ + +SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a; +SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a; + +DROP FUNCTION FLOOR_SP; +DROP FUNCTION CEILING_SP; + +DROP TABLE t1; + +CREATE TABLE t1 (a DATETIME(6)); +INSERT INTO t1 VALUES ('0000-00-00 23:59:59.999999'); +INSERT INTO t1 VALUES ('0000-00-01 23:59:59.999999'); +INSERT INTO t1 VALUES ('0000-01-01 23:59:59.999999'); +INSERT INTO t1 VALUES ('0001-00-00 23:59:59.999999'); +SELECT a, FLOOR(a), CEILING(a) FROM t1; +DROP TABLE t1; + +SET sql_mode=ALLOW_INVALID_DATES; +CREATE TABLE t1 (a DATETIME(6)); +INSERT INTO t1 VALUES ('2001-02-28 23:59:59.999999'); +INSERT INTO t1 VALUES ('2001-02-29 23:59:59.999999'); +SELECT a, FLOOR(a), CEILING(a) FROM t1; +DROP TABLE t1; +SET sql_mode=DEFAULT; + --echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/main/type_time_hires.result b/mysql-test/main/type_time_hires.result index 6122afcfc47..c7fecbef76b 100644 --- a/mysql-test/main/type_time_hires.result +++ b/mysql-test/main/type_time_hires.result @@ -670,3 +670,240 @@ a ROUND(a,-6) 838:59:59.999999 838:59:59 DROP TABLE t1; SET time_zone=DEFAULT; +# +# MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +# +CREATE TABLE t1 AS SELECT +FLOOR(TIME'00:00:00.999999'), +CEILING(TIME'00:00:00.999999'); +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `FLOOR(TIME'00:00:00.999999')` time NOT NULL, + `CEILING(TIME'00:00:00.999999')` time NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +CREATE TABLE t1 (a TIME(6)); +INSERT INTO t1 VALUES ('838:59:59.999999'); +INSERT INTO t1 VALUES ('838:59:59.99999'); +INSERT INTO t1 VALUES ('838:59:59.9999'); +INSERT INTO t1 VALUES ('838:59:59.999'); +INSERT INTO t1 VALUES ('838:59:59.99'); +INSERT INTO t1 VALUES ('838:59:59.9'); +INSERT INTO t1 VALUES ('838:59:59.1'); +INSERT INTO t1 VALUES ('838:59:59.0'); +INSERT INTO t1 VALUES ('837:59:59.999999'); +INSERT INTO t1 VALUES ('837:59:59.99999'); +INSERT INTO t1 VALUES ('837:59:59.9999'); +INSERT INTO t1 VALUES ('837:59:59.999'); +INSERT INTO t1 VALUES ('837:59:59.99'); +INSERT INTO t1 VALUES ('837:59:59.9'); +INSERT INTO t1 VALUES ('837:59:59.1'); +INSERT INTO t1 VALUES ('837:59:59.0'); +INSERT INTO t1 VALUES ('23:59:59.999999'); +INSERT INTO t1 VALUES ('23:59:59.99999'); +INSERT INTO t1 VALUES ('23:59:59.9999'); +INSERT INTO t1 VALUES ('23:59:59.999'); +INSERT INTO t1 VALUES ('23:59:59.99'); +INSERT INTO t1 VALUES ('23:59:59.9'); +INSERT INTO t1 VALUES ('23:59:59.1'); +INSERT INTO t1 VALUES ('23:59:59.0'); +INSERT INTO t1 VALUES ('00:00:00.999999'); +INSERT INTO t1 VALUES ('00:00:00.99999'); +INSERT INTO t1 VALUES ('00:00:00.9999'); +INSERT INTO t1 VALUES ('00:00:00.999'); +INSERT INTO t1 VALUES ('00:00:00.99'); +INSERT INTO t1 VALUES ('00:00:00.9'); +INSERT INTO t1 VALUES ('00:00:00.1'); +INSERT INTO t1 VALUES ('00:00:00.0'); +INSERT INTO t1 VALUES ('-00:00:00.999999'); +INSERT INTO t1 VALUES ('-00:00:00.99999'); +INSERT INTO t1 VALUES ('-00:00:00.9999'); +INSERT INTO t1 VALUES ('-00:00:00.999'); +INSERT INTO t1 VALUES ('-00:00:00.99'); +INSERT INTO t1 VALUES ('-00:00:00.9'); +INSERT INTO t1 VALUES ('-00:00:00.1'); +INSERT INTO t1 VALUES ('-00:00:00.0'); +INSERT INTO t1 VALUES ('-23:59:59.999999'); +INSERT INTO t1 VALUES ('-23:59:59.99999'); +INSERT INTO t1 VALUES ('-23:59:59.9999'); +INSERT INTO t1 VALUES ('-23:59:59.999'); +INSERT INTO t1 VALUES ('-23:59:59.99'); +INSERT INTO t1 VALUES ('-23:59:59.9'); +INSERT INTO t1 VALUES ('-23:59:59.1'); +INSERT INTO t1 VALUES ('-23:59:59.0'); +INSERT INTO t1 VALUES ('-837:59:59.999999'); +INSERT INTO t1 VALUES ('-837:59:59.99999'); +INSERT INTO t1 VALUES ('-837:59:59.9999'); +INSERT INTO t1 VALUES ('-837:59:59.999'); +INSERT INTO t1 VALUES ('-837:59:59.99'); +INSERT INTO t1 VALUES ('-837:59:59.9'); +INSERT INTO t1 VALUES ('-837:59:59.1'); +INSERT INTO t1 VALUES ('-837:59:59.0'); +INSERT INTO t1 VALUES ('-838:59:59.999999'); +INSERT INTO t1 VALUES ('-838:59:59.99999'); +INSERT INTO t1 VALUES ('-838:59:59.9999'); +INSERT INTO t1 VALUES ('-838:59:59.999'); +INSERT INTO t1 VALUES ('-838:59:59.99'); +INSERT INTO t1 VALUES ('-838:59:59.9'); +INSERT INTO t1 VALUES ('-838:59:59.1'); +INSERT INTO t1 VALUES ('-838:59:59.0'); +CREATE FUNCTION FLOOR_SP(a TIME(6)) RETURNS TIME +BEGIN +RETURN +CASE +WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a +WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a +WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits +WHEN a<0 THEN TRUNCATE(a,0)-INTERVAL 1 SECOND -- negative values +WHEN a>0 THEN TRUNCATE(a,0) -- positive values +END; +END; +$$ +CREATE FUNCTION CEILING_SP(a TIME(6)) RETURNS TIME +BEGIN +RETURN +CASE +WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a +WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a +WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits +WHEN a<0 THEN TRUNCATE(a,0) -- negative values +WHEN a>0 THEN TRUNCATE(a,0)+INTERVAL 1 SECOND -- positive values +END; +END; +$$ +SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a; +a FLOOR(a) FLOOR_SP(a) FLOOR(a)=FLOOR_SP(a) +-838:59:59.999999 -838:59:59 -838:59:59 1 +-838:59:59.999990 -838:59:59 -838:59:59 1 +-838:59:59.999900 -838:59:59 -838:59:59 1 +-838:59:59.999000 -838:59:59 -838:59:59 1 +-838:59:59.990000 -838:59:59 -838:59:59 1 +-838:59:59.900000 -838:59:59 -838:59:59 1 +-838:59:59.100000 -838:59:59 -838:59:59 1 +-838:59:59.000000 -838:59:59 -838:59:59 1 +-837:59:59.999999 -838:00:00 -838:00:00 1 +-837:59:59.999990 -838:00:00 -838:00:00 1 +-837:59:59.999900 -838:00:00 -838:00:00 1 +-837:59:59.999000 -838:00:00 -838:00:00 1 +-837:59:59.990000 -838:00:00 -838:00:00 1 +-837:59:59.900000 -838:00:00 -838:00:00 1 +-837:59:59.100000 -838:00:00 -838:00:00 1 +-837:59:59.000000 -837:59:59 -837:59:59 1 +-23:59:59.999999 -24:00:00 -24:00:00 1 +-23:59:59.999990 -24:00:00 -24:00:00 1 +-23:59:59.999900 -24:00:00 -24:00:00 1 +-23:59:59.999000 -24:00:00 -24:00:00 1 +-23:59:59.990000 -24:00:00 -24:00:00 1 +-23:59:59.900000 -24:00:00 -24:00:00 1 +-23:59:59.100000 -24:00:00 -24:00:00 1 +-23:59:59.000000 -23:59:59 -23:59:59 1 +-00:00:00.999999 -00:00:01 -00:00:01 1 +-00:00:00.999990 -00:00:01 -00:00:01 1 +-00:00:00.999900 -00:00:01 -00:00:01 1 +-00:00:00.999000 -00:00:01 -00:00:01 1 +-00:00:00.990000 -00:00:01 -00:00:01 1 +-00:00:00.900000 -00:00:01 -00:00:01 1 +-00:00:00.100000 -00:00:01 -00:00:01 1 +00:00:00.000000 00:00:00 00:00:00 1 +00:00:00.000000 00:00:00 00:00:00 1 +00:00:00.100000 00:00:00 00:00:00 1 +00:00:00.900000 00:00:00 00:00:00 1 +00:00:00.990000 00:00:00 00:00:00 1 +00:00:00.999000 00:00:00 00:00:00 1 +00:00:00.999900 00:00:00 00:00:00 1 +00:00:00.999990 00:00:00 00:00:00 1 +00:00:00.999999 00:00:00 00:00:00 1 +23:59:59.000000 23:59:59 23:59:59 1 +23:59:59.100000 23:59:59 23:59:59 1 +23:59:59.900000 23:59:59 23:59:59 1 +23:59:59.990000 23:59:59 23:59:59 1 +23:59:59.999000 23:59:59 23:59:59 1 +23:59:59.999900 23:59:59 23:59:59 1 +23:59:59.999990 23:59:59 23:59:59 1 +23:59:59.999999 23:59:59 23:59:59 1 +837:59:59.000000 837:59:59 837:59:59 1 +837:59:59.100000 837:59:59 837:59:59 1 +837:59:59.900000 837:59:59 837:59:59 1 +837:59:59.990000 837:59:59 837:59:59 1 +837:59:59.999000 837:59:59 837:59:59 1 +837:59:59.999900 837:59:59 837:59:59 1 +837:59:59.999990 837:59:59 837:59:59 1 +837:59:59.999999 837:59:59 837:59:59 1 +838:59:59.000000 838:59:59 838:59:59 1 +838:59:59.100000 838:59:59 838:59:59 1 +838:59:59.900000 838:59:59 838:59:59 1 +838:59:59.990000 838:59:59 838:59:59 1 +838:59:59.999000 838:59:59 838:59:59 1 +838:59:59.999900 838:59:59 838:59:59 1 +838:59:59.999990 838:59:59 838:59:59 1 +838:59:59.999999 838:59:59 838:59:59 1 +SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a; +a CEILING(a) CEILING_SP(a) CEILING(a)=CEILING_SP(a) +-838:59:59.999999 -838:59:59 -838:59:59 1 +-838:59:59.999990 -838:59:59 -838:59:59 1 +-838:59:59.999900 -838:59:59 -838:59:59 1 +-838:59:59.999000 -838:59:59 -838:59:59 1 +-838:59:59.990000 -838:59:59 -838:59:59 1 +-838:59:59.900000 -838:59:59 -838:59:59 1 +-838:59:59.100000 -838:59:59 -838:59:59 1 +-838:59:59.000000 -838:59:59 -838:59:59 1 +-837:59:59.999999 -837:59:59 -837:59:59 1 +-837:59:59.999990 -837:59:59 -837:59:59 1 +-837:59:59.999900 -837:59:59 -837:59:59 1 +-837:59:59.999000 -837:59:59 -837:59:59 1 +-837:59:59.990000 -837:59:59 -837:59:59 1 +-837:59:59.900000 -837:59:59 -837:59:59 1 +-837:59:59.100000 -837:59:59 -837:59:59 1 +-837:59:59.000000 -837:59:59 -837:59:59 1 +-23:59:59.999999 -23:59:59 -23:59:59 1 +-23:59:59.999990 -23:59:59 -23:59:59 1 +-23:59:59.999900 -23:59:59 -23:59:59 1 +-23:59:59.999000 -23:59:59 -23:59:59 1 +-23:59:59.990000 -23:59:59 -23:59:59 1 +-23:59:59.900000 -23:59:59 -23:59:59 1 +-23:59:59.100000 -23:59:59 -23:59:59 1 +-23:59:59.000000 -23:59:59 -23:59:59 1 +-00:00:00.999999 00:00:00 00:00:00 1 +-00:00:00.999990 00:00:00 00:00:00 1 +-00:00:00.999900 00:00:00 00:00:00 1 +-00:00:00.999000 00:00:00 00:00:00 1 +-00:00:00.990000 00:00:00 00:00:00 1 +-00:00:00.900000 00:00:00 00:00:00 1 +-00:00:00.100000 00:00:00 00:00:00 1 +00:00:00.000000 00:00:00 00:00:00 1 +00:00:00.000000 00:00:00 00:00:00 1 +00:00:00.100000 00:00:01 00:00:01 1 +00:00:00.900000 00:00:01 00:00:01 1 +00:00:00.990000 00:00:01 00:00:01 1 +00:00:00.999000 00:00:01 00:00:01 1 +00:00:00.999900 00:00:01 00:00:01 1 +00:00:00.999990 00:00:01 00:00:01 1 +00:00:00.999999 00:00:01 00:00:01 1 +23:59:59.000000 23:59:59 23:59:59 1 +23:59:59.100000 24:00:00 24:00:00 1 +23:59:59.900000 24:00:00 24:00:00 1 +23:59:59.990000 24:00:00 24:00:00 1 +23:59:59.999000 24:00:00 24:00:00 1 +23:59:59.999900 24:00:00 24:00:00 1 +23:59:59.999990 24:00:00 24:00:00 1 +23:59:59.999999 24:00:00 24:00:00 1 +837:59:59.000000 837:59:59 837:59:59 1 +837:59:59.100000 838:00:00 838:00:00 1 +837:59:59.900000 838:00:00 838:00:00 1 +837:59:59.990000 838:00:00 838:00:00 1 +837:59:59.999000 838:00:00 838:00:00 1 +837:59:59.999900 838:00:00 838:00:00 1 +837:59:59.999990 838:00:00 838:00:00 1 +837:59:59.999999 838:00:00 838:00:00 1 +838:59:59.000000 838:59:59 838:59:59 1 +838:59:59.100000 838:59:59 838:59:59 1 +838:59:59.900000 838:59:59 838:59:59 1 +838:59:59.990000 838:59:59 838:59:59 1 +838:59:59.999000 838:59:59 838:59:59 1 +838:59:59.999900 838:59:59 838:59:59 1 +838:59:59.999990 838:59:59 838:59:59 1 +838:59:59.999999 838:59:59 838:59:59 1 +DROP FUNCTION FLOOR_SP; +DROP FUNCTION CEILING_SP; +DROP TABLE t1; diff --git a/mysql-test/main/type_time_hires.test b/mysql-test/main/type_time_hires.test index 0949738e949..f9b4a5a9f27 100644 --- a/mysql-test/main/type_time_hires.test +++ b/mysql-test/main/type_time_hires.test @@ -73,3 +73,126 @@ SELECT a, ROUND(a,-6) FROM t1; DROP TABLE t1; SET time_zone=DEFAULT; + + +--echo # +--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +--echo # + +CREATE TABLE t1 AS SELECT + FLOOR(TIME'00:00:00.999999'), + CEILING(TIME'00:00:00.999999'); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +CREATE TABLE t1 (a TIME(6)); + +INSERT INTO t1 VALUES ('838:59:59.999999'); +INSERT INTO t1 VALUES ('838:59:59.99999'); +INSERT INTO t1 VALUES ('838:59:59.9999'); +INSERT INTO t1 VALUES ('838:59:59.999'); +INSERT INTO t1 VALUES ('838:59:59.99'); +INSERT INTO t1 VALUES ('838:59:59.9'); +INSERT INTO t1 VALUES ('838:59:59.1'); +INSERT INTO t1 VALUES ('838:59:59.0'); + +INSERT INTO t1 VALUES ('837:59:59.999999'); +INSERT INTO t1 VALUES ('837:59:59.99999'); +INSERT INTO t1 VALUES ('837:59:59.9999'); +INSERT INTO t1 VALUES ('837:59:59.999'); +INSERT INTO t1 VALUES ('837:59:59.99'); +INSERT INTO t1 VALUES ('837:59:59.9'); +INSERT INTO t1 VALUES ('837:59:59.1'); +INSERT INTO t1 VALUES ('837:59:59.0'); + +INSERT INTO t1 VALUES ('23:59:59.999999'); +INSERT INTO t1 VALUES ('23:59:59.99999'); +INSERT INTO t1 VALUES ('23:59:59.9999'); +INSERT INTO t1 VALUES ('23:59:59.999'); +INSERT INTO t1 VALUES ('23:59:59.99'); +INSERT INTO t1 VALUES ('23:59:59.9'); +INSERT INTO t1 VALUES ('23:59:59.1'); +INSERT INTO t1 VALUES ('23:59:59.0'); + +INSERT INTO t1 VALUES ('00:00:00.999999'); +INSERT INTO t1 VALUES ('00:00:00.99999'); +INSERT INTO t1 VALUES ('00:00:00.9999'); +INSERT INTO t1 VALUES ('00:00:00.999'); +INSERT INTO t1 VALUES ('00:00:00.99'); +INSERT INTO t1 VALUES ('00:00:00.9'); +INSERT INTO t1 VALUES ('00:00:00.1'); +INSERT INTO t1 VALUES ('00:00:00.0'); + +INSERT INTO t1 VALUES ('-00:00:00.999999'); +INSERT INTO t1 VALUES ('-00:00:00.99999'); +INSERT INTO t1 VALUES ('-00:00:00.9999'); +INSERT INTO t1 VALUES ('-00:00:00.999'); +INSERT INTO t1 VALUES ('-00:00:00.99'); +INSERT INTO t1 VALUES ('-00:00:00.9'); +INSERT INTO t1 VALUES ('-00:00:00.1'); +INSERT INTO t1 VALUES ('-00:00:00.0'); + +INSERT INTO t1 VALUES ('-23:59:59.999999'); +INSERT INTO t1 VALUES ('-23:59:59.99999'); +INSERT INTO t1 VALUES ('-23:59:59.9999'); +INSERT INTO t1 VALUES ('-23:59:59.999'); +INSERT INTO t1 VALUES ('-23:59:59.99'); +INSERT INTO t1 VALUES ('-23:59:59.9'); +INSERT INTO t1 VALUES ('-23:59:59.1'); +INSERT INTO t1 VALUES ('-23:59:59.0'); + +INSERT INTO t1 VALUES ('-837:59:59.999999'); +INSERT INTO t1 VALUES ('-837:59:59.99999'); +INSERT INTO t1 VALUES ('-837:59:59.9999'); +INSERT INTO t1 VALUES ('-837:59:59.999'); +INSERT INTO t1 VALUES ('-837:59:59.99'); +INSERT INTO t1 VALUES ('-837:59:59.9'); +INSERT INTO t1 VALUES ('-837:59:59.1'); +INSERT INTO t1 VALUES ('-837:59:59.0'); + +INSERT INTO t1 VALUES ('-838:59:59.999999'); +INSERT INTO t1 VALUES ('-838:59:59.99999'); +INSERT INTO t1 VALUES ('-838:59:59.9999'); +INSERT INTO t1 VALUES ('-838:59:59.999'); +INSERT INTO t1 VALUES ('-838:59:59.99'); +INSERT INTO t1 VALUES ('-838:59:59.9'); +INSERT INTO t1 VALUES ('-838:59:59.1'); +INSERT INTO t1 VALUES ('-838:59:59.0'); + +DELIMITER $$; +CREATE FUNCTION FLOOR_SP(a TIME(6)) RETURNS TIME +BEGIN + RETURN + CASE + WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a + WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a + WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits + WHEN a<0 THEN TRUNCATE(a,0)-INTERVAL 1 SECOND -- negative values + WHEN a>0 THEN TRUNCATE(a,0) -- positive values + END; +END; +$$ +DELIMITER ;$$ + +DELIMITER $$; +CREATE FUNCTION CEILING_SP(a TIME(6)) RETURNS TIME +BEGIN + RETURN + CASE + WHEN TRUNCATE(a,0)=TIME'838:59:59' THEN a + WHEN TRUNCATE(a,0)=TIME'-838:59:59' THEN a + WHEN a=TRUNCATE(a,0) THEN a -- no fractional digits + WHEN a<0 THEN TRUNCATE(a,0) -- negative values + WHEN a>0 THEN TRUNCATE(a,0)+INTERVAL 1 SECOND -- positive values + END; +END; +$$ +DELIMITER ;$$ + +SELECT a, FLOOR(a), FLOOR_SP(a), FLOOR(a)=FLOOR_SP(a) FROM t1 ORDER BY a; +SELECT a, CEILING(a), CEILING_SP(a), CEILING(a)=CEILING_SP(a) FROM t1 ORDER BY a; + +DROP FUNCTION FLOOR_SP; +DROP FUNCTION CEILING_SP; + +DROP TABLE t1; diff --git a/mysql-test/main/type_timestamp_hires.result b/mysql-test/main/type_timestamp_hires.result index dc69aa36b0f..64675ff9973 100644 --- a/mysql-test/main/type_timestamp_hires.result +++ b/mysql-test/main/type_timestamp_hires.result @@ -626,5 +626,17 @@ a ROUND(a,-6) DROP TABLE t1; SET time_zone=DEFAULT; # +# MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +# +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +CREATE TABLE t2 AS SELECT FLOOR(a), CEILING(a) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `FLOOR(a)` datetime DEFAULT NULL, + `CEILING(a)` datetime DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1, t2; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_timestamp_hires.test b/mysql-test/main/type_timestamp_hires.test index f2e765d09fe..27aed16d6be 100644 --- a/mysql-test/main/type_timestamp_hires.test +++ b/mysql-test/main/type_timestamp_hires.test @@ -107,6 +107,16 @@ DROP TABLE t1; SET time_zone=DEFAULT; + +--echo # +--echo # MDEV-23311 CEILING() and FLOOR() convert temporal input to numbers, unlike ROUND() and TRUNCATE() +--echo # + +CREATE TABLE t1 (a TIMESTAMP NOT NULL); +CREATE TABLE t2 AS SELECT FLOOR(a), CEILING(a) FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t1, t2; + --echo # --echo # End of 10.4 tests --echo # -- cgit v1.2.1 From 423de1e57417281a8b7265b97f46bf3933e411ad Mon Sep 17 00:00:00 2001 From: Eugene Kosov Date: Tue, 28 Jul 2020 09:37:45 +0300 Subject: MDEV-23245 MDEV-22898 Still getting assertion failure in file data0type.cc line 67 Doesn't allow instant alter of a field which is a prefix part of some key is_part_of_a_key_prefix(): I hope the name of the function is clear ha_innobase::can_convert_string() ha_innobase::can_convert_varstring() ha_innobase::can_convert_blob(): it can't when field is_part_of_a_key_prefix() --- .../suite/innodb/r/instant_alter_charset.result | 40 ++++++++++++++++++++++ .../suite/innodb/t/instant_alter_charset.test | 40 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/instant_alter_charset.result b/mysql-test/suite/innodb/r/instant_alter_charset.result index 9e7dab8f7b4..6b60c79b558 100644 --- a/mysql-test/suite/innodb/r/instant_alter_charset.result +++ b/mysql-test/suite/innodb/r/instant_alter_charset.result @@ -1992,3 +1992,43 @@ KEY a_key (b, a(1)) INSERT INTO t1 VALUES (); ALTER TABLE t1 MODIFY a text DEFAULT NULL; DROP TABLE t1; +# +# MDEV-23245 Still getting assertion failure in file data0type.cc line 67 +# +CREATE TABLE Foo +( +Bar char(2) CHARACTER SET utf8, +KEY Bar (Bar(1)) +) ENGINE = InnoDB; +ALTER TABLE Foo MODIFY Bar char(2) CHARACTER SET utf8mb4; +INSERT INTO Foo VALUES ('a'); +DROP TABLE Foo; +CREATE TABLE Foo +( +Bar varchar(2) CHARACTER SET utf8, +KEY Bar (Bar(1)) +) ENGINE = InnoDB; +ALTER TABLE Foo MODIFY Bar varchar(2) CHARACTER SET utf8mb4; +INSERT INTO Foo VALUES ('a'); +DROP TABLE Foo; +CREATE TABLE Foo +( +Bar text CHARACTER SET utf8, +KEY Bar (Bar(1)) +) ENGINE = InnoDB; +ALTER TABLE Foo MODIFY Bar text CHARACTER SET utf8mb4; +INSERT INTO Foo VALUES ('a'); +DROP TABLE Foo; +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci, +PRIMARY KEY (a(1))) +ENGINE=InnoDB; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` varchar(2) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + PRIMARY KEY (`a`(1)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +ALTER TABLE t1 MODIFY a VARCHAR(2) +CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +INSERT INTO t1 VALUES ('a'); +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/instant_alter_charset.test b/mysql-test/suite/innodb/t/instant_alter_charset.test index b14c7861c25..a5ddd49830c 100644 --- a/mysql-test/suite/innodb/t/instant_alter_charset.test +++ b/mysql-test/suite/innodb/t/instant_alter_charset.test @@ -803,3 +803,43 @@ CREATE TABLE t1 ( INSERT INTO t1 VALUES (); ALTER TABLE t1 MODIFY a text DEFAULT NULL; DROP TABLE t1; + +--echo # +--echo # MDEV-23245 Still getting assertion failure in file data0type.cc line 67 +--echo # + +CREATE TABLE Foo +( + Bar char(2) CHARACTER SET utf8, + KEY Bar (Bar(1)) +) ENGINE = InnoDB; +ALTER TABLE Foo MODIFY Bar char(2) CHARACTER SET utf8mb4; +INSERT INTO Foo VALUES ('a'); +DROP TABLE Foo; + +CREATE TABLE Foo +( + Bar varchar(2) CHARACTER SET utf8, + KEY Bar (Bar(1)) +) ENGINE = InnoDB; +ALTER TABLE Foo MODIFY Bar varchar(2) CHARACTER SET utf8mb4; +INSERT INTO Foo VALUES ('a'); +DROP TABLE Foo; + +CREATE TABLE Foo +( + Bar text CHARACTER SET utf8, + KEY Bar (Bar(1)) +) ENGINE = InnoDB; +ALTER TABLE Foo MODIFY Bar text CHARACTER SET utf8mb4; +INSERT INTO Foo VALUES ('a'); +DROP TABLE Foo; + +CREATE TABLE t1 (a VARCHAR(2) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci, +PRIMARY KEY (a(1))) +ENGINE=InnoDB; +SHOW CREATE TABLE t1; +ALTER TABLE t1 MODIFY a VARCHAR(2) +CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +INSERT INTO t1 VALUES ('a'); +DROP TABLE t1; -- cgit v1.2.1 From 34f2be3b296fdd5933687eda9c3ef3ba9f707261 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Tue, 24 Jul 2018 01:49:59 +1000 Subject: MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL (partition is full) when rotation time for the last interval passed * remove one case of WARN_VERS_PART_FULL --- .../suite/versioning/r/partition_rotation.result | 20 ++++++++++++++++---- .../suite/versioning/t/partition_rotation.test | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+), 4 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/versioning/r/partition_rotation.result b/mysql-test/suite/versioning/r/partition_rotation.result index 82558085c02..ff312c937cc 100644 --- a/mysql-test/suite/versioning/r/partition_rotation.result +++ b/mysql-test/suite/versioning/r/partition_rotation.result @@ -8,11 +8,7 @@ insert t1 values (1); delete from t1; set timestamp=unix_timestamp('2001-02-04 10:20:50'); insert t1 values (2); -Warnings: -Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions delete from t1; -Warnings: -Warning 4114 Versioned table `test`.`t1`: partition `p1` is full, add more HISTORY partitions select subpartition_name,partition_description,table_rows from information_schema.partitions where table_schema='test' and table_name='t1'; subpartition_name partition_description table_rows p1sp0 2001-02-04 10:20:30 1 @@ -55,4 +51,20 @@ i explain partitions select * from t1 for system_time all where row_end = @ts; id select_type table partitions type possible_keys key key_len ref rows Extra 1 SIMPLE t1 p1_p1sp0,p1_p1sp1 # NULL NULL NULL NULL # # +# +# MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL +# +set timestamp= unix_timestamp('2020-07-29 10:30:10'); +create or replace table t1 (a int) with system versioning +partition by system_time interval 1 second ( +partition p0 history, +partition p1 history, +partition pc current +); +set timestamp= unix_timestamp('2020-07-29 10:30:14'); +insert into t1 values (1),(2),(3); +show warnings; +Level Code Message +# Cleanup +set timestamp= default; drop table t1; diff --git a/mysql-test/suite/versioning/t/partition_rotation.test b/mysql-test/suite/versioning/t/partition_rotation.test index 4937a2a069b..efcd393c7e0 100644 --- a/mysql-test/suite/versioning/t/partition_rotation.test +++ b/mysql-test/suite/versioning/t/partition_rotation.test @@ -37,4 +37,22 @@ select * from t1 for system_time all where row_end = @ts; --replace_column 5 # 10 # 11 # explain partitions select * from t1 for system_time all where row_end = @ts; +--echo # +--echo # MDEV-16023 Unfortunate error message WARN_VERS_PART_FULL +--echo # + +set timestamp= unix_timestamp('2020-07-29 10:30:10'); +create or replace table t1 (a int) with system versioning + partition by system_time interval 1 second ( + partition p0 history, + partition p1 history, + partition pc current + ); + +set timestamp= unix_timestamp('2020-07-29 10:30:14'); +insert into t1 values (1),(2),(3); +show warnings; + +--echo # Cleanup +set timestamp= default; drop table t1; -- cgit v1.2.1 From 2107e3bb9c0d2e039c371a36fe7b3d7dcb2b6c5f Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 28 Jul 2020 10:39:05 +0200 Subject: MDEV-21258: Can't uninstall plugin if the library file doesn't exist Removing plugin from the mysql.plugin even if the plugin is not loaded --- mysql-test/r/plugin.result | 13 +++++++++++++ mysql-test/suite/plugins/r/audit_null_debug.result | 1 + mysql-test/suite/plugins/t/audit_null_debug.test | 3 ++- mysql-test/t/plugin.test | 20 ++++++++++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result index 93a150ae424..04931001901 100644 --- a/mysql-test/r/plugin.result +++ b/mysql-test/r/plugin.result @@ -341,3 +341,16 @@ RENAME TABLE t1 TO t2; ERROR 42S02: Table 'test.t1' doesn't exist DROP TABLE t1; # End of 10.1 test +# +# MDEV-21258: Can't uninstall plugin if the library file doesn't exist +# +insert into mysql.plugin values ("unexisting_plugin", "soname"); +select * from mysql.plugin WHERE name='unexisting_plugin'; +name dl +unexisting_plugin soname +UNINSTALL PLUGIN unexisting_plugin; +select * from mysql.plugin WHERE name='unexisting_plugin'; +name dl +UNINSTALL PLUGIN unexisting_plugin; +ERROR 42000: PLUGIN unexisting_plugin does not exist +# End of 10.2 tests diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result index 9d5c7c4a02c..e70de36a2ec 100644 --- a/mysql-test/suite/plugins/r/audit_null_debug.result +++ b/mysql-test/suite/plugins/r/audit_null_debug.result @@ -11,5 +11,6 @@ uninstall plugin audit_null; ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it SET debug_dbug=@old_dbug; uninstall plugin audit_null; +uninstall plugin audit_null; ERROR 42000: PLUGIN audit_null does not exist delete from mysql.plugin where name='audit_null'; diff --git a/mysql-test/suite/plugins/t/audit_null_debug.test b/mysql-test/suite/plugins/t/audit_null_debug.test index 0534108b107..f3c88d24c0c 100644 --- a/mysql-test/suite/plugins/t/audit_null_debug.test +++ b/mysql-test/suite/plugins/t/audit_null_debug.test @@ -26,7 +26,8 @@ SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage'; uninstall plugin audit_null; SET debug_dbug=@old_dbug; ---error 1305 +uninstall plugin audit_null; +--error ER_SP_DOES_NOT_EXIST uninstall plugin audit_null; delete from mysql.plugin where name='audit_null'; diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test index e1a17d49174..d2e828b2589 100644 --- a/mysql-test/t/plugin.test +++ b/mysql-test/t/plugin.test @@ -276,3 +276,23 @@ RENAME TABLE t1 TO t2; DROP TABLE t1; --echo # End of 10.1 test + +--echo # +--echo # MDEV-21258: Can't uninstall plugin if the library file doesn't exist +--echo # + +insert into mysql.plugin values ("unexisting_plugin", "soname"); + +# check that we have the plugin installed +select * from mysql.plugin WHERE name='unexisting_plugin'; + +# make attempt to uninstall the plugin +UNINSTALL PLUGIN unexisting_plugin; + +# check that we have the plugin uninstalled +select * from mysql.plugin WHERE name='unexisting_plugin'; + +--error ER_SP_DOES_NOT_EXIST +UNINSTALL PLUGIN unexisting_plugin; + +--echo # End of 10.2 tests -- cgit v1.2.1 From 92499ae95ced000b064910d1a15705faa64cc88f Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 29 Jul 2020 10:22:17 +0400 Subject: MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions - Type_handler_hex_hybrid did not override Type_handler_string_result::Item_func_round_fix_length_and_dec(), so the result type of ROUND(0xFFFFFFFFFFFFFFFF) was erroneously calculated ad DOUBLE with a wrong length. Overriding Item_func_round_fix_length_and_dec(), to calculated the result type as INT/BIGINT. Also, fixing Item_func_round::fix_arg_int() to use args[0]->decimal_precision() instead of args[0]->max_length when calculating this->max_length, to get a correct result for hex hybrids. - Type_handler_hex_hybrid::Item_func_int_val_fix_length_and_dec() called item->fix_length_and_dec_int_or_decimal(), which did not produce a correct result data type for hex hybrid. Implementing a dedicated code instead, to return INT UNSIGNED or BIGINT UNSIGNED depending in the number of digits in the arguments. --- mysql-test/main/type_hex_hybrid.result | 158 +++++++++++++++++++++++++++++++++ mysql-test/main/type_hex_hybrid.test | 30 +++++++ 2 files changed, 188 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/main/type_hex_hybrid.result b/mysql-test/main/type_hex_hybrid.result index eec24f6e89e..92a7432ae56 100644 --- a/mysql-test/main/type_hex_hybrid.result +++ b/mysql-test/main/type_hex_hybrid.result @@ -20,5 +20,163 @@ Warnings: Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (octet_length(charset('a'))) + `test`.`t1`.`a` <=> (octet_length(charset(0x61))) + `test`.`t1`.`a` DROP TABLE t1; # +# MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions +# +BEGIN NOT ATOMIC +DECLARE arg TEXT DEFAULT ''; +DECLARE query TEXT DEFAULT +'CREATE TABLE t1 AS SELECT ' + '0xFFFFFFFFFFFFFFFF+0 AS c1,' + 'FLOOR(0xFFFFFFFFFFFFFFFF) AS c2,' + 'CEILING(0xFFFFFFFFFFFFFFFF) AS c3,' + 'ROUND(0xFFFFFFFFFFFFFFFF) AS c4,' + 'TRUNCATE(0xFFFFFFFFFFFFFFFF,0) AS c5'; +FOR i IN 1..9 +DO +SET arg= CONCAT('0x',REPEAT('FF',i)); +SELECT i, arg; +EXECUTE IMMEDIATE REPLACE(query,'0xFFFFFFFFFFFFFFFF', arg); +SHOW CREATE TABLE t1; +SELECT * FROM t1; +DROP TABLE t1; +END FOR; +END; +$$ +i 1 +arg 0xFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` int(4) unsigned NOT NULL, + `c2` int(3) unsigned NOT NULL, + `c3` int(3) unsigned NOT NULL, + `c4` int(3) unsigned NOT NULL, + `c5` int(3) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 255 +c2 255 +c3 255 +c4 255 +c5 255 +i 2 +arg 0xFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` int(6) unsigned NOT NULL, + `c2` int(5) unsigned NOT NULL, + `c3` int(5) unsigned NOT NULL, + `c4` int(5) unsigned NOT NULL, + `c5` int(5) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 65535 +c2 65535 +c3 65535 +c4 65535 +c5 65535 +i 3 +arg 0xFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` int(9) unsigned NOT NULL, + `c2` int(8) unsigned NOT NULL, + `c3` int(8) unsigned NOT NULL, + `c4` int(8) unsigned NOT NULL, + `c5` int(8) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 16777215 +c2 16777215 +c3 16777215 +c4 16777215 +c5 16777215 +i 4 +arg 0xFFFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` bigint(11) unsigned NOT NULL, + `c2` bigint(10) unsigned NOT NULL, + `c3` bigint(10) unsigned NOT NULL, + `c4` bigint(10) unsigned NOT NULL, + `c5` bigint(10) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 4294967295 +c2 4294967295 +c3 4294967295 +c4 4294967295 +c5 4294967295 +i 5 +arg 0xFFFFFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` bigint(14) unsigned NOT NULL, + `c2` bigint(13) unsigned NOT NULL, + `c3` bigint(13) unsigned NOT NULL, + `c4` bigint(13) unsigned NOT NULL, + `c5` bigint(13) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 1099511627775 +c2 1099511627775 +c3 1099511627775 +c4 1099511627775 +c5 1099511627775 +i 6 +arg 0xFFFFFFFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` bigint(16) unsigned NOT NULL, + `c2` bigint(15) unsigned NOT NULL, + `c3` bigint(15) unsigned NOT NULL, + `c4` bigint(15) unsigned NOT NULL, + `c5` bigint(15) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 281474976710655 +c2 281474976710655 +c3 281474976710655 +c4 281474976710655 +c5 281474976710655 +i 7 +arg 0xFFFFFFFFFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` bigint(18) unsigned NOT NULL, + `c2` bigint(17) unsigned NOT NULL, + `c3` bigint(17) unsigned NOT NULL, + `c4` bigint(17) unsigned NOT NULL, + `c5` bigint(17) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 72057594037927935 +c2 72057594037927935 +c3 72057594037927935 +c4 72057594037927935 +c5 72057594037927935 +i 8 +arg 0xFFFFFFFFFFFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` bigint(21) unsigned NOT NULL, + `c2` bigint(20) unsigned NOT NULL, + `c3` bigint(20) unsigned NOT NULL, + `c4` bigint(20) unsigned NOT NULL, + `c5` bigint(20) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 18446744073709551615 +c2 18446744073709551615 +c3 18446744073709551615 +c4 18446744073709551615 +c5 18446744073709551615 +i 9 +arg 0xFFFFFFFFFFFFFFFFFF +Table t1 +Create Table CREATE TABLE `t1` ( + `c1` bigint(21) unsigned NOT NULL, + `c2` bigint(20) unsigned NOT NULL, + `c3` bigint(20) unsigned NOT NULL, + `c4` bigint(20) unsigned NOT NULL, + `c5` bigint(20) unsigned NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +c1 18446744073709551615 +c2 18446744073709551615 +c3 18446744073709551615 +c4 18446744073709551615 +c5 18446744073709551615 +# # End of 10.4 tests # diff --git a/mysql-test/main/type_hex_hybrid.test b/mysql-test/main/type_hex_hybrid.test index a39750e2635..77afb45cfbf 100644 --- a/mysql-test/main/type_hex_hybrid.test +++ b/mysql-test/main/type_hex_hybrid.test @@ -16,6 +16,36 @@ SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a; EXPLAIN EXTENDED SELECT * FROM t1 WHERE LENGTH(CHARSET('a'))+a<=>LENGTH(CHARSET(0x61))+a; DROP TABLE t1; +--echo # +--echo # MDEV-23320 Hex hybrid constants 0xHHHH work badly in rounding functions +--echo # + +--vertical_results +DELIMITER $$; +BEGIN NOT ATOMIC + DECLARE arg TEXT DEFAULT ''; + DECLARE query TEXT DEFAULT + 'CREATE TABLE t1 AS SELECT ' + '0xFFFFFFFFFFFFFFFF+0 AS c1,' + 'FLOOR(0xFFFFFFFFFFFFFFFF) AS c2,' + 'CEILING(0xFFFFFFFFFFFFFFFF) AS c3,' + 'ROUND(0xFFFFFFFFFFFFFFFF) AS c4,' + 'TRUNCATE(0xFFFFFFFFFFFFFFFF,0) AS c5'; + FOR i IN 1..9 + DO + SET arg= CONCAT('0x',REPEAT('FF',i)); + SELECT i, arg; + EXECUTE IMMEDIATE REPLACE(query,'0xFFFFFFFFFFFFFFFF', arg); + SHOW CREATE TABLE t1; + SELECT * FROM t1; + DROP TABLE t1; + END FOR; +END; +$$ +DELIMITER ;$$ +--horizontal_results + + --echo # --echo # End of 10.4 tests --echo # -- cgit v1.2.1 From 6d3186e326b20a2d8d01c8d071677aaba16350d2 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 29 Jul 2020 22:29:43 +0400 Subject: MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument Implementing dedicated fixing methods: - Type_handler_bit::Item_func_round_fix_length_and_dec() - Type_handler_bit::Item_func_int_val_fix_length_and_dec() - Type_handler_typelib::Item_func_round_fix_length_and_dec() because the inherited methods did not work well. Fixing: - Type_handler_typelib::Item_func_int_val_fix_length_and_dec It did not work well, because it used args[0]->max_length to calculate the result data type. In case of ENUM and SET it was not correct, because in FLOOR() and CEILING() context ENUM and SET return not more than 5 digits (65535 is the biggest possible value). Misc: - Changing the API of Type_handler_bit::Bit_decimal_notation_int_digits(const Item *item) to a more generic form: Type_handler_bit::Bit_decimal_notation_int_digits_by_nbits(uint nbits) - Fixing Type_handler_bit::Bit_decimal_notation_int_digits_by_nbits() to return the exact number of decimal digits for all nbits 1..64. The old implementation was approximate. This change gives better (more precise) data types. --- mysql-test/main/func_math.result | 106 ++--- mysql-test/main/type_bit.result | 983 +++++++++++++++++++++++++++++++++++++++ mysql-test/main/type_bit.test | 29 ++ mysql-test/main/type_enum.result | 21 + mysql-test/main/type_enum.test | 13 + mysql-test/main/type_set.result | 21 + mysql-test/main/type_set.test | 13 + 7 files changed, 1133 insertions(+), 53 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result index db5d195f405..68922b09bf7 100644 --- a/mysql-test/main/func_math.result +++ b/mysql-test/main/func_math.result @@ -2619,7 +2619,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(3) DEFAULT NULL + `c1` varchar(2) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(4)); @@ -2664,7 +2664,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(5) DEFAULT NULL + `c1` varchar(3) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(7)); @@ -2709,7 +2709,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(6) DEFAULT NULL + `c1` varchar(5) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(10)); @@ -2754,7 +2754,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(7) DEFAULT NULL + `c1` varchar(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(13)); @@ -2769,7 +2769,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(7) DEFAULT NULL + `c1` varchar(6) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(14)); @@ -2799,7 +2799,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(9) DEFAULT NULL + `c1` varchar(7) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(16)); @@ -2814,7 +2814,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(9) DEFAULT NULL + `c1` varchar(7) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(17)); @@ -2844,7 +2844,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(10) DEFAULT NULL + `c1` varchar(9) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(19)); @@ -2859,7 +2859,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(10) DEFAULT NULL + `c1` varchar(9) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(20)); @@ -2889,7 +2889,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(11) DEFAULT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(22)); @@ -2904,7 +2904,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(11) DEFAULT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(23)); @@ -2919,7 +2919,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(11) DEFAULT NULL + `c1` varchar(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(24)); @@ -2934,7 +2934,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(13) DEFAULT NULL + `c1` varchar(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(25)); @@ -2949,7 +2949,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(13) DEFAULT NULL + `c1` varchar(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(26)); @@ -2964,7 +2964,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(13) DEFAULT NULL + `c1` varchar(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(27)); @@ -2979,7 +2979,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(14) DEFAULT NULL + `c1` varchar(13) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(28)); @@ -2994,7 +2994,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(14) DEFAULT NULL + `c1` varchar(13) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(29)); @@ -3009,7 +3009,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(14) DEFAULT NULL + `c1` varchar(13) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(30)); @@ -3024,7 +3024,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(15) DEFAULT NULL + `c1` varchar(14) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(31)); @@ -3039,7 +3039,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(15) DEFAULT NULL + `c1` varchar(14) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(32)); @@ -3054,7 +3054,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(15) DEFAULT NULL + `c1` varchar(14) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(33)); @@ -3069,7 +3069,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(17) DEFAULT NULL + `c1` varchar(14) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(34)); @@ -3084,7 +3084,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(17) DEFAULT NULL + `c1` varchar(15) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(35)); @@ -3099,7 +3099,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(17) DEFAULT NULL + `c1` varchar(15) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(36)); @@ -3114,7 +3114,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(18) DEFAULT NULL + `c1` varchar(15) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(37)); @@ -3129,7 +3129,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(18) DEFAULT NULL + `c1` varchar(17) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(38)); @@ -3144,7 +3144,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(18) DEFAULT NULL + `c1` varchar(17) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(39)); @@ -3159,7 +3159,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(19) DEFAULT NULL + `c1` varchar(17) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(40)); @@ -3174,7 +3174,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(19) DEFAULT NULL + `c1` varchar(18) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(41)); @@ -3189,7 +3189,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(19) DEFAULT NULL + `c1` varchar(18) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(42)); @@ -3204,7 +3204,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(21) DEFAULT NULL + `c1` varchar(18) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(43)); @@ -3219,7 +3219,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(21) DEFAULT NULL + `c1` varchar(18) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(44)); @@ -3234,7 +3234,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(21) DEFAULT NULL + `c1` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(45)); @@ -3249,7 +3249,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(22) DEFAULT NULL + `c1` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(46)); @@ -3264,7 +3264,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(22) DEFAULT NULL + `c1` varchar(19) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(47)); @@ -3279,7 +3279,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(22) DEFAULT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(48)); @@ -3294,7 +3294,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(23) DEFAULT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(49)); @@ -3309,7 +3309,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(23) DEFAULT NULL + `c1` varchar(21) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(50)); @@ -3324,7 +3324,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(23) DEFAULT NULL + `c1` varchar(22) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(51)); @@ -3339,7 +3339,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(25) DEFAULT NULL + `c1` varchar(22) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(52)); @@ -3354,7 +3354,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(25) DEFAULT NULL + `c1` varchar(22) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(53)); @@ -3369,7 +3369,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(25) DEFAULT NULL + `c1` varchar(22) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(54)); @@ -3384,7 +3384,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(26) DEFAULT NULL + `c1` varchar(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(55)); @@ -3399,7 +3399,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(26) DEFAULT NULL + `c1` varchar(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(56)); @@ -3414,7 +3414,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(26) DEFAULT NULL + `c1` varchar(23) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(57)); @@ -3429,7 +3429,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(27) DEFAULT NULL + `c1` varchar(25) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(58)); @@ -3444,7 +3444,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(27) DEFAULT NULL + `c1` varchar(25) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(59)); @@ -3459,7 +3459,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(27) DEFAULT NULL + `c1` varchar(25) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(60)); @@ -3474,7 +3474,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(29) DEFAULT NULL + `c1` varchar(26) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(61)); @@ -3489,7 +3489,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(29) DEFAULT NULL + `c1` varchar(26) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(62)); @@ -3504,7 +3504,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(29) DEFAULT NULL + `c1` varchar(26) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(63)); @@ -3519,7 +3519,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(30) DEFAULT NULL + `c1` varchar(26) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (c1 BIT(64)); @@ -3534,7 +3534,7 @@ HEX(c1) SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `c1` varchar(30) DEFAULT NULL + `c1` varchar(27) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1,t2; CREATE OR REPLACE TABLE t1 (f float); diff --git a/mysql-test/main/type_bit.result b/mysql-test/main/type_bit.result index 2964f400f10..4e9d698b0c2 100644 --- a/mysql-test/main/type_bit.result +++ b/mysql-test/main/type_bit.result @@ -876,5 +876,988 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables DROP TABLE t1; # +# MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument +# +BEGIN NOT ATOMIC +FOR i IN 1..64 +DO +SELECT '-----', CONCAT('BIT(',i,')') AS Type; +EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a BIT(64))','64', i); +INSERT IGNORE INTO t1 VALUES (0xFFFFFFFFFFFFFFFF); +CREATE TABLE t2 AS SELECT +a, +FLOOR(a) AS cf, +CEILING(a) AS cc, +ROUND(a) AS cr, +TRUNCATE(a,0) AS ct +FROM t1; +SHOW CREATE TABLE t2; +SELECT CAST(a AS UNSIGNED) AS a, cf, cc, cr, ct FROM t2; +DROP TABLE t2; +DROP TABLE t1; +END FOR; +END; +$$ +----- ----- +Type BIT(1) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(1) DEFAULT NULL, + `cf` int(1) unsigned DEFAULT NULL, + `cc` int(1) unsigned DEFAULT NULL, + `cr` int(1) unsigned DEFAULT NULL, + `ct` int(1) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1 +cf 1 +cc 1 +cr 1 +ct 1 +----- ----- +Type BIT(2) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(2) DEFAULT NULL, + `cf` int(1) unsigned DEFAULT NULL, + `cc` int(1) unsigned DEFAULT NULL, + `cr` int(1) unsigned DEFAULT NULL, + `ct` int(1) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 3 +cf 3 +cc 3 +cr 3 +ct 3 +----- ----- +Type BIT(3) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(3) DEFAULT NULL, + `cf` int(1) unsigned DEFAULT NULL, + `cc` int(1) unsigned DEFAULT NULL, + `cr` int(1) unsigned DEFAULT NULL, + `ct` int(1) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 7 +cf 7 +cc 7 +cr 7 +ct 7 +----- ----- +Type BIT(4) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(4) DEFAULT NULL, + `cf` int(2) unsigned DEFAULT NULL, + `cc` int(2) unsigned DEFAULT NULL, + `cr` int(2) unsigned DEFAULT NULL, + `ct` int(2) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 15 +cf 15 +cc 15 +cr 15 +ct 15 +----- ----- +Type BIT(5) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(5) DEFAULT NULL, + `cf` int(2) unsigned DEFAULT NULL, + `cc` int(2) unsigned DEFAULT NULL, + `cr` int(2) unsigned DEFAULT NULL, + `ct` int(2) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 31 +cf 31 +cc 31 +cr 31 +ct 31 +----- ----- +Type BIT(6) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(6) DEFAULT NULL, + `cf` int(2) unsigned DEFAULT NULL, + `cc` int(2) unsigned DEFAULT NULL, + `cr` int(2) unsigned DEFAULT NULL, + `ct` int(2) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 63 +cf 63 +cc 63 +cr 63 +ct 63 +----- ----- +Type BIT(7) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(7) DEFAULT NULL, + `cf` int(3) unsigned DEFAULT NULL, + `cc` int(3) unsigned DEFAULT NULL, + `cr` int(3) unsigned DEFAULT NULL, + `ct` int(3) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 127 +cf 127 +cc 127 +cr 127 +ct 127 +----- ----- +Type BIT(8) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(8) DEFAULT NULL, + `cf` int(3) unsigned DEFAULT NULL, + `cc` int(3) unsigned DEFAULT NULL, + `cr` int(3) unsigned DEFAULT NULL, + `ct` int(3) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 255 +cf 255 +cc 255 +cr 255 +ct 255 +----- ----- +Type BIT(9) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(9) DEFAULT NULL, + `cf` int(3) unsigned DEFAULT NULL, + `cc` int(3) unsigned DEFAULT NULL, + `cr` int(3) unsigned DEFAULT NULL, + `ct` int(3) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 511 +cf 511 +cc 511 +cr 511 +ct 511 +----- ----- +Type BIT(10) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(10) DEFAULT NULL, + `cf` int(4) unsigned DEFAULT NULL, + `cc` int(4) unsigned DEFAULT NULL, + `cr` int(4) unsigned DEFAULT NULL, + `ct` int(4) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1023 +cf 1023 +cc 1023 +cr 1023 +ct 1023 +----- ----- +Type BIT(11) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(11) DEFAULT NULL, + `cf` int(4) unsigned DEFAULT NULL, + `cc` int(4) unsigned DEFAULT NULL, + `cr` int(4) unsigned DEFAULT NULL, + `ct` int(4) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 2047 +cf 2047 +cc 2047 +cr 2047 +ct 2047 +----- ----- +Type BIT(12) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(12) DEFAULT NULL, + `cf` int(4) unsigned DEFAULT NULL, + `cc` int(4) unsigned DEFAULT NULL, + `cr` int(4) unsigned DEFAULT NULL, + `ct` int(4) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 4095 +cf 4095 +cc 4095 +cr 4095 +ct 4095 +----- ----- +Type BIT(13) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(13) DEFAULT NULL, + `cf` int(4) unsigned DEFAULT NULL, + `cc` int(4) unsigned DEFAULT NULL, + `cr` int(4) unsigned DEFAULT NULL, + `ct` int(4) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 8191 +cf 8191 +cc 8191 +cr 8191 +ct 8191 +----- ----- +Type BIT(14) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(14) DEFAULT NULL, + `cf` int(5) unsigned DEFAULT NULL, + `cc` int(5) unsigned DEFAULT NULL, + `cr` int(5) unsigned DEFAULT NULL, + `ct` int(5) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 16383 +cf 16383 +cc 16383 +cr 16383 +ct 16383 +----- ----- +Type BIT(15) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(15) DEFAULT NULL, + `cf` int(5) unsigned DEFAULT NULL, + `cc` int(5) unsigned DEFAULT NULL, + `cr` int(5) unsigned DEFAULT NULL, + `ct` int(5) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 32767 +cf 32767 +cc 32767 +cr 32767 +ct 32767 +----- ----- +Type BIT(16) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(16) DEFAULT NULL, + `cf` int(5) unsigned DEFAULT NULL, + `cc` int(5) unsigned DEFAULT NULL, + `cr` int(5) unsigned DEFAULT NULL, + `ct` int(5) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 65535 +cf 65535 +cc 65535 +cr 65535 +ct 65535 +----- ----- +Type BIT(17) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(17) DEFAULT NULL, + `cf` int(6) unsigned DEFAULT NULL, + `cc` int(6) unsigned DEFAULT NULL, + `cr` int(6) unsigned DEFAULT NULL, + `ct` int(6) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 131071 +cf 131071 +cc 131071 +cr 131071 +ct 131071 +----- ----- +Type BIT(18) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(18) DEFAULT NULL, + `cf` int(6) unsigned DEFAULT NULL, + `cc` int(6) unsigned DEFAULT NULL, + `cr` int(6) unsigned DEFAULT NULL, + `ct` int(6) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 262143 +cf 262143 +cc 262143 +cr 262143 +ct 262143 +----- ----- +Type BIT(19) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(19) DEFAULT NULL, + `cf` int(6) unsigned DEFAULT NULL, + `cc` int(6) unsigned DEFAULT NULL, + `cr` int(6) unsigned DEFAULT NULL, + `ct` int(6) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 524287 +cf 524287 +cc 524287 +cr 524287 +ct 524287 +----- ----- +Type BIT(20) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(20) DEFAULT NULL, + `cf` int(7) unsigned DEFAULT NULL, + `cc` int(7) unsigned DEFAULT NULL, + `cr` int(7) unsigned DEFAULT NULL, + `ct` int(7) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1048575 +cf 1048575 +cc 1048575 +cr 1048575 +ct 1048575 +----- ----- +Type BIT(21) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(21) DEFAULT NULL, + `cf` int(7) unsigned DEFAULT NULL, + `cc` int(7) unsigned DEFAULT NULL, + `cr` int(7) unsigned DEFAULT NULL, + `ct` int(7) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 2097151 +cf 2097151 +cc 2097151 +cr 2097151 +ct 2097151 +----- ----- +Type BIT(22) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(22) DEFAULT NULL, + `cf` int(7) unsigned DEFAULT NULL, + `cc` int(7) unsigned DEFAULT NULL, + `cr` int(7) unsigned DEFAULT NULL, + `ct` int(7) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 4194303 +cf 4194303 +cc 4194303 +cr 4194303 +ct 4194303 +----- ----- +Type BIT(23) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(23) DEFAULT NULL, + `cf` int(7) unsigned DEFAULT NULL, + `cc` int(7) unsigned DEFAULT NULL, + `cr` int(7) unsigned DEFAULT NULL, + `ct` int(7) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 8388607 +cf 8388607 +cc 8388607 +cr 8388607 +ct 8388607 +----- ----- +Type BIT(24) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(24) DEFAULT NULL, + `cf` int(8) unsigned DEFAULT NULL, + `cc` int(8) unsigned DEFAULT NULL, + `cr` int(8) unsigned DEFAULT NULL, + `ct` int(8) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 16777215 +cf 16777215 +cc 16777215 +cr 16777215 +ct 16777215 +----- ----- +Type BIT(25) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(25) DEFAULT NULL, + `cf` int(8) unsigned DEFAULT NULL, + `cc` int(8) unsigned DEFAULT NULL, + `cr` int(8) unsigned DEFAULT NULL, + `ct` int(8) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 33554431 +cf 33554431 +cc 33554431 +cr 33554431 +ct 33554431 +----- ----- +Type BIT(26) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(26) DEFAULT NULL, + `cf` int(8) unsigned DEFAULT NULL, + `cc` int(8) unsigned DEFAULT NULL, + `cr` int(8) unsigned DEFAULT NULL, + `ct` int(8) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 67108863 +cf 67108863 +cc 67108863 +cr 67108863 +ct 67108863 +----- ----- +Type BIT(27) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(27) DEFAULT NULL, + `cf` int(9) unsigned DEFAULT NULL, + `cc` int(9) unsigned DEFAULT NULL, + `cr` int(9) unsigned DEFAULT NULL, + `ct` int(9) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 134217727 +cf 134217727 +cc 134217727 +cr 134217727 +ct 134217727 +----- ----- +Type BIT(28) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(28) DEFAULT NULL, + `cf` int(9) unsigned DEFAULT NULL, + `cc` int(9) unsigned DEFAULT NULL, + `cr` int(9) unsigned DEFAULT NULL, + `ct` int(9) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 268435455 +cf 268435455 +cc 268435455 +cr 268435455 +ct 268435455 +----- ----- +Type BIT(29) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(29) DEFAULT NULL, + `cf` int(9) unsigned DEFAULT NULL, + `cc` int(9) unsigned DEFAULT NULL, + `cr` int(9) unsigned DEFAULT NULL, + `ct` int(9) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 536870911 +cf 536870911 +cc 536870911 +cr 536870911 +ct 536870911 +----- ----- +Type BIT(30) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(30) DEFAULT NULL, + `cf` int(10) unsigned DEFAULT NULL, + `cc` int(10) unsigned DEFAULT NULL, + `cr` int(10) unsigned DEFAULT NULL, + `ct` int(10) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1073741823 +cf 1073741823 +cc 1073741823 +cr 1073741823 +ct 1073741823 +----- ----- +Type BIT(31) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(31) DEFAULT NULL, + `cf` int(10) unsigned DEFAULT NULL, + `cc` int(10) unsigned DEFAULT NULL, + `cr` int(10) unsigned DEFAULT NULL, + `ct` int(10) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 2147483647 +cf 2147483647 +cc 2147483647 +cr 2147483647 +ct 2147483647 +----- ----- +Type BIT(32) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(32) DEFAULT NULL, + `cf` int(10) unsigned DEFAULT NULL, + `cc` int(10) unsigned DEFAULT NULL, + `cr` int(10) unsigned DEFAULT NULL, + `ct` int(10) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 4294967295 +cf 4294967295 +cc 4294967295 +cr 4294967295 +ct 4294967295 +----- ----- +Type BIT(33) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(33) DEFAULT NULL, + `cf` bigint(10) unsigned DEFAULT NULL, + `cc` bigint(10) unsigned DEFAULT NULL, + `cr` bigint(10) unsigned DEFAULT NULL, + `ct` bigint(10) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 8589934591 +cf 8589934591 +cc 8589934591 +cr 8589934591 +ct 8589934591 +----- ----- +Type BIT(34) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(34) DEFAULT NULL, + `cf` bigint(11) unsigned DEFAULT NULL, + `cc` bigint(11) unsigned DEFAULT NULL, + `cr` bigint(11) unsigned DEFAULT NULL, + `ct` bigint(11) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 17179869183 +cf 17179869183 +cc 17179869183 +cr 17179869183 +ct 17179869183 +----- ----- +Type BIT(35) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(35) DEFAULT NULL, + `cf` bigint(11) unsigned DEFAULT NULL, + `cc` bigint(11) unsigned DEFAULT NULL, + `cr` bigint(11) unsigned DEFAULT NULL, + `ct` bigint(11) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 34359738367 +cf 34359738367 +cc 34359738367 +cr 34359738367 +ct 34359738367 +----- ----- +Type BIT(36) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(36) DEFAULT NULL, + `cf` bigint(11) unsigned DEFAULT NULL, + `cc` bigint(11) unsigned DEFAULT NULL, + `cr` bigint(11) unsigned DEFAULT NULL, + `ct` bigint(11) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 68719476735 +cf 68719476735 +cc 68719476735 +cr 68719476735 +ct 68719476735 +----- ----- +Type BIT(37) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(37) DEFAULT NULL, + `cf` bigint(12) unsigned DEFAULT NULL, + `cc` bigint(12) unsigned DEFAULT NULL, + `cr` bigint(12) unsigned DEFAULT NULL, + `ct` bigint(12) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 137438953471 +cf 137438953471 +cc 137438953471 +cr 137438953471 +ct 137438953471 +----- ----- +Type BIT(38) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(38) DEFAULT NULL, + `cf` bigint(12) unsigned DEFAULT NULL, + `cc` bigint(12) unsigned DEFAULT NULL, + `cr` bigint(12) unsigned DEFAULT NULL, + `ct` bigint(12) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 274877906943 +cf 274877906943 +cc 274877906943 +cr 274877906943 +ct 274877906943 +----- ----- +Type BIT(39) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(39) DEFAULT NULL, + `cf` bigint(12) unsigned DEFAULT NULL, + `cc` bigint(12) unsigned DEFAULT NULL, + `cr` bigint(12) unsigned DEFAULT NULL, + `ct` bigint(12) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 549755813887 +cf 549755813887 +cc 549755813887 +cr 549755813887 +ct 549755813887 +----- ----- +Type BIT(40) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(40) DEFAULT NULL, + `cf` bigint(13) unsigned DEFAULT NULL, + `cc` bigint(13) unsigned DEFAULT NULL, + `cr` bigint(13) unsigned DEFAULT NULL, + `ct` bigint(13) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1099511627775 +cf 1099511627775 +cc 1099511627775 +cr 1099511627775 +ct 1099511627775 +----- ----- +Type BIT(41) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(41) DEFAULT NULL, + `cf` bigint(13) unsigned DEFAULT NULL, + `cc` bigint(13) unsigned DEFAULT NULL, + `cr` bigint(13) unsigned DEFAULT NULL, + `ct` bigint(13) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 2199023255551 +cf 2199023255551 +cc 2199023255551 +cr 2199023255551 +ct 2199023255551 +----- ----- +Type BIT(42) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(42) DEFAULT NULL, + `cf` bigint(13) unsigned DEFAULT NULL, + `cc` bigint(13) unsigned DEFAULT NULL, + `cr` bigint(13) unsigned DEFAULT NULL, + `ct` bigint(13) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 4398046511103 +cf 4398046511103 +cc 4398046511103 +cr 4398046511103 +ct 4398046511103 +----- ----- +Type BIT(43) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(43) DEFAULT NULL, + `cf` bigint(13) unsigned DEFAULT NULL, + `cc` bigint(13) unsigned DEFAULT NULL, + `cr` bigint(13) unsigned DEFAULT NULL, + `ct` bigint(13) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 8796093022207 +cf 8796093022207 +cc 8796093022207 +cr 8796093022207 +ct 8796093022207 +----- ----- +Type BIT(44) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(44) DEFAULT NULL, + `cf` bigint(14) unsigned DEFAULT NULL, + `cc` bigint(14) unsigned DEFAULT NULL, + `cr` bigint(14) unsigned DEFAULT NULL, + `ct` bigint(14) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 17592186044415 +cf 17592186044415 +cc 17592186044415 +cr 17592186044415 +ct 17592186044415 +----- ----- +Type BIT(45) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(45) DEFAULT NULL, + `cf` bigint(14) unsigned DEFAULT NULL, + `cc` bigint(14) unsigned DEFAULT NULL, + `cr` bigint(14) unsigned DEFAULT NULL, + `ct` bigint(14) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 35184372088831 +cf 35184372088831 +cc 35184372088831 +cr 35184372088831 +ct 35184372088831 +----- ----- +Type BIT(46) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(46) DEFAULT NULL, + `cf` bigint(14) unsigned DEFAULT NULL, + `cc` bigint(14) unsigned DEFAULT NULL, + `cr` bigint(14) unsigned DEFAULT NULL, + `ct` bigint(14) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 70368744177663 +cf 70368744177663 +cc 70368744177663 +cr 70368744177663 +ct 70368744177663 +----- ----- +Type BIT(47) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(47) DEFAULT NULL, + `cf` bigint(15) unsigned DEFAULT NULL, + `cc` bigint(15) unsigned DEFAULT NULL, + `cr` bigint(15) unsigned DEFAULT NULL, + `ct` bigint(15) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 140737488355327 +cf 140737488355327 +cc 140737488355327 +cr 140737488355327 +ct 140737488355327 +----- ----- +Type BIT(48) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(48) DEFAULT NULL, + `cf` bigint(15) unsigned DEFAULT NULL, + `cc` bigint(15) unsigned DEFAULT NULL, + `cr` bigint(15) unsigned DEFAULT NULL, + `ct` bigint(15) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 281474976710655 +cf 281474976710655 +cc 281474976710655 +cr 281474976710655 +ct 281474976710655 +----- ----- +Type BIT(49) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(49) DEFAULT NULL, + `cf` bigint(15) unsigned DEFAULT NULL, + `cc` bigint(15) unsigned DEFAULT NULL, + `cr` bigint(15) unsigned DEFAULT NULL, + `ct` bigint(15) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 562949953421311 +cf 562949953421311 +cc 562949953421311 +cr 562949953421311 +ct 562949953421311 +----- ----- +Type BIT(50) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(50) DEFAULT NULL, + `cf` bigint(16) unsigned DEFAULT NULL, + `cc` bigint(16) unsigned DEFAULT NULL, + `cr` bigint(16) unsigned DEFAULT NULL, + `ct` bigint(16) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1125899906842623 +cf 1125899906842623 +cc 1125899906842623 +cr 1125899906842623 +ct 1125899906842623 +----- ----- +Type BIT(51) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(51) DEFAULT NULL, + `cf` bigint(16) unsigned DEFAULT NULL, + `cc` bigint(16) unsigned DEFAULT NULL, + `cr` bigint(16) unsigned DEFAULT NULL, + `ct` bigint(16) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 2251799813685247 +cf 2251799813685247 +cc 2251799813685247 +cr 2251799813685247 +ct 2251799813685247 +----- ----- +Type BIT(52) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(52) DEFAULT NULL, + `cf` bigint(16) unsigned DEFAULT NULL, + `cc` bigint(16) unsigned DEFAULT NULL, + `cr` bigint(16) unsigned DEFAULT NULL, + `ct` bigint(16) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 4503599627370495 +cf 4503599627370495 +cc 4503599627370495 +cr 4503599627370495 +ct 4503599627370495 +----- ----- +Type BIT(53) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(53) DEFAULT NULL, + `cf` bigint(16) unsigned DEFAULT NULL, + `cc` bigint(16) unsigned DEFAULT NULL, + `cr` bigint(16) unsigned DEFAULT NULL, + `ct` bigint(16) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 9007199254740991 +cf 9007199254740991 +cc 9007199254740991 +cr 9007199254740991 +ct 9007199254740991 +----- ----- +Type BIT(54) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(54) DEFAULT NULL, + `cf` bigint(17) unsigned DEFAULT NULL, + `cc` bigint(17) unsigned DEFAULT NULL, + `cr` bigint(17) unsigned DEFAULT NULL, + `ct` bigint(17) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 18014398509481983 +cf 18014398509481983 +cc 18014398509481983 +cr 18014398509481983 +ct 18014398509481983 +----- ----- +Type BIT(55) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(55) DEFAULT NULL, + `cf` bigint(17) unsigned DEFAULT NULL, + `cc` bigint(17) unsigned DEFAULT NULL, + `cr` bigint(17) unsigned DEFAULT NULL, + `ct` bigint(17) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 36028797018963967 +cf 36028797018963967 +cc 36028797018963967 +cr 36028797018963967 +ct 36028797018963967 +----- ----- +Type BIT(56) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(56) DEFAULT NULL, + `cf` bigint(17) unsigned DEFAULT NULL, + `cc` bigint(17) unsigned DEFAULT NULL, + `cr` bigint(17) unsigned DEFAULT NULL, + `ct` bigint(17) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 72057594037927935 +cf 72057594037927935 +cc 72057594037927935 +cr 72057594037927935 +ct 72057594037927935 +----- ----- +Type BIT(57) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(57) DEFAULT NULL, + `cf` bigint(18) unsigned DEFAULT NULL, + `cc` bigint(18) unsigned DEFAULT NULL, + `cr` bigint(18) unsigned DEFAULT NULL, + `ct` bigint(18) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 144115188075855871 +cf 144115188075855871 +cc 144115188075855871 +cr 144115188075855871 +ct 144115188075855871 +----- ----- +Type BIT(58) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(58) DEFAULT NULL, + `cf` bigint(18) unsigned DEFAULT NULL, + `cc` bigint(18) unsigned DEFAULT NULL, + `cr` bigint(18) unsigned DEFAULT NULL, + `ct` bigint(18) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 288230376151711743 +cf 288230376151711743 +cc 288230376151711743 +cr 288230376151711743 +ct 288230376151711743 +----- ----- +Type BIT(59) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(59) DEFAULT NULL, + `cf` bigint(18) unsigned DEFAULT NULL, + `cc` bigint(18) unsigned DEFAULT NULL, + `cr` bigint(18) unsigned DEFAULT NULL, + `ct` bigint(18) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 576460752303423487 +cf 576460752303423487 +cc 576460752303423487 +cr 576460752303423487 +ct 576460752303423487 +----- ----- +Type BIT(60) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(60) DEFAULT NULL, + `cf` bigint(19) unsigned DEFAULT NULL, + `cc` bigint(19) unsigned DEFAULT NULL, + `cr` bigint(19) unsigned DEFAULT NULL, + `ct` bigint(19) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 1152921504606846975 +cf 1152921504606846975 +cc 1152921504606846975 +cr 1152921504606846975 +ct 1152921504606846975 +----- ----- +Type BIT(61) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(61) DEFAULT NULL, + `cf` bigint(19) unsigned DEFAULT NULL, + `cc` bigint(19) unsigned DEFAULT NULL, + `cr` bigint(19) unsigned DEFAULT NULL, + `ct` bigint(19) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 2305843009213693951 +cf 2305843009213693951 +cc 2305843009213693951 +cr 2305843009213693951 +ct 2305843009213693951 +----- ----- +Type BIT(62) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(62) DEFAULT NULL, + `cf` bigint(19) unsigned DEFAULT NULL, + `cc` bigint(19) unsigned DEFAULT NULL, + `cr` bigint(19) unsigned DEFAULT NULL, + `ct` bigint(19) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 4611686018427387903 +cf 4611686018427387903 +cc 4611686018427387903 +cr 4611686018427387903 +ct 4611686018427387903 +----- ----- +Type BIT(63) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(63) DEFAULT NULL, + `cf` bigint(19) unsigned DEFAULT NULL, + `cc` bigint(19) unsigned DEFAULT NULL, + `cr` bigint(19) unsigned DEFAULT NULL, + `ct` bigint(19) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 9223372036854775807 +cf 9223372036854775807 +cc 9223372036854775807 +cr 9223372036854775807 +ct 9223372036854775807 +----- ----- +Type BIT(64) +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bit(64) DEFAULT NULL, + `cf` bigint(20) unsigned DEFAULT NULL, + `cc` bigint(20) unsigned DEFAULT NULL, + `cr` bigint(20) unsigned DEFAULT NULL, + `ct` bigint(20) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 18446744073709551615 +cf 18446744073709551615 +cc 18446744073709551615 +cr 18446744073709551615 +ct 18446744073709551615 +# # End of 10.4 tests # diff --git a/mysql-test/main/type_bit.test b/mysql-test/main/type_bit.test index f7b2ec86040..2353fc535ad 100644 --- a/mysql-test/main/type_bit.test +++ b/mysql-test/main/type_bit.test @@ -507,6 +507,35 @@ EXPLAIN SELECT * FROM t1 WHERE a=200; EXPLAIN SELECT * FROM t1 WHERE a<=>200; DROP TABLE t1; +--echo # +--echo # MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument +--echo # + +--vertical_results +DELIMITER $$; +BEGIN NOT ATOMIC + FOR i IN 1..64 + DO + SELECT '-----', CONCAT('BIT(',i,')') AS Type; + EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a BIT(64))','64', i); + INSERT IGNORE INTO t1 VALUES (0xFFFFFFFFFFFFFFFF); + CREATE TABLE t2 AS SELECT + a, + FLOOR(a) AS cf, + CEILING(a) AS cc, + ROUND(a) AS cr, + TRUNCATE(a,0) AS ct + FROM t1; + SHOW CREATE TABLE t2; + SELECT CAST(a AS UNSIGNED) AS a, cf, cc, cr, ct FROM t2; + DROP TABLE t2; + DROP TABLE t1; + END FOR; +END; +$$ +DELIMITER ;$$ +--horizontal_results + --echo # --echo # End of 10.4 tests diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result index 02d71c6bd9f..c8277ab832f 100644 --- a/mysql-test/main/type_enum.result +++ b/mysql-test/main/type_enum.result @@ -2311,3 +2311,24 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP PROCEDURE p1; DROP TABLE t1; +# +# MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument +# +CREATE TABLE t1 (a ENUM('999999999999999999999999999999999999999999999999999999999999')); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 AS +SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` enum('999999999999999999999999999999999999999999999999999999999999') DEFAULT NULL, + `FLOOR(a)` int(5) unsigned DEFAULT NULL, + `CEILING(a)` int(5) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` int(5) unsigned DEFAULT NULL, + `ROUND(a)` int(5) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a) +999999999999999999999999999999999999999999999999999999999999 1 1 1 1 +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test index a79335960bc..a36d63f8725 100644 --- a/mysql-test/main/type_enum.test +++ b/mysql-test/main/type_enum.test @@ -518,3 +518,16 @@ DELIMITER ;$$ CALL p1(); DROP PROCEDURE p1; DROP TABLE t1; + +--echo # +--echo # MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument +--echo # + +CREATE TABLE t1 (a ENUM('999999999999999999999999999999999999999999999999999999999999')); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 AS + SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1; +SHOW CREATE TABLE t2; +SELECT * FROM t2; +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/main/type_set.result b/mysql-test/main/type_set.result index 76a0c343973..5f54521c9dc 100644 --- a/mysql-test/main/type_set.result +++ b/mysql-test/main/type_set.result @@ -358,3 +358,24 @@ DROP TABLE t1; SET NAMES utf8; CREATE TABLE t1 (a SET('a,bü')); ERROR 22007: Illegal set 'a,bü' value found during parsing +# +# MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument +# +CREATE TABLE t1 (a SET('999999999999999999999999999999999999999999999999999999999999')); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 AS +SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `a` set('999999999999999999999999999999999999999999999999999999999999') DEFAULT NULL, + `FLOOR(a)` int(5) unsigned DEFAULT NULL, + `CEILING(a)` int(5) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` int(5) unsigned DEFAULT NULL, + `ROUND(a)` int(5) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +SELECT * FROM t2; +a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a) +999999999999999999999999999999999999999999999999999999999999 1 1 1 1 +DROP TABLE t2; +DROP TABLE t1; diff --git a/mysql-test/main/type_set.test b/mysql-test/main/type_set.test index 8a81c406c63..2d0c81340ae 100644 --- a/mysql-test/main/type_set.test +++ b/mysql-test/main/type_set.test @@ -248,3 +248,16 @@ DROP TABLE t1; SET NAMES utf8; --error ER_ILLEGAL_VALUE_FOR_TYPE CREATE TABLE t1 (a SET('a,bü')); + +--echo # +--echo # MDEV-23323 Rounding functions return a wrong data type for a BIT, ENUM, SET argument +--echo # + +CREATE TABLE t1 (a SET('999999999999999999999999999999999999999999999999999999999999')); +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 AS + SELECT a, FLOOR(a), CEILING(a), TRUNCATE(a,0), ROUND(a) FROM t1; +SHOW CREATE TABLE t2; +SELECT * FROM t2; +DROP TABLE t2; +DROP TABLE t1; -- cgit v1.2.1 From c5d4dd253348655a663d37985a3e61b20d17ed20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 30 Jul 2020 09:24:36 +0300 Subject: MDEV-23339 innodb_force_recovery=2 may still abort the rollback of recovered transactions trx_rollback_active(), trx_rollback_resurrected(): Replace an incorrect condition that we failed to replace in commit b68f1d847f1fc00eed795e20162effc8fbc4119b (MDEV-21217). --- mysql-test/suite/innodb/disabled.def | 1 - mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result | 2 +- mysql-test/suite/innodb/t/innodb_force_recovery_rollback.test | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/disabled.def b/mysql-test/suite/innodb/disabled.def index 4484417afce..35c941f8af7 100644 --- a/mysql-test/suite/innodb/disabled.def +++ b/mysql-test/suite/innodb/disabled.def @@ -11,4 +11,3 @@ ############################################################################## create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails -innodb_force_recovery_rollback : MDEV-22889 InnoDB occasionally breaks ACID diff --git a/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result b/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result index dc037fd6c97..42cf8adfc13 100644 --- a/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result +++ b/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result @@ -12,6 +12,6 @@ SET GLOBAL innodb_flush_log_at_trx_commit=1; CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; disconnect con0; connection default; -SELECT * FROM t0 LOCK IN SHARE MODE; +SELECT * FROM t0 LIMIT 0 LOCK IN SHARE MODE; a DROP TABLE t0,t1; diff --git a/mysql-test/suite/innodb/t/innodb_force_recovery_rollback.test b/mysql-test/suite/innodb/t/innodb_force_recovery_rollback.test index ad234eba72e..f1d14c45aaf 100644 --- a/mysql-test/suite/innodb/t/innodb_force_recovery_rollback.test +++ b/mysql-test/suite/innodb/t/innodb_force_recovery_rollback.test @@ -30,5 +30,6 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB; disconnect con0; connection default; # If the rollback was aborted, we would end up in a lock wait here. -SELECT * FROM t0 LOCK IN SHARE MODE; +# The LIMIT 0 works around MDEV-22889 InnoDB occasionally breaks ACID +SELECT * FROM t0 LIMIT 0 LOCK IN SHARE MODE; DROP TABLE t0,t1; -- cgit v1.2.1 From 71015d844e3f25a0c4eada9827a1dad464a4fdce Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 28 Jul 2020 15:59:38 +0200 Subject: MDEV-21101 unexpected wait_timeout with pool-of-threads Due to restricted size of the threadpool, execution of client queries can be delayed (queued) for a while. This delay was interpreted as client inactivity, and connection is closed, if client idle time + queue time exceeds wait_timeout. But users did not expect queue time to be included into wait_timeout. This patch changes the behavior. We don't close connection anymore, if there is some unread data present on connection, even if wait_timeout is exceeded. Unread data means that client was not idle, it sent a query, which we did not have time to process yet. --- mysql-test/main/mdev-21101.opt | 1 + mysql-test/main/mdev-21101.result | 43 +++++++++++++++++++++++++++++++ mysql-test/main/mdev-21101.test | 53 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 mysql-test/main/mdev-21101.opt create mode 100644 mysql-test/main/mdev-21101.result create mode 100644 mysql-test/main/mdev-21101.test (limited to 'mysql-test') diff --git a/mysql-test/main/mdev-21101.opt b/mysql-test/main/mdev-21101.opt new file mode 100644 index 00000000000..b446a28986b --- /dev/null +++ b/mysql-test/main/mdev-21101.opt @@ -0,0 +1 @@ +--thread-handling=pool-of-threads \ No newline at end of file diff --git a/mysql-test/main/mdev-21101.result b/mysql-test/main/mdev-21101.result new file mode 100644 index 00000000000..94da9c31108 --- /dev/null +++ b/mysql-test/main/mdev-21101.result @@ -0,0 +1,43 @@ +SELECT +@@global.wait_timeout, @@global.thread_pool_max_threads, @@global.thread_pool_size, +@@global.thread_pool_oversubscribe, @@global.thread_pool_stall_limit +INTO +@_wait_timeout,@_thread_pool_max_threads,@_thread_pool_size, +@_thread_pool_oversubscribe,@_thread_pool_stall_limit; +SET @@global.wait_timeout=1, +@@global.thread_pool_max_threads=2, +@@global.thread_pool_size=1, +@@global.thread_pool_oversubscribe=1, +@@global.thread_pool_stall_limit=10; +connect c1, localhost, root,,; +connect c2, localhost, root,,; +connect c3, localhost, root,,; +connection c1; +select sleep(1.1); +connection c2; +select sleep(1.1); +connection c3; +select sleep(1.1); +connection default; +select sleep(1.1); +connection c1; +sleep(1.1) +0 +connection c2; +sleep(1.1) +0 +connection c3; +sleep(1.1) +0 +connection default; +sleep(1.1) +0 +disconnect c1; +disconnect c2; +disconnect c3; +connection default; +SET @@global.wait_timeout=@_wait_timeout, +@@global.thread_pool_max_threads=@_thread_pool_max_threads, +@@global.thread_pool_size=@_thread_pool_size, +@@global.thread_pool_oversubscribe=@_thread_pool_oversubscribe, +@@global.thread_pool_stall_limit=@_thread_pool_stall_limit; diff --git a/mysql-test/main/mdev-21101.test b/mysql-test/main/mdev-21101.test new file mode 100644 index 00000000000..9b43c60ec88 --- /dev/null +++ b/mysql-test/main/mdev-21101.test @@ -0,0 +1,53 @@ +# Test that wait_timeout does not cause connection to be closed, when connection is delayed due to +# threadpool internal problems, e.g misconfiguration - too few threads and queueing. +# So if client did not cause wait_timeout, do not report it either. +# See MDEV-21101 for details. + +# Intentionally misconfigure threadpool to have at most 1 or 2 threads ( +# depends on the implementation). Use minimal wait_timeout, do some slow queries from +# different connections simultaneously, to force queueing occurs. +# Verify connections are intact, even if queueing time exceeds wait_timeout + +SELECT + @@global.wait_timeout, @@global.thread_pool_max_threads, @@global.thread_pool_size, + @@global.thread_pool_oversubscribe, @@global.thread_pool_stall_limit +INTO + @_wait_timeout,@_thread_pool_max_threads,@_thread_pool_size, + @_thread_pool_oversubscribe,@_thread_pool_stall_limit; + +SET @@global.wait_timeout=1, + @@global.thread_pool_max_threads=2, + @@global.thread_pool_size=1, + @@global.thread_pool_oversubscribe=1, + @@global.thread_pool_stall_limit=10; + +--connect (c1, localhost, root,,) +--connect (c2, localhost, root,,) +--connect (c3, localhost, root,,) +--connection c1 +--send select sleep(1.1) +--connection c2 +--send select sleep(1.1) +--connection c3 +--send select sleep(1.1) +--connection default +--send select sleep(1.1) +--connection c1 +--reap +--connection c2 +--reap +--connection c3 +--reap +--connection default +--reap +--disconnect c1 +--disconnect c2 +--disconnect c3 +--connection default + +SET @@global.wait_timeout=@_wait_timeout, + @@global.thread_pool_max_threads=@_thread_pool_max_threads, + @@global.thread_pool_size=@_thread_pool_size, + @@global.thread_pool_oversubscribe=@_thread_pool_oversubscribe, + @@global.thread_pool_stall_limit=@_thread_pool_stall_limit; + -- cgit v1.2.1 From 0435fcf90b0afa97b468f9eb5dbdf00349325e35 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 30 Jul 2020 12:08:07 +0200 Subject: MDEV-21101 skip test for embedded --- mysql-test/main/mdev-21101.test | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test') diff --git a/mysql-test/main/mdev-21101.test b/mysql-test/main/mdev-21101.test index 9b43c60ec88..627e86462a1 100644 --- a/mysql-test/main/mdev-21101.test +++ b/mysql-test/main/mdev-21101.test @@ -1,3 +1,4 @@ +--source include/not_embedded.inc # Test that wait_timeout does not cause connection to be closed, when connection is delayed due to # threadpool internal problems, e.g misconfiguration - too few threads and queueing. # So if client did not cause wait_timeout, do not report it either. -- cgit v1.2.1 From c3958ae407016d7dde8b04ffbacf949c62b2e4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Wed, 29 Jul 2020 12:43:38 +0300 Subject: Enable test for testing. --- mysql-test/suite/galera/disabled.def | 1 - 1 file changed, 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index fb06cde5294..221d55934dd 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -44,7 +44,6 @@ galera_var_reject_queries : assertion in inline_mysql_socket_send galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit galera_wan : MDEV-17259 Test failure on galera.galera_wan lp1376747-4 : MDEV-21911 Galera test failure on lp1376747-4 -mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed. 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 -- cgit v1.2.1 From a874b6c4459a2dd028d6c4a15e43eeb556183de0 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Thu, 30 Jul 2020 14:30:21 +0400 Subject: MDEV-23337 Rounding functions create a wrong data type for integer input 1. Fixing ROUND(x) and TRUNCATE(x,0) with TINYINT, SMALLINT, MEDIUMINT, BIGINT input to preserve the exact data type of the argument when it's possible. 2. Fixing FLOOR(x) and CEILING(x) with TINYINT, SMALLINT, MEDIUMINT, BIGINT to preserve the exact data type of the argument. 3. Adding dedicated Type_handler_year::Item_func_round_fix_length_and_dec() to easier handle ROUND(x) and TRUNCATE(x,y) for the YEAR(2) and YEAR(4) input. They still return INT(2) UNSIGNED and INT(4) UNSIGNED correspondingly, as before. --- mysql-test/main/metadata.result | 40 ++++---- mysql-test/main/type_int.result | 216 +++++++++++++++++++++++++++++++++++++++ mysql-test/main/type_int.test | 35 +++++++ mysql-test/main/type_year.result | 27 +++++ mysql-test/main/type_year.test | 15 +++ 5 files changed, 313 insertions(+), 20 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/metadata.result b/mysql-test/main/metadata.result index 1f917bfe5ab..0704f5b8ae8 100644 --- a/mysql-test/main/metadata.result +++ b/mysql-test/main/metadata.result @@ -715,16 +715,16 @@ CEILING(11111111), CEILING(111111111), CEILING(1111111111) LIMIT 0; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def CEILING(1) 3 3 0 N 32897 0 63 -def CEILING(11) 3 4 0 N 32897 0 63 -def CEILING(111) 3 5 0 N 32897 0 63 -def CEILING(1111) 3 6 0 N 32897 0 63 -def CEILING(11111) 3 7 0 N 32897 0 63 -def CEILING(111111) 3 8 0 N 32897 0 63 -def CEILING(1111111) 3 9 0 N 32897 0 63 -def CEILING(11111111) 8 10 0 N 32897 0 63 -def CEILING(111111111) 8 11 0 N 32897 0 63 -def CEILING(1111111111) 8 12 0 N 32897 0 63 +def CEILING(1) 3 1 0 N 32897 0 63 +def CEILING(11) 3 2 0 N 32897 0 63 +def CEILING(111) 3 3 0 N 32897 0 63 +def CEILING(1111) 3 4 0 N 32897 0 63 +def CEILING(11111) 3 5 0 N 32897 0 63 +def CEILING(111111) 3 6 0 N 32897 0 63 +def CEILING(1111111) 3 7 0 N 32897 0 63 +def CEILING(11111111) 3 8 0 N 32897 0 63 +def CEILING(111111111) 3 9 0 N 32897 0 63 +def CEILING(1111111111) 8 10 0 N 32897 0 63 CEILING(1) CEILING(11) CEILING(111) CEILING(1111) CEILING(11111) CEILING(111111) CEILING(1111111) CEILING(11111111) CEILING(111111111) CEILING(1111111111) SELECT FLOOR(1), @@ -738,16 +738,16 @@ FLOOR(11111111), FLOOR(111111111), FLOOR(1111111111) LIMIT 0; Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr -def FLOOR(1) 3 3 0 N 32897 0 63 -def FLOOR(11) 3 4 0 N 32897 0 63 -def FLOOR(111) 3 5 0 N 32897 0 63 -def FLOOR(1111) 3 6 0 N 32897 0 63 -def FLOOR(11111) 3 7 0 N 32897 0 63 -def FLOOR(111111) 3 8 0 N 32897 0 63 -def FLOOR(1111111) 3 9 0 N 32897 0 63 -def FLOOR(11111111) 8 10 0 N 32897 0 63 -def FLOOR(111111111) 8 11 0 N 32897 0 63 -def FLOOR(1111111111) 8 12 0 N 32897 0 63 +def FLOOR(1) 3 1 0 N 32897 0 63 +def FLOOR(11) 3 2 0 N 32897 0 63 +def FLOOR(111) 3 3 0 N 32897 0 63 +def FLOOR(1111) 3 4 0 N 32897 0 63 +def FLOOR(11111) 3 5 0 N 32897 0 63 +def FLOOR(111111) 3 6 0 N 32897 0 63 +def FLOOR(1111111) 3 7 0 N 32897 0 63 +def FLOOR(11111111) 3 8 0 N 32897 0 63 +def FLOOR(111111111) 3 9 0 N 32897 0 63 +def FLOOR(1111111111) 8 10 0 N 32897 0 63 FLOOR(1) FLOOR(11) FLOOR(111) FLOOR(1111) FLOOR(11111) FLOOR(111111) FLOOR(1111111) FLOOR(11111111) FLOOR(111111111) FLOOR(1111111111) SELECT ROUND(1), diff --git a/mysql-test/main/type_int.result b/mysql-test/main/type_int.result index 0d744f6a97b..609889cd5e8 100644 --- a/mysql-test/main/type_int.result +++ b/mysql-test/main/type_int.result @@ -412,5 +412,221 @@ COUNT(*) 0 DROP TABLE t1; # +# MDEV-23337 Rounding functions create a wrong data type for numeric input +# +CREATE PROCEDURE p1(t VARCHAR(64)) +BEGIN +SELECT t AS ``; +EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a TYPE)', 'TYPE', t); +INSERT IGNORE INTO t1 VALUES (-100000000000000000000000000000); +INSERT IGNORE INTO t1 VALUES (100000000000000000000000000000); +CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; +SHOW CREATE TABLE t2; +SELECT * FROM t2; +DROP TABLE t1, t2; +END; +$$ +CALL p1('tinyint'); + tinyint +Table t2 +Create Table CREATE TABLE `t2` ( + `a` tinyint(4) DEFAULT NULL, + `ROUND(a)` tinyint(4) DEFAULT NULL, + `TRUNCATE(a,0)` tinyint(4) DEFAULT NULL, + `FLOOR(a)` tinyint(4) DEFAULT NULL, + `CEILING(a)` tinyint(4) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a -128 +ROUND(a) -128 +TRUNCATE(a,0) -128 +FLOOR(a) -128 +CEILING(a) -128 +a 127 +ROUND(a) 127 +TRUNCATE(a,0) 127 +FLOOR(a) 127 +CEILING(a) 127 +CALL p1('smallint'); + smallint +Table t2 +Create Table CREATE TABLE `t2` ( + `a` smallint(6) DEFAULT NULL, + `ROUND(a)` smallint(6) DEFAULT NULL, + `TRUNCATE(a,0)` smallint(6) DEFAULT NULL, + `FLOOR(a)` smallint(6) DEFAULT NULL, + `CEILING(a)` smallint(6) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a -32768 +ROUND(a) -32768 +TRUNCATE(a,0) -32768 +FLOOR(a) -32768 +CEILING(a) -32768 +a 32767 +ROUND(a) 32767 +TRUNCATE(a,0) 32767 +FLOOR(a) 32767 +CEILING(a) 32767 +CALL p1('mediumint'); + mediumint +Table t2 +Create Table CREATE TABLE `t2` ( + `a` mediumint(9) DEFAULT NULL, + `ROUND(a)` mediumint(9) DEFAULT NULL, + `TRUNCATE(a,0)` mediumint(9) DEFAULT NULL, + `FLOOR(a)` mediumint(9) DEFAULT NULL, + `CEILING(a)` mediumint(9) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a -8388608 +ROUND(a) -8388608 +TRUNCATE(a,0) -8388608 +FLOOR(a) -8388608 +CEILING(a) -8388608 +a 8388607 +ROUND(a) 8388607 +TRUNCATE(a,0) 8388607 +FLOOR(a) 8388607 +CEILING(a) 8388607 +CALL p1('int'); + int +Table t2 +Create Table CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL, + `ROUND(a)` int(11) DEFAULT NULL, + `TRUNCATE(a,0)` int(11) DEFAULT NULL, + `FLOOR(a)` int(11) DEFAULT NULL, + `CEILING(a)` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a -2147483648 +ROUND(a) -2147483648 +TRUNCATE(a,0) -2147483648 +FLOOR(a) -2147483648 +CEILING(a) -2147483648 +a 2147483647 +ROUND(a) 2147483647 +TRUNCATE(a,0) 2147483647 +FLOOR(a) 2147483647 +CEILING(a) 2147483647 +CALL p1('bigint'); + bigint +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bigint(20) DEFAULT NULL, + `ROUND(a)` bigint(20) DEFAULT NULL, + `TRUNCATE(a,0)` bigint(20) DEFAULT NULL, + `FLOOR(a)` bigint(20) DEFAULT NULL, + `CEILING(a)` bigint(20) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a -9223372036854775808 +ROUND(a) -9223372036854775808 +TRUNCATE(a,0) -9223372036854775808 +FLOOR(a) -9223372036854775808 +CEILING(a) -9223372036854775808 +a 9223372036854775807 +ROUND(a) 9223372036854775807 +TRUNCATE(a,0) 9223372036854775807 +FLOOR(a) 9223372036854775807 +CEILING(a) 9223372036854775807 +CALL p1('tinyint unsigned'); + tinyint unsigned +Table t2 +Create Table CREATE TABLE `t2` ( + `a` tinyint(3) unsigned DEFAULT NULL, + `ROUND(a)` tinyint(3) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` tinyint(3) unsigned DEFAULT NULL, + `FLOOR(a)` tinyint(3) unsigned DEFAULT NULL, + `CEILING(a)` tinyint(3) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 0 +ROUND(a) 0 +TRUNCATE(a,0) 0 +FLOOR(a) 0 +CEILING(a) 0 +a 255 +ROUND(a) 255 +TRUNCATE(a,0) 255 +FLOOR(a) 255 +CEILING(a) 255 +CALL p1('smallint unsigned'); + smallint unsigned +Table t2 +Create Table CREATE TABLE `t2` ( + `a` smallint(5) unsigned DEFAULT NULL, + `ROUND(a)` smallint(5) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` smallint(5) unsigned DEFAULT NULL, + `FLOOR(a)` smallint(5) unsigned DEFAULT NULL, + `CEILING(a)` smallint(5) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 0 +ROUND(a) 0 +TRUNCATE(a,0) 0 +FLOOR(a) 0 +CEILING(a) 0 +a 65535 +ROUND(a) 65535 +TRUNCATE(a,0) 65535 +FLOOR(a) 65535 +CEILING(a) 65535 +CALL p1('mediumint unsigned'); + mediumint unsigned +Table t2 +Create Table CREATE TABLE `t2` ( + `a` mediumint(8) unsigned DEFAULT NULL, + `ROUND(a)` mediumint(8) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` mediumint(8) unsigned DEFAULT NULL, + `FLOOR(a)` mediumint(8) unsigned DEFAULT NULL, + `CEILING(a)` mediumint(8) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 0 +ROUND(a) 0 +TRUNCATE(a,0) 0 +FLOOR(a) 0 +CEILING(a) 0 +a 16777215 +ROUND(a) 16777215 +TRUNCATE(a,0) 16777215 +FLOOR(a) 16777215 +CEILING(a) 16777215 +CALL p1('int unsigned'); + int unsigned +Table t2 +Create Table CREATE TABLE `t2` ( + `a` int(10) unsigned DEFAULT NULL, + `ROUND(a)` int(10) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` int(10) unsigned DEFAULT NULL, + `FLOOR(a)` int(10) unsigned DEFAULT NULL, + `CEILING(a)` int(10) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 0 +ROUND(a) 0 +TRUNCATE(a,0) 0 +FLOOR(a) 0 +CEILING(a) 0 +a 4294967295 +ROUND(a) 4294967295 +TRUNCATE(a,0) 4294967295 +FLOOR(a) 4294967295 +CEILING(a) 4294967295 +CALL p1('bigint unsigned'); + bigint unsigned +Table t2 +Create Table CREATE TABLE `t2` ( + `a` bigint(20) unsigned DEFAULT NULL, + `ROUND(a)` bigint(20) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` bigint(20) unsigned DEFAULT NULL, + `FLOOR(a)` bigint(20) unsigned DEFAULT NULL, + `CEILING(a)` bigint(20) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +a 0 +ROUND(a) 0 +TRUNCATE(a,0) 0 +FLOOR(a) 0 +CEILING(a) 0 +a 18446744073709551615 +ROUND(a) 18446744073709551615 +TRUNCATE(a,0) 18446744073709551615 +FLOOR(a) 18446744073709551615 +CEILING(a) 18446744073709551615 +DROP PROCEDURE p1; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_int.test b/mysql-test/main/type_int.test index 662be57abd3..4822f22521f 100644 --- a/mysql-test/main/type_int.test +++ b/mysql-test/main/type_int.test @@ -293,6 +293,41 @@ SELECT COUNT(*) FROM t1 WHERE a XOR a; DROP TABLE t1; +--echo # +--echo # MDEV-23337 Rounding functions create a wrong data type for numeric input +--echo # + +DELIMITER $$; +CREATE PROCEDURE p1(t VARCHAR(64)) +BEGIN + SELECT t AS ``; + EXECUTE IMMEDIATE REPLACE('CREATE TABLE t1 (a TYPE)', 'TYPE', t); + INSERT IGNORE INTO t1 VALUES (-100000000000000000000000000000); + INSERT IGNORE INTO t1 VALUES (100000000000000000000000000000); + CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; + SHOW CREATE TABLE t2; + SELECT * FROM t2; + DROP TABLE t1, t2; +END; +$$ +DELIMITER ;$$ + +--vertical_results +CALL p1('tinyint'); +CALL p1('smallint'); +CALL p1('mediumint'); +CALL p1('int'); +CALL p1('bigint'); + +CALL p1('tinyint unsigned'); +CALL p1('smallint unsigned'); +CALL p1('mediumint unsigned'); +CALL p1('int unsigned'); +CALL p1('bigint unsigned'); +--horizontal_results + +DROP PROCEDURE p1; + --echo # --echo # End of 10.4 tests --echo # diff --git a/mysql-test/main/type_year.result b/mysql-test/main/type_year.result index 71285418588..583a2818e02 100644 --- a/mysql-test/main/type_year.result +++ b/mysql-test/main/type_year.result @@ -585,5 +585,32 @@ COALESCE(a) DATE(COALESCE(a)) NULL NULL DROP TABLE t1; # +# MDEV-23337 Rounding functions create a wrong data type for numeric input +# +CREATE TABLE t1 (a YEAR(2)); +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; +Warnings: +Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead +DESC t2; +Field Type Null Key Default Extra +a year(2) YES NULL +ROUND(a) int(2) unsigned YES NULL +TRUNCATE(a,0) int(2) unsigned YES NULL +FLOOR(a) int(2) unsigned YES NULL +CEILING(a) int(2) unsigned YES NULL +DROP TABLE t2,t1; +CREATE TABLE t1 (a YEAR(4)); +CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; +DESC t2; +Field Type Null Key Default Extra +a year(4) YES NULL +ROUND(a) int(4) unsigned YES NULL +TRUNCATE(a,0) int(4) unsigned YES NULL +FLOOR(a) int(4) unsigned YES NULL +CEILING(a) int(4) unsigned YES NULL +DROP TABLE t2,t1; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_year.test b/mysql-test/main/type_year.test index 3c578b3ab59..19692148146 100644 --- a/mysql-test/main/type_year.test +++ b/mysql-test/main/type_year.test @@ -326,6 +326,21 @@ INSERT INTO t1 VALUES (NULL); SELECT COALESCE(a), DATE(COALESCE(a)) FROM t1; DROP TABLE t1; +--echo # +--echo # MDEV-23337 Rounding functions create a wrong data type for numeric input +--echo # + +CREATE TABLE t1 (a YEAR(2)); +CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; +DESC t2; +DROP TABLE t2,t1; + +CREATE TABLE t1 (a YEAR(4)); +CREATE TABLE t2 AS SELECT a, ROUND(a), TRUNCATE(a,0), FLOOR(a), CEILING(a) FROM t1; +DESC t2; +DROP TABLE t2,t1; + + --echo # --echo # End of 10.4 tests --echo # -- cgit v1.2.1 From 78f09b12d368b7b01e9dc09f84c19b3a3d6bad91 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jul 2020 16:17:59 +0200 Subject: MDEV-23009 SIGSEGV in get_field from acl_load (on optimized builds) Classes that handle privilege tables (like Tables_priv_table) could read some columns conditionally but they expect a certain minimal number of colunms always to exist. Add a check for a minimal required number of columns in privilege tables, don't use a table that has fewer columns than required. --- mysql-test/main/grant4.result | 2 +- mysql-test/main/grant5.result | 6 ++++++ mysql-test/main/grant5.test | 10 ++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) (limited to 'mysql-test') diff --git a/mysql-test/main/grant4.result b/mysql-test/main/grant4.result index f252a4c2ad5..29021b608aa 100644 --- a/mysql-test/main/grant4.result +++ b/mysql-test/main/grant4.result @@ -148,7 +148,7 @@ call mtr.add_suppression('mysql.user table is damaged'); rename table mysql.user to mysql.user1; create table mysql.user (Host char(100), User char(100)); flush privileges; -ERROR HY000: Unknown error +ERROR HY000: Fatal error: mysql.user table is damaged or in unsupported 3.20 format drop table mysql.user; rename table mysql.user1 to mysql.user; # switching back from mysql.user to mysql.global_priv diff --git a/mysql-test/main/grant5.result b/mysql-test/main/grant5.result index df09b1fcc64..2cc1c11f7d8 100644 --- a/mysql-test/main/grant5.result +++ b/mysql-test/main/grant5.result @@ -242,4 +242,10 @@ disconnect con1; connection default; drop database db; drop user foo; +call mtr.add_suppression('mysql.host table is damaged'); +create table mysql.host (c1 int); +insert mysql.host values (1); +flush privileges; +ERROR HY000: Fatal error: mysql.host table is damaged or in unsupported 3.20 format +drop table mysql.host; # End of 10.4 tests diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test index 39fcff92435..054b16c0a6e 100644 --- a/mysql-test/main/grant5.test +++ b/mysql-test/main/grant5.test @@ -199,4 +199,14 @@ delete from db.t1 returning *; drop database db; drop user foo; +# +# MDEV-23009 SIGSEGV in get_field from acl_load (on optimized builds) +# +call mtr.add_suppression('mysql.host table is damaged'); +create table mysql.host (c1 int); +insert mysql.host values (1); +--error ER_UNKNOWN_ERROR +flush privileges; +drop table mysql.host; + --echo # End of 10.4 tests -- cgit v1.2.1 From 153cd6a27f1b798fea6dee3aecf3a95df561c6fa Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 23 Jul 2020 18:57:40 +0200 Subject: MDEV-23237 mariadb.sys has too many privileges don't GRANT UPDATE ON mysql.global_priv TO mariadb.sys@localhost; --- mysql-test/main/grant.result | 2 -- mysql-test/main/information_schema.result | 1 - mysql-test/main/upgrade_MDEV-19650.result | 1 - mysql-test/main/view_grant.result | 1 - mysql-test/suite/funcs_1/r/is_table_privileges.result | 1 - mysql-test/suite/roles/set_role-table-column-priv.result | 2 +- mysql-test/suite/roles/set_role-table-simple.result | 2 +- 7 files changed, 2 insertions(+), 8 deletions(-) (limited to 'mysql-test') diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index d24f53142d8..456bc251e78 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -968,7 +968,6 @@ select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def test t1 UPDATE NO 'mariadb.sys'@'localhost' def mysql global_priv SELECT NO -'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO 'mariadb.sys'@'localhost' def mysql global_priv DELETE NO connect conn5,localhost,mysqltest_8,,; select * from t1; @@ -985,7 +984,6 @@ GRANT USAGE ON *.* TO `mysqltest_8`@`%` select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mariadb.sys'@'localhost' def mysql global_priv SELECT NO -'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO 'mariadb.sys'@'localhost' def mysql global_priv DELETE NO flush privileges; show grants for mysqltest_8@''; diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index 697e00635eb..7e38c33e8c5 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -576,7 +576,6 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mariadb.sys'@'localhost' def mysql global_priv SELECT NO -'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO 'mariadb.sys'@'localhost' def mysql global_priv DELETE NO drop view v1, v2, v3; drop table t1; diff --git a/mysql-test/main/upgrade_MDEV-19650.result b/mysql-test/main/upgrade_MDEV-19650.result index 386c15ae83e..7e8610683e2 100644 --- a/mysql-test/main/upgrade_MDEV-19650.result +++ b/mysql-test/main/upgrade_MDEV-19650.result @@ -165,7 +165,6 @@ GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mariadb.sys'@'localhost' def mysql global_priv SELECT NO -'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO 'mariadb.sys'@'localhost' def mysql global_priv DELETE NO # check non root CREATE USER 'not_root'@'localhost'; diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result index 263c932097d..954b57db768 100644 --- a/mysql-test/main/view_grant.result +++ b/mysql-test/main/view_grant.result @@ -1344,7 +1344,6 @@ connection default; select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mariadb.sys'@'localhost' def mysql global_priv SELECT NO -'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO 'mariadb.sys'@'localhost' def mysql global_priv DELETE NO End of 5.0 tests. connection default; diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result index d4f0de131d1..d7065b54788 100644 --- a/mysql-test/suite/funcs_1/r/is_table_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -56,7 +56,6 @@ SELECT table_catalog, table_schema, table_name, privilege_type FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name privilege_type def mysql global_priv SELECT -def mysql global_priv UPDATE def mysql global_priv DELETE ###################################################################### # Testcase 3.2.11.2+3.2.11.3+3.2.11.4: diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result index 9e1d21bab5e..4aaa0388170 100644 --- a/mysql-test/suite/roles/set_role-table-column-priv.result +++ b/mysql-test/suite/roles/set_role-table-column-priv.result @@ -63,7 +63,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'ro drop user 'test_user'@'localhost'; select * from mysql.tables_priv; Host Db User Table_name Grantor Timestamp Table_priv Column_priv -localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Update,Delete +localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Delete mysql test_role2 roles_mapping root@localhost 0000-00-00 00:00:00 Select revoke select on mysql.roles_mapping from test_role2; delete from mysql.user where user like'test_%'; diff --git a/mysql-test/suite/roles/set_role-table-simple.result b/mysql-test/suite/roles/set_role-table-simple.result index 107ca726e22..f33df34d85e 100644 --- a/mysql-test/suite/roles/set_role-table-simple.result +++ b/mysql-test/suite/roles/set_role-table-simple.result @@ -61,7 +61,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'ro drop user 'test_user'@'localhost'; select * from mysql.tables_priv; Host Db User Table_name Grantor Timestamp Table_priv Column_priv -localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Update,Delete +localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Delete mysql test_role2 roles_mapping root@localhost 0000-00-00 00:00:00 Select revoke select on mysql.roles_mapping from test_role2; delete from mysql.user where user like'test_%'; -- cgit v1.2.1 From 91ebf1844f4fbc36edb66023332a045895d07cf5 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Tue, 28 Jul 2020 23:45:51 +1000 Subject: MDEV-19338 InnoDB: Failing assertion: !cursor->index->is_committed() Call mark_columns_per_binlog_row_image before find_row() to set up table->vcol_set early, so the virtual column value will be updated after record read (ha_rnd_pos/ha_index_next/etc) by table->update_virtual_fields() call --- mysql-test/suite/rpl/r/rpl_row_virt.result | 20 ++++++++++++++++++++ mysql-test/suite/rpl/t/rpl_row_virt.test | 27 +++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 mysql-test/suite/rpl/r/rpl_row_virt.result create mode 100644 mysql-test/suite/rpl/t/rpl_row_virt.test (limited to 'mysql-test') diff --git a/mysql-test/suite/rpl/r/rpl_row_virt.result b/mysql-test/suite/rpl/r/rpl_row_virt.result new file mode 100644 index 00000000000..b670c63d9f1 --- /dev/null +++ b/mysql-test/suite/rpl/r/rpl_row_virt.result @@ -0,0 +1,20 @@ +include/master-slave.inc +[connection master] +connection master; +create table t1 ( +id int auto_increment, +data varchar(32), +virt tinyint as (1), +primary key (id), +key virt (virt) +) engine=innodb default charset=utf8mb4; +insert into t1 (data) values ('broken'); +update t1 set data='more broken'; +connection slave; +select * from t1; +id data virt +1 more broken 1 +connection master; +drop table t1; +connection slave; +include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_row_virt.test b/mysql-test/suite/rpl/t/rpl_row_virt.test new file mode 100644 index 00000000000..e79869cd8e4 --- /dev/null +++ b/mysql-test/suite/rpl/t/rpl_row_virt.test @@ -0,0 +1,27 @@ +--source include/have_binlog_format_row.inc +--source include/master-slave.inc +--source include/have_innodb.inc +connection master; + +create table t1 ( + id int auto_increment, + data varchar(32), + virt tinyint as (1), + primary key (id), + key virt (virt) +) engine=innodb default charset=utf8mb4; + +insert into t1 (data) values ('broken'); + +update t1 set data='more broken'; + +--sync_slave_with_master + +select * from t1; + +--connection master +drop table t1; + +--sync_slave_with_master + +--source include/rpl_end.inc -- cgit v1.2.1 From fd0abc890f99e2b5ca1b8ae4cb0dc3968eef1208 Mon Sep 17 00:00:00 2001 From: Nikita Malyavin Date: Wed, 29 Jul 2020 01:01:24 +1000 Subject: MDEV-18042 Server crashes upon adding a non-null date column under NO_ZERO_DATE with ALGORITHM=INPLACE accept table_name and db_name instead of table_share in make_truncated_value_warning --- mysql-test/suite/innodb/r/innodb-alter.result | 17 +++++++++++++++++ mysql-test/suite/innodb/t/innodb-alter.test | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result index a5361f720ce..80cf14c1725 100644 --- a/mysql-test/suite/innodb/r/innodb-alter.result +++ b/mysql-test/suite/innodb/r/innodb-alter.result @@ -1055,3 +1055,20 @@ SELECT * FROM t1; a b 10 10:20:30 DROP TABLE t1; +# +# MDEV-18042 Server crashes in mysql_alter_table upon adding a non-null +# date column under NO_ZERO_DATE with ALGORITHM=INPLACE +# +SET @OLD_SQL_MODE= @@SQL_MODE; +SET @@SQL_MODE= 'NO_ZERO_DATE'; +CREATE OR REPLACE TABLE t1 (i INT) ENGINE=MyISAM; +ALTER TABLE t1 ADD COLUMN d DATE NOT NULL, ALGORITHM=INPLACE; +ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY +CREATE OR REPLACE TABLE t1 (i INT) ENGINE=InnoDB; +ALTER TABLE t1 ADD d DATETIME NOT NULL CHECK (f <= 0), ALGORITHM=COPY; +ERROR 42S22: Unknown column 'f' in 'CHECK' +CREATE OR REPLACE TABLE t1 (a int) ENGINE=InnoDB; +ALTER TABLE t1 ADD COLUMN b DATETIME NOT NULL, LOCK=NONE; +# Cleanup +SET @@SQL_MODE= @OLD_SQL_MODE; +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test index 9bfc1262a1b..aae3f3960a2 100644 --- a/mysql-test/suite/innodb/t/innodb-alter.test +++ b/mysql-test/suite/innodb/t/innodb-alter.test @@ -646,6 +646,28 @@ ALTER TABLE t1 ADD b TIME NOT NULL DEFAULT if(unix_timestamp()>1,TIMESTAMP'2001- SELECT * FROM t1; DROP TABLE t1; +--echo # +--echo # MDEV-18042 Server crashes in mysql_alter_table upon adding a non-null +--echo # date column under NO_ZERO_DATE with ALGORITHM=INPLACE +--echo # + +SET @OLD_SQL_MODE= @@SQL_MODE; +SET @@SQL_MODE= 'NO_ZERO_DATE'; +CREATE OR REPLACE TABLE t1 (i INT) ENGINE=MyISAM; +--error ER_ALTER_OPERATION_NOT_SUPPORTED +ALTER TABLE t1 ADD COLUMN d DATE NOT NULL, ALGORITHM=INPLACE; + +CREATE OR REPLACE TABLE t1 (i INT) ENGINE=InnoDB; +--error ER_BAD_FIELD_ERROR +ALTER TABLE t1 ADD d DATETIME NOT NULL CHECK (f <= 0), ALGORITHM=COPY; + +CREATE OR REPLACE TABLE t1 (a int) ENGINE=InnoDB; +ALTER TABLE t1 ADD COLUMN b DATETIME NOT NULL, LOCK=NONE; + +--echo # Cleanup +SET @@SQL_MODE= @OLD_SQL_MODE; +DROP TABLE t1; + # # End of 10.2 tests # -- cgit v1.2.1 From f35d1721039f8f115fc55e8f4b4d2bb4012161d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 31 Jul 2020 11:38:23 +0300 Subject: MDEV-23198 Crash in REPLACE row_vers_impl_x_locked_low(): clust_offsets may point to memory that is allocated by mem_heap_alloc() and may have been freed. For initializing clust_offsets, try to use the stack-allocated buffer instead of a pointer that may point to freed memory. This fixes a regression that was introduced in commit f0aa073f2bf3d8d85b3d028df89cdb4cdfc4002d (MDEV-20950). --- mysql-test/suite/innodb/r/mvcc.result | 14 ++++++++++++++ mysql-test/suite/innodb/t/mvcc.test | 20 ++++++++++++++++++++ 2 files changed, 34 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/suite/innodb/r/mvcc.result b/mysql-test/suite/innodb/r/mvcc.result index 6826978d6a7..b0b834c91a4 100644 --- a/mysql-test/suite/innodb/r/mvcc.result +++ b/mysql-test/suite/innodb/r/mvcc.result @@ -28,4 +28,18 @@ SELECT * FROM t1; a 0 DROP TABLE t1; +# +# MDEV-23198 Crash in REPLACE +# +BEGIN NOT ATOMIC +DECLARE c TEXT DEFAULT(SELECT CONCAT('CREATE TABLE t1(id INT PRIMARY KEY, c', +GROUP_CONCAT(seq SEPARATOR ' INT, c'), +' INT NOT NULL UNIQUE) ENGINE=InnoDB') +FROM seq_1_to_294); +EXECUTE IMMEDIATE c; +END; +$$ +INSERT INTO t1 SET id=1,c294=1; +REPLACE t1 SET id=1,c294=1; +DROP TABLE t1; SET GLOBAL innodb_file_per_table= @save_per_table; diff --git a/mysql-test/suite/innodb/t/mvcc.test b/mysql-test/suite/innodb/t/mvcc.test index bf76a5de798..7c37718c28a 100644 --- a/mysql-test/suite/innodb/t/mvcc.test +++ b/mysql-test/suite/innodb/t/mvcc.test @@ -1,4 +1,5 @@ --source include/have_innodb.inc +--source include/have_sequence.inc SET @save_per_table= @@GLOBAL.innodb_file_per_table; SET GLOBAL innodb_file_per_table= 1; @@ -49,4 +50,23 @@ SELECT * FROM t1; DROP TABLE t1; +--echo # +--echo # MDEV-23198 Crash in REPLACE +--echo # + +DELIMITER $$; +BEGIN NOT ATOMIC + DECLARE c TEXT DEFAULT(SELECT CONCAT('CREATE TABLE t1(id INT PRIMARY KEY, c', + GROUP_CONCAT(seq SEPARATOR ' INT, c'), + ' INT NOT NULL UNIQUE) ENGINE=InnoDB') + FROM seq_1_to_294); + EXECUTE IMMEDIATE c; +END; +$$ +DELIMITER ;$$ + +INSERT INTO t1 SET id=1,c294=1; +REPLACE t1 SET id=1,c294=1; +DROP TABLE t1; + SET GLOBAL innodb_file_per_table= @save_per_table; -- cgit v1.2.1 From dc513dff911d72eaaf9f752f390fef8d1ef9a4b0 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Fri, 31 Jul 2020 10:42:44 +0400 Subject: MDEV-23351 Rounding functions return wrong data types for DATE input Fixing ROUND(date,0), TRUNCATE(date,x), FLOOR(date), CEILING(date) to return the `int(8) unsigned` data type. Details: 1. Cleanup: moving virtual implementations - Type_handler_temporal_result::Item_func_int_val_fix_length_and_dec() - Type_handler_temporal_result::Item_func_round_fix_length_and_dec() to Type_handler_date_common. Other temporal data type handlers override these methods anyway. So they were only DATE specific. This change makes the code clearer. 2. Backporting DTCollation_numeric from 10.5, to reuse the code easier. 3. Adding the `preferred_attrs` argument to Item_func_round::fix_arg_int(). Now Type_handler_xxx::Item_func_round_val_fix_length_and_dec() work as follows: - The INT-alike and YEAR handlers copy preferred_attrs from args[0]. - The DATE handler passes explicit attributes, to get `int(8) unsigned`. - The hex hybrid handler passes NULL, so fix_arg_int() calculates attributes. 4. Type_handler_date_common::Item_func_int_val_fix_length_and_dec() now sets the type handler and attributes to get `int(8) unsigned`. --- mysql-test/main/type_date.result | 14 ++++++++++++++ mysql-test/main/type_date.test | 8 ++++++++ 2 files changed, 22 insertions(+) (limited to 'mysql-test') diff --git a/mysql-test/main/type_date.result b/mysql-test/main/type_date.result index 616ba0a4529..f40a27e5f5c 100644 --- a/mysql-test/main/type_date.result +++ b/mysql-test/main/type_date.result @@ -1089,5 +1089,19 @@ CAST(1012.5 AS DATE) * 1.0 Warnings: Note 1292 Truncated incorrect date value: '1012.5' # +# MDEV-23351 Rounding functions return wrong data types for DATE input +# +CREATE TABLE t1 (a date); +CREATE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1; +SHOW CREATE TABLE t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `FLOOR(a)` int(8) unsigned DEFAULT NULL, + `CEIL(a)` int(8) unsigned DEFAULT NULL, + `ROUND(a)` int(8) unsigned DEFAULT NULL, + `TRUNCATE(a,0)` int(8) unsigned DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t2,t1; +# # End of 10.4 tests # diff --git a/mysql-test/main/type_date.test b/mysql-test/main/type_date.test index c041295f845..33598846504 100644 --- a/mysql-test/main/type_date.test +++ b/mysql-test/main/type_date.test @@ -740,6 +740,14 @@ SET sql_mode=DEFAULT; SELECT NULLIF(CAST(1012.5 AS DATE), 1); SELECT CAST(1012.5 AS DATE) * 1.0; +--echo # +--echo # MDEV-23351 Rounding functions return wrong data types for DATE input +--echo # + +CREATE TABLE t1 (a date); +CREATE TABLE t2 AS SELECT FLOOR(a), CEIL(a),ROUND(a),TRUNCATE(a,0) FROM t1; +SHOW CREATE TABLE t2; +DROP TABLE t2,t1; --echo # --echo # End of 10.4 tests -- cgit v1.2.1