summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-07-31 18:09:08 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-07-31 18:09:08 +0300
commit9216114ce729733e6b0c4ce952bfdf57595ff387 (patch)
tree7a541ed87a6a8174d3d94c5f780724a34e08dc1c
parentdc513dff911d72eaaf9f752f390fef8d1ef9a4b0 (diff)
parent66ec3a770f7854f500ece66c78f3c87c9cd6da15 (diff)
downloadmariadb-git-9216114ce729733e6b0c4ce952bfdf57595ff387.tar.gz
Merge 10.3 into 10.4
-rw-r--r--extra/mariabackup/xtrabackup.cc6
-rw-r--r--include/violite.h2
-rw-r--r--mysql-test/include/binlog_parallel_replication_marks.test2
-rw-r--r--mysql-test/main/disabled.def1
-rw-r--r--mysql-test/main/mdev-21101.opt1
-rw-r--r--mysql-test/main/mdev-21101.result43
-rw-r--r--mysql-test/main/mdev-21101.test54
-rw-r--r--mysql-test/main/mysqlbinlog-innodb.result8
-rw-r--r--mysql-test/main/mysqlbinlog.result74
-rw-r--r--mysql-test/main/mysqlbinlog_row_compressed.result16
-rw-r--r--mysql-test/main/mysqlbinlog_row_minimal.result18
-rw-r--r--mysql-test/main/mysqlbinlog_stmt_compressed.result16
-rw-r--r--mysql-test/main/mysqltest_tracking_info.result12
-rw-r--r--mysql-test/main/mysqltest_tracking_info.test15
-rw-r--r--mysql-test/main/plugin.result14
-rw-r--r--mysql-test/main/plugin.test23
-rw-r--r--mysql-test/main/user_var-binlog.result4
-rw-r--r--mysql-test/main/win.result7
-rw-r--r--mysql-test/main/win.test9
-rw-r--r--mysql-test/main/win_ntile.result78
-rw-r--r--mysql-test/main/win_ntile.test43
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog2.result206
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result358
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result40
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result40
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result16
-rw-r--r--mysql-test/suite/binlog/r/binlog_parallel_replication_marks_row.result18
-rw-r--r--mysql-test/suite/binlog/r/binlog_parallel_replication_marks_stm_mix.result18
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_annotate.result72
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result14
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result28
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result14
-rw-r--r--mysql-test/suite/binlog/r/flashback.result20
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_row_annotate.result36
-rw-r--r--mysql-test/suite/compat/oracle/r/binlog_ptr_mysqlbinlog.result100
-rw-r--r--mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog-master.opt1
-rw-r--r--mysql-test/suite/compat/oracle/t/binlog_ptr_mysqlbinlog.test117
-rw-r--r--mysql-test/suite/encryption/r/innodb_encrypt_temporary_tables.result3
-rw-r--r--mysql-test/suite/encryption/t/innodb_encrypt_temporary_tables.test2
-rw-r--r--mysql-test/suite/galera/disabled.def2
-rw-r--r--mysql-test/suite/galera/include/galera_st_clean_slave.inc6
-rw-r--r--mysql-test/suite/galera/include/galera_st_disconnect_slave.inc6
-rw-r--r--mysql-test/suite/galera/include/galera_st_kill_slave.inc6
-rw-r--r--mysql-test/suite/galera/include/galera_st_kill_slave_ddl.inc5
-rw-r--r--mysql-test/suite/galera/include/galera_st_shutdown_slave.inc6
-rw-r--r--mysql-test/suite/gcol/r/gcol_bugfixes.result66
-rw-r--r--mysql-test/suite/gcol/t/gcol_bugfixes.test70
-rw-r--r--mysql-test/suite/innodb/disabled.def1
-rw-r--r--mysql-test/suite/innodb/r/alter_primary_key.result26
-rw-r--r--mysql-test/suite/innodb/r/innodb-alter.result17
-rw-r--r--mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result2
-rw-r--r--mysql-test/suite/innodb/r/mvcc.result14
-rw-r--r--mysql-test/suite/innodb/t/alter_primary_key.test34
-rw-r--r--mysql-test/suite/innodb/t/innodb-alter.test22
-rw-r--r--mysql-test/suite/innodb/t/innodb_force_recovery_rollback.test3
-rw-r--r--mysql-test/suite/innodb/t/mvcc.test20
-rw-r--r--mysql-test/suite/plugins/r/audit_null_debug.result1
-rw-r--r--mysql-test/suite/plugins/t/audit_null_debug.test3
-rw-r--r--mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_dump_request_retry_warning.result22
-rw-r--r--mysql-test/suite/rpl/r/rpl_hrtime.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev382.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_virt.result20
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp.result52
-rw-r--r--mysql-test/suite/rpl/t/rpl_dump_request_retry_warning.test60
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_virt.test27
-rw-r--r--mysql-test/suite/sys_vars/r/session_track_system_variables_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/t/session_track_system_variables_basic.test7
-rw-r--r--mysql-test/suite/versioning/r/partition_rotation.result20
-rw-r--r--mysql-test/suite/versioning/t/partition_rotation.test18
-rw-r--r--mysys/my_rdtsc.c4
-rw-r--r--sql-common/client.c2
-rw-r--r--sql/field.cc8
-rw-r--r--sql/item.cc35
-rw-r--r--sql/item_create.cc2
-rw-r--r--sql/item_timefunc.cc5
-rw-r--r--sql/item_windowfunc.cc6
-rw-r--r--sql/item_windowfunc.h10
-rw-r--r--sql/log_event.cc22
-rw-r--r--sql/net_serv.cc14
-rw-r--r--sql/partition_info.cc1
-rw-r--r--sql/session_tracker.cc8
-rw-r--r--sql/slave.cc3
-rw-r--r--sql/sql_base.cc43
-rw-r--r--sql/sql_class.cc1
-rw-r--r--sql/sql_class.h21
-rw-r--r--sql/sql_parse.cc2
-rw-r--r--sql/sql_plugin.cc47
-rw-r--r--sql/sql_table.cc5
-rw-r--r--sql/sql_time.cc22
-rw-r--r--sql/sql_time.h4
-rw-r--r--sql/sql_type.cc21
-rw-r--r--sql/sql_type.h32
-rw-r--r--sql/sys_vars.cc6
-rw-r--r--sql/sys_vars.ic13
-rw-r--r--sql/table.cc16
-rw-r--r--sql/table.h1
-rw-r--r--sql/threadpool.h1
-rw-r--r--sql/threadpool_common.cc22
-rw-r--r--sql/threadpool_generic.cc22
-rw-r--r--storage/innobase/btr/btr0btr.cc13
-rw-r--r--storage/innobase/btr/btr0cur.cc21
-rw-r--r--storage/innobase/btr/btr0sea.cc20
-rw-r--r--storage/innobase/buf/buf0buf.cc19
-rw-r--r--storage/innobase/buf/buf0flu.cc4
-rw-r--r--storage/innobase/dict/dict0dict.cc1
-rw-r--r--storage/innobase/handler/ha_innodb.cc48
-rw-r--r--storage/innobase/handler/handler0alter.cc5
-rw-r--r--storage/innobase/include/rem0rec.h7
-rw-r--r--storage/innobase/include/srv0srv.h25
-rw-r--r--storage/innobase/log/log0log.cc3
-rw-r--r--storage/innobase/log/log0recv.cc5
-rw-r--r--storage/innobase/row/row0ins.cc10
-rw-r--r--storage/innobase/row/row0mysql.cc2
-rw-r--r--storage/innobase/row/row0vers.cc8
-rw-r--r--storage/innobase/srv/srv0srv.cc100
-rw-r--r--storage/innobase/srv/srv0start.cc4
-rw-r--r--storage/innobase/trx/trx0roll.cc8
-rw-r--r--storage/innobase/trx/trx0trx.cc5
-rw-r--r--storage/rocksdb/CMakeLists.txt7
-rw-r--r--storage/rocksdb/build_rocksdb.cmake26
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test2
-rw-r--r--vio/vio_priv.h1
-rw-r--r--vio/viopipe.c6
-rw-r--r--vio/viosocket.c29
125 files changed, 1968 insertions, 947 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 0f30e02fb7b..67e38ebf821 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -252,12 +252,6 @@ my_bool innobase_locks_unsafe_for_binlog;
my_bool innobase_rollback_on_timeout;
my_bool innobase_create_status_file;
-/* The following counter is used to convey information to InnoDB
-about server activity: in selects it is not sensible to call
-srv_active_wake_master_thread after each fetch or search, we only do
-it every INNOBASE_WAKE_INTERVAL'th step. */
-
-#define INNOBASE_WAKE_INTERVAL 32
ulong innobase_active_counter = 0;
#ifndef _WIN32
diff --git a/include/violite.h b/include/violite.h
index 9a0e995133d..27ad58ba1a9 100644
--- a/include/violite.h
+++ b/include/violite.h
@@ -109,9 +109,7 @@ my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen);
/* Wait for an I/O event notification. */
int vio_io_wait(Vio *vio, enum enum_vio_io_event event, int timeout);
my_bool vio_is_connected(Vio *vio);
-#ifndef DBUG_OFF
ssize_t vio_pending(Vio *vio);
-#endif
/* Set timeout for a network operation. */
extern int vio_timeout(Vio *vio, uint which, int timeout_sec);
extern void vio_set_wait_callback(void (*before_wait)(void),
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 (<F>) {
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/disabled.def b/mysql-test/main/disabled.def
index 8ba5b271c2b..0faaed4bef9 100644
--- a/mysql-test/main/disabled.def
+++ b/mysql-test/main/disabled.def
@@ -17,3 +17,4 @@ mysql_embedded : Bug#12561297 2011-05-14 Anitha Dependent on PB2 chang
file_contents : MDEV-6526 these files are not installed anymore
max_statement_time : cannot possibly work, depends on timing
partition_open_files_limit : open_files_limit check broken by MDEV-18360
+main.upgrade_MDEV-19650 : MDEV-23358 fails with result difference
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..627e86462a1
--- /dev/null
+++ b/mysql-test/main/mdev-21101.test
@@ -0,0 +1,54 @@
+--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.
+# 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;
+
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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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
#<date> 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/mysqltest_tracking_info.result b/mysql-test/main/mysqltest_tracking_info.result
index 9fa63436286..3c474cee10f 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/main/plugin.result b/mysql-test/main/plugin.result
index 6fbbc0a880a..50986b95ccc 100644
--- a/mysql-test/main/plugin.result
+++ b/mysql-test/main/plugin.result
@@ -342,6 +342,19 @@ 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
+#
# MDEV-16294: INSTALL PLUGIN IF NOT EXISTS / UNINSTALL PLUGIN IF EXISTS
#
# INSTALL IF NOT EXISTS PLUGIN name SONAME library /
@@ -403,3 +416,4 @@ INSTALL PLUGIN example SONAME 'ha_example';
CREATE TEMPORARY TABLE t1(a INT) ENGINE=example;
DROP TABLE t1;
UNINSTALL PLUGIN example;
+# End of 10.4 tests
diff --git a/mysql-test/main/plugin.test b/mysql-test/main/plugin.test
index 5a855a1276e..19199f767f5 100644
--- a/mysql-test/main/plugin.test
+++ b/mysql-test/main/plugin.test
@@ -277,8 +277,27 @@ DROP TABLE t1;
--echo # End of 10.1 test
---source include/install_plugin_if_exists.inc
+--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
+
+--source include/install_plugin_if_exists.inc
--echo #
--echo # Make sure temporary tables maintain plugin references properly
@@ -294,3 +313,5 @@ INSTALL PLUGIN example SONAME 'ha_example';
CREATE TEMPORARY TABLE t1(a INT) ENGINE=example;
DROP TABLE t1;
UNINSTALL PLUGIN example;
+
+--echo # End of 10.4 tests
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/main/win.result b/mysql-test/main/win.result
index d5565bca7d0..782abbf7947 100644
--- a/mysql-test/main/win.result
+++ b/mysql-test/main/win.result
@@ -3843,6 +3843,13 @@ 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/main/win.test b/mysql-test/main/win.test
index 7ef505fc3da..427a765355b 100644
--- a/mysql-test/main/win.test
+++ b/mysql-test/main/win.test
@@ -2498,6 +2498,15 @@ 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 #
diff --git a/mysql-test/main/win_ntile.result b/mysql-test/main/win_ntile.result
index 41cb1a594bf..4d02a230e13 100644
--- a/mysql-test/main/win_ntile.result
+++ b/mysql-test/main/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/main/win_ntile.test b/mysql-test/main/win_ntile.test
index 6f12e1f4005..c65ba7e1521 100644
--- a/mysql-test/main/win_ntile.test
+++ b/mysql-test/main/win_ntile.test
@@ -169,3 +169,46 @@ 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;
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/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 779e77a4540..d99a55b9b44 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';
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index 221d55934dd..cfab7ce3472 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -18,13 +18,11 @@ 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_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
galera_binlog_stmt_autoinc : MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
galera_ftwrl : MDEV-21525 galera.galera_ftwrl
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
-galera_ist_progress : MDEV-15236 fails when trying to read transfer status
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
galera_kill_nochanges : MDEV-18280 Galera test failure on galera_split_brain and galera_kill_nochanges
galera_load_data : MDEV-19968 galera.galera_load_data
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 d6d7552f7b6..3ac52deb284 100644
--- a/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
+++ b/mysql-test/suite/galera/include/galera_st_disconnect_slave.inc
@@ -100,12 +100,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;
diff --git a/mysql-test/suite/gcol/r/gcol_bugfixes.result b/mysql-test/suite/gcol/r/gcol_bugfixes.result
index 3d19f718287..1acb343c498 100644
--- a/mysql-test/suite/gcol/r/gcol_bugfixes.result
+++ b/mysql-test/suite/gcol/r/gcol_bugfixes.result
@@ -605,3 +605,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;
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/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/r/innodb-alter.result b/mysql-test/suite/innodb/r/innodb-alter.result
index 24cf44c90e0..4bd1a09dd73 100644
--- a/mysql-test/suite/innodb/r/innodb-alter.result
+++ b/mysql-test/suite/innodb/r/innodb-alter.result
@@ -1069,3 +1069,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/r/innodb_force_recovery_rollback.result b/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result
index 81fa2448e3d..c2db4bed2f9 100644
--- a/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result
+++ b/mysql-test/suite/innodb/r/innodb_force_recovery_rollback.result
@@ -13,6 +13,6 @@ CREATE TABLE t1 (a INT PRIMARY KEY) ENGINE=InnoDB;
# restart: --innodb-force-recovery=2
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/r/mvcc.result b/mysql-test/suite/innodb/r/mvcc.result
index fc2d403fa63..215b2165b8c 100644
--- a/mysql-test/suite/innodb/r/mvcc.result
+++ b/mysql-test/suite/innodb/r/mvcc.result
@@ -29,4 +29,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/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;
diff --git a/mysql-test/suite/innodb/t/innodb-alter.test b/mysql-test/suite/innodb/t/innodb-alter.test
index d383b3bf55e..f72935ebc3c 100644
--- a/mysql-test/suite/innodb/t/innodb-alter.test
+++ b/mysql-test/suite/innodb/t/innodb-alter.test
@@ -668,6 +668,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
#
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;
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;
diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result
index 3b18edf1d0b..727bd67aecf 100644
--- a/mysql-test/suite/plugins/r/audit_null_debug.result
+++ b/mysql-test/suite/plugins/r/audit_null_debug.result
@@ -14,6 +14,7 @@ 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';
alter table mysql.plugin engine=aria;
diff --git a/mysql-test/suite/plugins/t/audit_null_debug.test b/mysql-test/suite/plugins/t/audit_null_debug.test
index da949b15f8a..52c50f13b74 100644
--- a/mysql-test/suite/plugins/t/audit_null_debug.test
+++ b/mysql-test/suite/plugins/t/audit_null_debug.test
@@ -28,7 +28,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/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_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/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 '<name>' 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_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/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/*!*/;
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
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
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";
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;
diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c
index 2d93239f7dd..c707588da01 100644
--- a/mysys/my_rdtsc.c
+++ b/mysys/my_rdtsc.c
@@ -609,7 +609,11 @@ void my_timer_init(MY_TIMER_INFO *mti)
time1= my_timer_cycles();
time2= my_timer_ticks();
time3= time2; /* Avoids a Microsoft/IBM compiler warning */
+#if defined(HAVE_SYS_TIMES_H) && defined(HAVE_TIMES)
+ for (i= 0; i < 1000; ++i)
+#else
for (i= 0; i < MY_TIMER_ITERATIONS * 1000; ++i)
+#endif
{
time3= my_timer_ticks();
if (time3 - time2 > 10) break;
diff --git a/sql-common/client.c b/sql-common/client.c
index 09f7abcce90..a74a257ed8b 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -475,6 +475,8 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
set_mysql_error(mysql, CR_NET_PACKET_TOO_LARGE, unknown_sqlstate);
goto end;
}
+ if (net->last_errno == ER_NET_ERROR_ON_WRITE && command == COM_BINLOG_DUMP)
+ goto end;
end_server(mysql);
if (mysql_reconnect(mysql) || stmt_skip)
goto end;
diff --git a/sql/field.cc b/sql/field.cc
index ea752d33a20..18c38d59297 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -2322,7 +2322,7 @@ uint Field::fill_cache_field(CACHE_FIELD *copy)
bool Field::get_date(MYSQL_TIME *to, date_mode_t mode)
{
StringBuffer<40> tmp;
- Temporal::Warn_push warn(get_thd(), NULL, NullS, to, mode);
+ Temporal::Warn_push warn(get_thd(), nullptr, nullptr, nullptr, to, mode);
Temporal_hybrid *t= new(to) Temporal_hybrid(get_thd(), &warn,
val_str(&tmp), mode);
return !t->is_valid_temporal();
@@ -11190,14 +11190,16 @@ void Field::set_datetime_warning(Sql_condition::enum_warning_level level,
if (thd->really_abort_on_warning() && level >= Sql_condition::WARN_LEVEL_WARN)
{
/*
- field_str.name can be NULL when field is not in the select list:
+ field_name.str can be NULL when field is not in the select list:
SET SESSION SQL_MODE= 'STRICT_ALL_TABLES,NO_ZERO_DATE';
CREATE OR REPLACE TABLE t2 SELECT 1 AS f FROM t1 GROUP BY FROM_DAYS(d);
Can't call push_warning_truncated_value_for_field() directly here,
as it expect a non-NULL name.
*/
thd->push_warning_wrong_or_truncated_value(level, false, typestr,
- str->ptr(), table->s,
+ str->ptr(),
+ table->s->db.str,
+ table->s->table_name.str,
field_name.str);
}
else
diff --git a/sql/item.cc b/sql/item.cc
index 4b64d76905a..4c2c03cb3b2 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -1372,8 +1372,10 @@ bool Item::get_date_from_real(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate
bool Item::get_date_from_string(THD *thd, MYSQL_TIME *to, date_mode_t mode)
{
StringBuffer<40> tmp;
- Temporal::Warn_push warn(thd, field_table_or_null(), field_name_or_null(),
- to, mode);
+ const TABLE_SHARE *s = field_table_or_null();
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name_or_null(), to, mode);
Temporal_hybrid *t= new(to) Temporal_hybrid(thd, &warn, val_str(&tmp), mode);
return !t->is_valid_temporal();
}
@@ -2509,14 +2511,7 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
bool res= FALSE;
uint i;
- /*
- In case we're in statement prepare, create conversion item
- in its memory: it will be reused on each execute.
- */
- Query_arena backup;
- Query_arena *arena= thd->stmt_arena->is_stmt_prepare() ?
- thd->activate_stmt_arena_if_needed(&backup) :
- NULL;
+ DBUG_ASSERT(!thd->stmt_arena->is_stmt_prepare());
for (i= 0, arg= args; i < nargs; i++, arg+= item_sep)
{
@@ -2538,20 +2533,8 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
res= TRUE;
break; // we cannot return here, we need to restore "arena".
}
- /*
- If in statement prepare, then we create a converter for two
- constant items, do it once and then reuse it.
- If we're in execution of a prepared statement, arena is NULL,
- and the conv was created in runtime memory. This can be
- the case only if the argument is a parameter marker ('?'),
- because for all true constants the charset converter has already
- been created in prepare. In this case register the change for
- rollback.
- */
- if (thd->stmt_arena->is_stmt_prepare())
- *arg= conv;
- else
- thd->change_item_tree(arg, conv);
+
+ thd->change_item_tree(arg, conv);
if (conv->fix_fields_if_needed(thd, arg))
{
@@ -2559,8 +2542,6 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll,
break; // we cannot return here, we need to restore "arena".
}
}
- if (arena)
- thd->restore_active_arena(arena, &backup);
return res;
}
@@ -4079,7 +4060,7 @@ void Item_param::set_time(MYSQL_TIME *tm, timestamp_type time_type,
{
ErrConvTime str(&value.time);
make_truncated_value_warning(current_thd, Sql_condition::WARN_LEVEL_WARN,
- &str, time_type, 0, 0);
+ &str, time_type, NULL, NULL, NULL);
set_zero_time(&value.time, time_type);
}
maybe_null= 0;
diff --git a/sql/item_create.cc b/sql/item_create.cc
index 9b949835e27..5f6e7b29d5c 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
- Copyright (c) 2008-2011 Monty Program Ab
+ Copyright (c) 2008, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index d10c00aa325..c740d1e227f 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
- Copyright (c) 2009, 2016, MariaDB
+ Copyright (c) 2009, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -453,7 +453,8 @@ static bool extract_date_time(THD *thd, DATE_TIME_FORMAT *format,
{
ErrConvString err(val_begin, length, &my_charset_bin);
make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- &err, cached_timestamp_type, 0, NullS);
+ &err, cached_timestamp_type,
+ nullptr, nullptr, nullptr);
break;
}
} while (++val != val_end);
diff --git a/sql/item_windowfunc.cc b/sql/item_windowfunc.cc
index 1724174343f..5a114b7a193 100644
--- a/sql/item_windowfunc.cc
+++ b/sql/item_windowfunc.cc
@@ -562,12 +562,10 @@ void Item_window_func::print(String *str, enum_query_type query_type)
}
window_func()->print(str, query_type);
str->append(" over ");
-#ifndef DBUG_OFF
- if (!window_spec) // one can call dbug_print_item() anytime in gdb
+ if (!window_spec)
str->append(window_name);
else
-#endif
- window_spec->print(str, query_type);
+ window_spec->print(str, query_type);
}
void Item_window_func::print_for_percentile_functions(String *str, enum_query_type query_type)
{
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 846acd74b29..c038cb8d15f 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -646,7 +646,7 @@ class Item_sum_ntile : public Item_sum_int,
{
public:
Item_sum_ntile(THD* thd, Item* num_quantiles_expr) :
- Item_sum_int(thd, num_quantiles_expr)
+ Item_sum_int(thd, num_quantiles_expr), n_old_val_(0)
{ }
longlong val_int()
@@ -659,11 +659,13 @@ class Item_sum_ntile : public Item_sum_int,
longlong num_quantiles= get_num_quantiles();
- if (num_quantiles <= 0) {
+ if (num_quantiles <= 0 ||
+ (static_cast<ulonglong>(num_quantiles) != n_old_val_ && n_old_val_ > 0))
+ {
my_error(ER_INVALID_NTILE_ARGUMENT, MYF(0));
return true;
}
-
+ n_old_val_= static_cast<ulonglong>(num_quantiles);
null_value= false;
ulonglong quantile_size = get_row_count() / num_quantiles;
ulonglong extra_rows = get_row_count() - quantile_size * num_quantiles;
@@ -689,6 +691,7 @@ class Item_sum_ntile : public Item_sum_int,
{
current_row_count_= 0;
partition_row_count_= 0;
+ n_old_val_= 0;
}
const char*func_name() const
@@ -710,6 +713,7 @@ class Item_sum_ntile : public Item_sum_int,
private:
longlong get_num_quantiles() { return args[0]->val_int(); }
+ ulonglong n_old_val_;
};
class Item_sum_percentile_disc : public Item_sum_num,
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 3707f73a716..58f0d77e80b 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -5393,8 +5393,7 @@ bool Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
}
else if (strcmp("COMMIT", query) == 0)
{
- if (my_b_write(&cache, (uchar*) "BEGIN", 5) ||
- my_b_printf(&cache, "\n%s\n", print_event_info->delimiter))
+ if (my_b_printf(&cache, "START TRANSACTION\n%s\n", print_event_info->delimiter))
goto err;
}
}
@@ -8293,7 +8292,8 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info)
goto err;
}
if (!(flags2 & FL_STANDALONE))
- if (my_b_printf(&cache, is_flashback ? "COMMIT\n%s\n" : "BEGIN\n%s\n", print_event_info->delimiter))
+ if (my_b_printf(&cache, is_flashback ? "COMMIT\n%s\n" :
+ "START TRANSACTION\n%s\n", print_event_info->delimiter))
goto err;
return cache.flush_data();
@@ -8976,7 +8976,7 @@ bool Xid_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
my_b_printf(&cache, "\tXid = %s\n", buf))
goto err;
}
- if (my_b_printf(&cache, is_flashback ? "BEGIN%s\n" : "COMMIT%s\n",
+ if (my_b_printf(&cache, is_flashback ? "START TRANSACTION%s\n" : "COMMIT%s\n",
print_event_info->delimiter))
goto err;
@@ -14343,7 +14343,6 @@ end:
if (is_table_scan || is_index_scan)
issue_long_find_row_warning(get_general_type_code(), m_table->alias.c_ptr(),
is_index_scan, rgi);
- table->default_column_bitmaps();
DBUG_RETURN(error);
}
@@ -14674,7 +14673,13 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
#endif /* WSREP_PROC_INFO */
thd_proc_info(thd, message);
- int error= find_row(rgi);
+ // Temporary fix to find out why it fails [/Matz]
+ memcpy(m_table->read_set->bitmap, m_cols.bitmap, (m_table->read_set->n_bits + 7) / 8);
+ memcpy(m_table->write_set->bitmap, m_cols_ai.bitmap, (m_table->write_set->n_bits + 7) / 8);
+
+ m_table->mark_columns_per_binlog_row_image();
+
+ int error= find_row(rgi);
if (unlikely(error))
{
/*
@@ -14744,11 +14749,6 @@ Update_rows_log_event::do_exec_row(rpl_group_info *rgi)
goto err;
}
- // Temporary fix to find out why it fails [/Matz]
- memcpy(m_table->read_set->bitmap, m_cols.bitmap, (m_table->read_set->n_bits + 7) / 8);
- memcpy(m_table->write_set->bitmap, m_cols_ai.bitmap, (m_table->write_set->n_bits + 7) / 8);
-
- m_table->mark_columns_per_binlog_row_image();
if (m_vers_from_plain && m_table->versioned(VERS_TIMESTAMP))
m_table->vers_update_fields();
error= m_table->file->ha_update_row(m_table->record[1], m_table->record[0]);
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 4fecf8bffd0..5d2ad6d17a6 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
- Copyright (c) 2012, 2018, MariaDB Corporation.
+ Copyright (c) 2012, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -45,6 +45,7 @@
#include <violite.h>
#include <signal.h>
#include "probes_mysql.h"
+#include <debug_sync.h>
#include "proxy_protocol.h"
#ifdef EMBEDDED_LIBRARY
@@ -489,6 +490,17 @@ net_write_command(NET *net,uchar command,
DBUG_ENTER("net_write_command");
DBUG_PRINT("enter",("length: %lu", (ulong) len));
+ DBUG_EXECUTE_IF("simulate_error_on_packet_write",
+ {
+ if (command == COM_BINLOG_DUMP)
+ {
+ net->last_errno = ER_NET_ERROR_ON_WRITE;
+ DBUG_ASSERT(!debug_sync_set_action(
+ (THD *)net->thd,
+ STRING_WITH_LEN("now SIGNAL parked WAIT_FOR continue")));
+ DBUG_RETURN(true);
+ }
+ };);
MYSQL_NET_WRITE_START(length);
buff[4]=command; /* For first packet */
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 8989a918c0c..9f08964e62c 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -875,7 +875,6 @@ void partition_info::vers_set_hist_part(THD *thd)
if (next->range_value > thd->query_start())
return;
}
- goto warn;
}
return;
warn:
diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc
index c37cdb46fc9..91b529f72d5 100644
--- a/sql/session_tracker.cc
+++ b/sql/session_tracker.cc
@@ -189,7 +189,13 @@ bool sysvartrack_validate_value(THD *thd, const char *str, size_t len)
char *token, *lasts= NULL;
size_t rest= var_list.length;
- if (!var_list.str || var_list.length == 0 ||
+ if (!var_list.str)
+ {
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0),
+ "session_track_system_variables", "NULL");
+ return false;
+ }
+ if (var_list.length == 0 ||
!strcmp(var_list.str, "*"))
{
return false;
diff --git a/sql/slave.cc b/sql/slave.cc
index 1fa83bd6bfa..f2e38c02ab5 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -3684,7 +3684,8 @@ static int request_dump(THD *thd, MYSQL* mysql, Master_info* mi,
in the future, we should do a better error analysis, but for
now we just fill up the error log :-)
*/
- if (mysql_errno(mysql) == ER_NET_READ_INTERRUPTED)
+ if (mysql_errno(mysql) == ER_NET_READ_INTERRUPTED ||
+ mysql_errno(mysql) == ER_NET_ERROR_ON_WRITE)
*suppress_warnings= TRUE; // Suppress reconnect warning
else
sql_print_error("Error on COM_BINLOG_DUMP: %d %s, will retry in %d secs",
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 551e4286d8b..10bc6ccab6c 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -5430,6 +5430,24 @@ static void mark_real_tables_as_free_for_reuse(TABLE_LIST *table_list)
}
}
+int TABLE::fix_vcol_exprs(THD *thd)
+{
+ for (Field **vf= vfield; vf && *vf; vf++)
+ if (fix_session_vcol_expr(thd, (*vf)->vcol_info))
+ return 1;
+
+ for (Field **df= default_field; df && *df; df++)
+ if ((*df)->default_value &&
+ fix_session_vcol_expr(thd, (*df)->default_value))
+ return 1;
+
+ for (Virtual_column_info **cc= check_constraints; cc && *cc; cc++)
+ if (fix_session_vcol_expr(thd, (*cc)))
+ return 1;
+
+ return 0;
+}
+
static bool fix_all_session_vcol_exprs(THD *thd, TABLE_LIST *tables)
{
@@ -5437,36 +5455,27 @@ static bool fix_all_session_vcol_exprs(THD *thd, TABLE_LIST *tables)
TABLE_LIST *first_not_own= thd->lex->first_not_own_table();
DBUG_ENTER("fix_session_vcol_expr");
- for (TABLE_LIST *table= tables; table && table != first_not_own;
+ int error= 0;
+ for (TABLE_LIST *table= tables; table && table != first_not_own && !error;
table= table->next_global)
{
TABLE *t= table->table;
if (!table->placeholder() && t->s->vcols_need_refixing &&
table->lock_type >= TL_WRITE_ALLOW_WRITE)
{
+ Query_arena *stmt_backup= thd->stmt_arena;
+ if (thd->stmt_arena->is_conventional())
+ thd->stmt_arena= t->expr_arena;
if (table->security_ctx)
thd->security_ctx= table->security_ctx;
- for (Field **vf= t->vfield; vf && *vf; vf++)
- if (fix_session_vcol_expr(thd, (*vf)->vcol_info))
- goto err;
-
- for (Field **df= t->default_field; df && *df; df++)
- if ((*df)->default_value &&
- fix_session_vcol_expr(thd, (*df)->default_value))
- goto err;
-
- for (Virtual_column_info **cc= t->check_constraints; cc && *cc; cc++)
- if (fix_session_vcol_expr(thd, (*cc)))
- goto err;
+ error= t->fix_vcol_exprs(thd);
thd->security_ctx= save_security_ctx;
+ thd->stmt_arena= stmt_backup;
}
}
- DBUG_RETURN(0);
-err:
- thd->security_ctx= save_security_ctx;
- DBUG_RETURN(1);
+ DBUG_RETURN(error);
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 15088148e02..19180c85a2a 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3775,7 +3775,6 @@ void select_dumpvar::cleanup()
Query_arena::Type Query_arena::type() const
{
- DBUG_ASSERT(0); /* Should never be called */
return STATEMENT;
}
diff --git a/sql/sql_class.h b/sql/sql_class.h
index ad7631a66bb..22637872cfc 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1021,7 +1021,7 @@ public:
/* We build without RTTI, so dynamic_cast can't be used. */
enum Type
{
- STATEMENT, PREPARED_STATEMENT, STORED_PROCEDURE
+ STATEMENT, PREPARED_STATEMENT, STORED_PROCEDURE, TABLE_ARENA
};
Query_arena(MEM_ROOT *mem_root_arg, enum enum_state state_arg) :
@@ -3938,13 +3938,20 @@ public:
return 0;
}
+
+ bool is_item_tree_change_register_required()
+ {
+ return !stmt_arena->is_conventional()
+ || stmt_arena->type() == Query_arena::TABLE_ARENA;
+ }
+
void change_item_tree(Item **place, Item *new_value)
{
DBUG_ENTER("THD::change_item_tree");
DBUG_PRINT("enter", ("Register: %p (%p) <- %p",
*place, place, new_value));
/* TODO: check for OOM condition here */
- if (!stmt_arena->is_conventional())
+ if (is_item_tree_change_register_required())
nocheck_register_item_tree_change(place, *place, mem_root);
*place= new_value;
DBUG_VOID_RETURN;
@@ -4440,14 +4447,13 @@ public:
void push_warning_truncated_value_for_field(Sql_condition::enum_warning_level
level, const char *type_str,
const char *val,
- const TABLE_SHARE *s,
+ const char *db_name,
+ const char *table_name,
const char *name)
{
DBUG_ASSERT(name);
char buff[MYSQL_ERRMSG_SIZE];
CHARSET_INFO *cs= &my_charset_latin1;
- const char *db_name= s ? s->db.str : NULL;
- const char *table_name= s ? s->table_name.str : NULL;
if (!db_name)
db_name= "";
@@ -4464,12 +4470,13 @@ public:
bool totally_useless_value,
const char *type_str,
const char *val,
- const TABLE_SHARE *s,
+ const char *db_name,
+ const char *table_name,
const char *field_name)
{
if (field_name)
push_warning_truncated_value_for_field(level, type_str, val,
- s, field_name);
+ db_name, table_name, field_name);
else if (totally_useless_value)
push_warning_wrong_value(level, type_str, val);
else
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 9f7cf514ac3..fbfb0449989 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -7916,8 +7916,8 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
sp_cache_enforce_limit(thd->sp_package_spec_cache, stored_program_cache_size);
sp_cache_enforce_limit(thd->sp_package_body_cache, stored_program_cache_size);
thd->end_statement();
+ thd->Item_change_list::rollback_item_tree_changes();
thd->cleanup_after_query();
- DBUG_ASSERT(thd->Item_change_list::is_empty());
}
else
{
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index 2afd82b2b46..981420f03ae 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2005, 2018, Oracle and/or its affiliates.
- Copyright (c) 2010, 2018, MariaDB Corporation
+ Copyright (c) 2010, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -2276,27 +2276,30 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_CSTRING *name)
if (!(plugin= plugin_find_internal(name, MYSQL_ANY_PLUGIN)) ||
plugin->state & (PLUGIN_IS_UNINITIALIZED | PLUGIN_IS_DYING))
{
- myf MyFlags= thd->lex->if_exists() ? ME_NOTE : 0;
- my_error(ER_SP_DOES_NOT_EXIST, MyFlags, "PLUGIN", name->str);
- return !MyFlags;
- }
- if (!plugin->plugin_dl)
- {
- my_error(ER_PLUGIN_DELETE_BUILTIN, MYF(0));
- return 1;
+ // maybe plugin is present in mysql.plugin; postpone the error
+ plugin= nullptr;
}
- if (plugin->load_option == PLUGIN_FORCE_PLUS_PERMANENT)
+
+ if (plugin)
{
- my_error(ER_PLUGIN_IS_PERMANENT, MYF(0), name->str);
- return 1;
- }
+ if (!plugin->plugin_dl)
+ {
+ my_error(ER_PLUGIN_DELETE_BUILTIN, MYF(0));
+ return 1;
+ }
+ if (plugin->load_option == PLUGIN_FORCE_PLUS_PERMANENT)
+ {
+ my_error(ER_PLUGIN_IS_PERMANENT, MYF(0), name->str);
+ return 1;
+ }
- plugin->state= PLUGIN_IS_DELETED;
- if (plugin->ref_count)
- push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- WARN_PLUGIN_BUSY, ER_THD(thd, WARN_PLUGIN_BUSY));
- else
- reap_needed= true;
+ plugin->state= PLUGIN_IS_DELETED;
+ if (plugin->ref_count)
+ push_warning(thd, Sql_condition::WARN_LEVEL_WARN,
+ WARN_PLUGIN_BUSY, ER_THD(thd, WARN_PLUGIN_BUSY));
+ else
+ reap_needed= true;
+ }
uchar user_key[MAX_KEY_LENGTH];
table->use_all_columns();
@@ -2321,6 +2324,12 @@ static bool do_uninstall(THD *thd, TABLE *table, const LEX_CSTRING *name)
return 1;
}
}
+ else if (!plugin)
+ {
+ const myf MyFlags= thd->lex->if_exists() ? ME_NOTE : 0;
+ my_error(ER_SP_DOES_NOT_EXIST, MyFlags, "PLUGIN", name->str);
+ return !MyFlags;
+ }
return 0;
}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 2a3cdedd717..3831bd03802 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -10495,8 +10495,9 @@ err_new_table_cleanup:
bool save_abort_on_warning= thd->abort_on_warning;
thd->abort_on_warning= true;
thd->push_warning_truncated_value_for_field(Sql_condition::WARN_LEVEL_WARN,
- f_type, f_val, new_table
- ? new_table->s : table->s,
+ f_type, f_val,
+ alter_ctx.new_db.str,
+ alter_ctx.new_name.str,
alter_ctx.datetime_field->
field_name.str);
thd->abort_on_warning= save_abort_on_warning;
diff --git a/sql/sql_time.cc b/sql/sql_time.cc
index 9584dfd5f63..abc91907a55 100644
--- a/sql/sql_time.cc
+++ b/sql/sql_time.cc
@@ -18,7 +18,6 @@
/* Functions to handle date and time */
#include "mariadb.h"
-#include "sql_priv.h"
#include "sql_time.h"
#include "tztime.h" // struct Time_zone
#include "sql_class.h" // THD
@@ -297,7 +296,7 @@ check_date_with_warn(THD *thd, const MYSQL_TIME *ltime,
{
ErrConvTime str(ltime);
make_truncated_value_warning(thd, Sql_condition::WARN_LEVEL_WARN,
- &str, ts_type, 0, 0);
+ &str, ts_type, nullptr, nullptr, nullptr);
return true;
}
return false;
@@ -431,7 +430,7 @@ str_to_datetime_with_warn(THD *thd, CHARSET_INFO *cs,
const char *str, size_t length, MYSQL_TIME *to,
date_mode_t mode)
{
- Temporal::Warn_push warn(thd, NULL, NullS, to, mode);
+ Temporal::Warn_push warn(thd, nullptr, nullptr, nullptr, to, mode);
Temporal_hybrid *t= new(to) Temporal_hybrid(thd, &warn, str, length, cs, mode);
return !t->is_valid_temporal();
}
@@ -441,7 +440,9 @@ bool double_to_datetime_with_warn(THD *thd, double value, MYSQL_TIME *ltime,
date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *field_name)
{
- Temporal::Warn_push warn(thd, s, field_name, ltime, fuzzydate);
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name, ltime, fuzzydate);
Temporal_hybrid *t= new (ltime) Temporal_hybrid(thd, &warn, value, fuzzydate);
return !t->is_valid_temporal();
}
@@ -452,7 +453,9 @@ bool decimal_to_datetime_with_warn(THD *thd, const my_decimal *value,
date_mode_t fuzzydate,
const TABLE_SHARE *s, const char *field_name)
{
- Temporal::Warn_push warn(thd, s, field_name, ltime, fuzzydate);
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name, ltime, fuzzydate);
Temporal_hybrid *t= new (ltime) Temporal_hybrid(thd, &warn, value, fuzzydate);
return !t->is_valid_temporal();
}
@@ -467,7 +470,9 @@ bool int_to_datetime_with_warn(THD *thd, const Longlong_hybrid &nr,
Note: conversion from an integer to TIME can overflow to '838:59:59.999999',
so the conversion result can have fractional digits.
*/
- Temporal::Warn_push warn(thd, s, field_name, ltime, fuzzydate);
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
+ field_name, ltime, fuzzydate);
Temporal_hybrid *t= new (ltime) Temporal_hybrid(thd, &warn, nr, fuzzydate);
return !t->is_valid_temporal();
}
@@ -897,12 +902,13 @@ void make_truncated_value_warning(THD *thd,
Sql_condition::enum_warning_level level,
const ErrConv *sval,
timestamp_type time_type,
- const TABLE_SHARE *s, const char *field_name)
+ const char *db_name, const char *table_name,
+ const char *field_name)
{
const char *type_str= Temporal::type_name_by_timestamp_type(time_type);
return thd->push_warning_wrong_or_truncated_value
(level, time_type <= MYSQL_TIMESTAMP_ERROR, type_str, sval->ptr(),
- s, field_name);
+ db_name, table_name, field_name);
}
diff --git a/sql/sql_time.h b/sql/sql_time.h
index fe9697adf67..c918eb6d807 100644
--- a/sql/sql_time.h
+++ b/sql/sql_time.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2006, 2010, Oracle and/or its affiliates.
- Copyright (c) 2011, 2016, MariaDB
+ Copyright (c) 2011, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -78,7 +78,7 @@ void make_truncated_value_warning(THD *thd,
Sql_condition::enum_warning_level level,
const ErrConv *str_val,
timestamp_type time_type,
- const TABLE_SHARE *s,
+ const char *db_name, const char *table_name,
const char *field_name);
extern DATE_TIME_FORMAT *date_time_format_make(timestamp_type format_type,
diff --git a/sql/sql_type.cc b/sql/sql_type.cc
index 8757d2fef59..3e762affe2f 100644
--- a/sql/sql_type.cc
+++ b/sql/sql_type.cc
@@ -401,17 +401,21 @@ bool Sec6::convert_to_mysql_time(THD *thd, int *warn, MYSQL_TIME *ltime,
void Temporal::push_conversion_warnings(THD *thd, bool totally_useless_value,
int warn,
const char *typestr,
- const TABLE_SHARE *s,
+ const char *db_name,
+ const char *table_name,
const char *field_name,
const char *value)
{
if (MYSQL_TIME_WARN_HAVE_WARNINGS(warn))
thd->push_warning_wrong_or_truncated_value(Sql_condition::WARN_LEVEL_WARN,
totally_useless_value,
- typestr, value, s, field_name);
+ typestr, value,
+ db_name, table_name,
+ field_name);
else if (MYSQL_TIME_WARN_HAVE_NOTES(warn))
thd->push_warning_wrong_or_truncated_value(Sql_condition::WARN_LEVEL_NOTE,
- false, typestr, value, s,
+ false, typestr, value,
+ db_name, table_name,
field_name);
}
@@ -4454,7 +4458,9 @@ bool Type_handler::Item_get_date_with_warn(THD *thd, Item *item,
MYSQL_TIME *ltime,
date_mode_t fuzzydate) const
{
- Temporal::Warn_push warn(thd, item->field_table_or_null(),
+ const TABLE_SHARE *s= item->field_table_or_null();
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
item->field_name_or_null(), ltime, fuzzydate);
Item_get_date(thd, item, &warn, ltime, fuzzydate);
return ltime->time_type < 0;
@@ -4466,7 +4472,9 @@ bool Type_handler::Item_func_hybrid_field_type_get_date_with_warn(THD *thd,
MYSQL_TIME *ltime,
date_mode_t mode) const
{
- Temporal::Warn_push warn(thd, item->field_table_or_null(),
+ const TABLE_SHARE *s= item->field_table_or_null();
+ Temporal::Warn_push warn(thd, s ? s->db.str : nullptr,
+ s ? s->table_name.str : nullptr,
item->field_name_or_null(), ltime, mode);
Item_func_hybrid_field_type_get_date(thd, item, &warn, ltime, mode);
return ltime->time_type < 0;
@@ -8284,7 +8292,8 @@ static void literal_warn(THD *thd, const Item *item,
ErrConvString err(str, length, cs);
thd->push_warning_wrong_or_truncated_value(
Sql_condition::time_warn_level(st->warnings),
- false, typestr, err.ptr(), NULL, NullS);
+ false, typestr, err.ptr(),
+ nullptr, nullptr, nullptr);
}
}
else if (send_error)
diff --git a/sql/sql_type.h b/sql/sql_type.h
index 65935c1bd66..badd8d2f7f5 100644
--- a/sql/sql_type.h
+++ b/sql/sql_type.h
@@ -1,7 +1,7 @@
#ifndef SQL_TYPE_H_INCLUDED
#define SQL_TYPE_H_INCLUDED
/*
- Copyright (c) 2015 MariaDB Foundation.
+ Copyright (c) 2015, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -663,34 +663,39 @@ public:
public:
void push_conversion_warnings(THD *thd, bool totally_useless_value,
date_mode_t mode, timestamp_type tstype,
- const TABLE_SHARE* s, const char *name)
+ const char *db_name, const char *table_name,
+ const char *name)
{
const char *typestr= tstype >= 0 ? type_name_by_timestamp_type(tstype) :
mode & (TIME_INTERVAL_hhmmssff | TIME_INTERVAL_DAY) ?
"interval" :
mode & TIME_TIME_ONLY ? "time" : "datetime";
Temporal::push_conversion_warnings(thd, totally_useless_value, warnings,
- typestr, s, name, ptr());
+ typestr, db_name, table_name, name,
+ ptr());
}
};
class Warn_push: public Warn
{
- THD *m_thd;
- const TABLE_SHARE *m_s;
- const char *m_name;
- const MYSQL_TIME *m_ltime;
- date_mode_t m_mode;
+ THD * const m_thd;
+ const char * const m_db_name;
+ const char * const m_table_name;
+ const char * const m_name;
+ const MYSQL_TIME * const m_ltime;
+ const date_mode_t m_mode;
public:
- Warn_push(THD *thd, const TABLE_SHARE *s, const char *name,
- const MYSQL_TIME *ltime, date_mode_t mode)
- :m_thd(thd), m_s(s), m_name(name), m_ltime(ltime), m_mode(mode)
+ Warn_push(THD *thd, const char *db_name, const char *table_name,
+ const char *name, const MYSQL_TIME *ltime, date_mode_t mode)
+ : m_thd(thd), m_db_name(db_name), m_table_name(table_name), m_name(name),
+ m_ltime(ltime), m_mode(mode)
{ }
~Warn_push()
{
if (warnings)
push_conversion_warnings(m_thd, m_ltime->time_type < 0,
- m_mode, m_ltime->time_type, m_s, m_name);
+ m_mode, m_ltime->time_type,
+ m_db_name, m_table_name, m_name);
}
};
@@ -731,7 +736,8 @@ public:
}
static void push_conversion_warnings(THD *thd, bool totally_useless_value, int warn,
const char *type_name,
- const TABLE_SHARE *s,
+ const char *db_name,
+ const char *table_name,
const char *field_name,
const char *value);
/*
diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc
index e46925f5ee0..1c84f308a81 100644
--- a/sql/sys_vars.cc
+++ b/sql/sys_vars.cc
@@ -3695,6 +3695,12 @@ static bool fix_tp_min_threads(sys_var *, THD *, enum_var_type)
static bool check_threadpool_size(sys_var *self, THD *thd, set_var *var)
{
+
+#ifdef _WIN32
+ if (threadpool_mode != TP_MODE_GENERIC)
+ return false;
+#endif
+
ulonglong v= var->save_result.ulonglong_value;
if (v > threadpool_max_size)
{
diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic
index f33f469b160..8e8ec4f00bc 100644
--- a/sql/sys_vars.ic
+++ b/sql/sys_vars.ic
@@ -501,7 +501,10 @@ public:
String str2(buff2, sizeof(buff2), charset), *res;
if (!(res=var->value->val_str(&str)))
+ {
var->save_result.string_value.str= 0;
+ var->save_result.string_value.length= 0; // safety
+ }
else
{
uint32 unused;
@@ -895,9 +898,16 @@ public:
String str(buff, sizeof(buff), system_charset_info), *res;
if (!(res=var->value->val_str(&str)))
+ {
var->save_result.string_value.str= const_cast<char*>("");
+ var->save_result.string_value.length= 0;
+ }
else
- var->save_result.string_value.str= thd->strmake(res->ptr(), res->length());
+ {
+ size_t len= res->length();
+ var->save_result.string_value.str= thd->strmake(res->ptr(), len);
+ var->save_result.string_value.length= len;
+ }
return false;
}
bool session_update(THD *thd, set_var *var)
@@ -921,6 +931,7 @@ public:
{
char *ptr= (char*)(intptr)option.def_value;
var->save_result.string_value.str= ptr;
+ var->save_result.string_value.length= safe_strlen(ptr);
}
uchar *session_value_ptr(THD *thd, const LEX_CSTRING *base)
{
diff --git a/sql/table.cc b/sql/table.cc
index c8594d25851..ca0af28a79d 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -50,6 +50,17 @@
#define MYSQL57_GENERATED_FIELD 128
#define MYSQL57_GCOL_HEADER_SIZE 4
+class Table_arena: public Query_arena
+{
+public:
+ Table_arena(MEM_ROOT *mem_root, enum enum_state state_arg) :
+ Query_arena(mem_root, state_arg){}
+ virtual Type type() const
+ {
+ return TABLE_ARENA;
+ }
+};
+
struct extra2_fields
{
LEX_CUSTRING version;
@@ -1106,8 +1117,9 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
We need to use CONVENTIONAL_EXECUTION here to ensure that
any new items created by fix_fields() are not reverted.
*/
- table->expr_arena= new (alloc_root(mem_root, sizeof(Query_arena)))
- Query_arena(mem_root, Query_arena::STMT_CONVENTIONAL_EXECUTION);
+ table->expr_arena= new (alloc_root(mem_root, sizeof(Table_arena)))
+ Table_arena(mem_root,
+ Query_arena::STMT_CONVENTIONAL_EXECUTION);
if (!table->expr_arena)
DBUG_RETURN(1);
diff --git a/sql/table.h b/sql/table.h
index ea9f87b65ed..8db9fd735fb 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -1637,6 +1637,7 @@ public:
TABLE *tmp_table,
TMP_TABLE_PARAM *tmp_table_param,
bool with_cleanup);
+ int fix_vcol_exprs(THD *thd);
Field *find_field_by_name(LEX_CSTRING *str) const;
bool export_structure(THD *thd, class Row_definition_list *defs);
bool is_splittable() { return spl_opt_info != NULL; }
diff --git a/sql/threadpool.h b/sql/threadpool.h
index 9145098be3f..817681e174f 100644
--- a/sql/threadpool.h
+++ b/sql/threadpool.h
@@ -78,6 +78,7 @@ enum TP_STATE
{
TP_STATE_IDLE,
TP_STATE_RUNNING,
+ TP_STATE_PENDING
};
/*
diff --git a/sql/threadpool_common.cc b/sql/threadpool_common.cc
index 3a0c7a8514c..00c28be6f9b 100644
--- a/sql/threadpool_common.cc
+++ b/sql/threadpool_common.cc
@@ -475,11 +475,25 @@ void tp_timeout_handler(TP_connection *c)
{
if (c->state != TP_STATE_IDLE)
return;
- THD *thd=c->thd;
+ THD *thd= c->thd;
mysql_mutex_lock(&thd->LOCK_thd_kill);
- thd->set_killed_no_mutex(KILL_WAIT_TIMEOUT);
- c->priority= TP_PRIORITY_HIGH;
- post_kill_notification(thd);
+ Vio *vio= thd->net.vio;
+ if (vio && (vio_pending(vio) > 0 || vio->has_data(vio)) &&
+ c->state == TP_STATE_IDLE)
+ {
+ /*
+ There is some data on that connection, i.e
+ i.e there was no inactivity timeout.
+ Don't kill.
+ */
+ c->state= TP_STATE_PENDING;
+ }
+ else if (c->state == TP_STATE_IDLE)
+ {
+ thd->set_killed_no_mutex(KILL_WAIT_TIMEOUT);
+ c->priority= TP_PRIORITY_HIGH;
+ post_kill_notification(thd);
+ }
mysql_mutex_unlock(&thd->LOCK_thd_kill);
}
diff --git a/sql/threadpool_generic.cc b/sql/threadpool_generic.cc
index f128661ec60..6d6b22d5900 100644
--- a/sql/threadpool_generic.cc
+++ b/sql/threadpool_generic.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2012 Monty Program Ab
+/* Copyright (C) 2012, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -583,11 +583,21 @@ static my_bool timeout_check(THD *thd, pool_timer_t *timer)
DBUG_ENTER("timeout_check");
if (thd->net.reading_or_writing == 1)
{
- /*
- Check if connection does not have scheduler data. This happens for example
- if THD belongs to a different scheduler, that is listening to extra_port.
- */
- if (auto connection= (TP_connection_generic *) thd->event_scheduler.data)
+ TP_connection_generic *connection= (TP_connection_generic *)thd->event_scheduler.data;
+ if (!connection || connection->state != TP_STATE_IDLE)
+ {
+ /*
+ Connection does not have scheduler data. This happens for example
+ if THD belongs to a different scheduler, that is listening to extra_port.
+ */
+ DBUG_RETURN(0);
+ }
+
+ if(connection->abs_wait_timeout < timer->current_microtime)
+ {
+ tp_timeout_handler(connection);
+ }
+ else
{
if (connection->abs_wait_timeout < timer->current_microtime)
tp_timeout_handler(connection);
diff --git a/storage/innobase/btr/btr0btr.cc b/storage/innobase/btr/btr0btr.cc
index a8e319dd321..7ff0820dd13 100644
--- a/storage/innobase/btr/btr0btr.cc
+++ b/storage/innobase/btr/btr0btr.cc
@@ -5164,11 +5164,14 @@ loop:
mtr_release_block_at_savepoint(
&mtr, savepoint, right_block);
- btr_block_get(
- page_id_t(index->table->space_id,
- parent_right_page_no),
- zip_size,
- RW_SX_LATCH, index, &mtr);
+ if (parent_right_page_no != FIL_NULL) {
+ btr_block_get(
+ page_id_t(index->table
+ ->space_id,
+ parent_right_page_no),
+ zip_size,
+ RW_SX_LATCH, index, &mtr);
+ }
right_block = btr_block_get(
page_id_t(index->table->space_id,
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc
index 8c657bc341b..5696d184386 100644
--- a/storage/innobase/btr/btr0cur.cc
+++ b/storage/innobase/btr/btr0cur.cc
@@ -775,6 +775,7 @@ btr_cur_optimistic_latch_leaves(
{
ulint mode;
ulint left_page_no;
+ ulint curr_page_no;
switch (*latch_mode) {
case BTR_SEARCH_LEAF:
@@ -801,16 +802,32 @@ btr_cur_optimistic_latch_leaves(
goto unpin_failed;
}
+
+ curr_page_no = block->page.id.page_no();
left_page_no = btr_page_get_prev(
buf_block_get_frame(block));
rw_lock_s_unlock(&block->lock);
if (left_page_no != FIL_NULL) {
- cursor->left_block = btr_block_get(
+ dberr_t err = DB_SUCCESS;
+ cursor->left_block = buf_page_get_gen(
page_id_t(cursor->index->table->space_id,
left_page_no),
cursor->index->table->space->zip_size(),
- mode, cursor->index, mtr);
+ mode, nullptr, BUF_GET_POSSIBLY_FREED,
+ __FILE__, __LINE__, mtr, &err);
+
+ if (err == DB_DECRYPTION_FAILED) {
+ cursor->index->table->file_unreadable = true;
+ }
+
+ if (btr_page_get_next(cursor->left_block->frame)
+ != curr_page_no) {
+ /* release the left block */
+ btr_leaf_page_release(
+ cursor->left_block, mode, mtr);
+ goto unpin_failed;
+ }
} else {
cursor->left_block = NULL;
}
diff --git a/storage/innobase/btr/btr0sea.cc b/storage/innobase/btr/btr0sea.cc
index c92659e9d71..31937f7b0fb 100644
--- a/storage/innobase/btr/btr0sea.cc
+++ b/storage/innobase/btr/btr0sea.cc
@@ -1142,26 +1142,6 @@ retry:
ut_ad(block->page.id.space() == index->table->space_id);
ut_a(index_id == index->id);
ut_ad(!dict_index_is_ibuf(index));
-#ifdef UNIV_DEBUG
- switch (dict_index_get_online_status(index)) {
- case ONLINE_INDEX_CREATION:
- /* The index is being created (bulk loaded). */
- case ONLINE_INDEX_COMPLETE:
- /* The index has been published. */
- case ONLINE_INDEX_ABORTED:
- /* Either the index creation was aborted due to an
- error observed by InnoDB (in which case there should
- not be any adaptive hash index entries), or it was
- completed and then flagged aborted in
- rollback_inplace_alter_table(). */
- break;
- case ONLINE_INDEX_ABORTED_DROPPED:
- /* The index should have been dropped from the tablespace
- already, and the adaptive hash index entries should have
- been dropped as well. */
- ut_error;
- }
-#endif /* UNIV_DEBUG */
n_fields = block->curr_n_fields;
n_bytes = block->curr_n_bytes;
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index e4b1953e1e3..905c04fa811 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -5609,15 +5609,30 @@ buf_page_create(
&& !buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
ut_d(block->page.file_page_was_freed = FALSE);
+#ifdef BTR_CUR_HASH_ADAPT
+ bool drop_hash_entry =
+ (block->page.state == BUF_BLOCK_FILE_PAGE
+ && block->index);
+
+ if (drop_hash_entry) {
+ mutex_enter(&block->mutex);
+ buf_page_set_sticky(&block->page);
+ mutex_exit(&block->mutex);
+ }
+#endif
/* Page can be found in buf_pool */
buf_pool_mutex_exit(buf_pool);
rw_lock_x_unlock(hash_lock);
buf_block_free(free_block);
#ifdef BTR_CUR_HASH_ADAPT
- if (block->page.state == BUF_BLOCK_FILE_PAGE
- && UNIV_LIKELY_NULL(block->index)) {
+ if (drop_hash_entry) {
btr_search_drop_page_hash_index(block);
+ buf_pool_mutex_enter(buf_pool);
+ mutex_enter(&block->mutex);
+ buf_page_unset_sticky(&block->page);
+ mutex_exit(&block->mutex);
+ buf_pool_mutex_exit(buf_pool);
}
#endif /* BTR_CUR_HASH_ADAPT */
diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc
index 45c9b661d6f..9b49b9570e2 100644
--- a/storage/innobase/buf/buf0flu.cc
+++ b/storage/innobase/buf/buf0flu.cc
@@ -3079,7 +3079,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(void*)
/* The page_cleaner skips sleep if the server is
idle and there are no pending IOs in the buffer pool
and there is work to do. */
- if (srv_check_activity(last_activity)
+ if (srv_check_activity(&last_activity)
|| buf_get_n_pending_read_ios()
|| n_flushed == 0) {
@@ -3171,7 +3171,7 @@ DECLARE_THREAD(buf_flush_page_cleaner_coordinator)(void*)
n_flushed = n_flushed_lru + n_flushed_list;
- } else if (srv_check_activity(last_activity)) {
+ } else if (srv_check_activity(&last_activity)) {
ulint n_to_flush;
lsn_t lsn_limit = 0;
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 3bf701b556a..38eeacf0f6e 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -5307,6 +5307,7 @@ dict_set_corrupted_index_cache_only(
is corrupted */
if (dict_index_is_clust(index)) {
index->table->corrupted = TRUE;
+ index->table->file_unreadable = true;
}
index->type |= DICT_CORRUPT;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index bda81bc6ac6..67df52db9fc 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -431,14 +431,6 @@ TYPELIB innodb_flush_method_typelib = {
NULL
};
-/* The following counter is used to convey information to InnoDB
-about server activity: in case of normal DML ops it is not
-sensible to call srv_active_wake_master_thread after each
-operation, we only do it every INNOBASE_WAKE_INTERVAL'th step. */
-
-#define INNOBASE_WAKE_INTERVAL 32
-static ulong innobase_active_counter = 0;
-
/** Allowed values of innodb_change_buffering */
static const char* innodb_change_buffering_names[] = {
"none", /* IBUF_USE_NONE */
@@ -1838,23 +1830,6 @@ static int innobase_wsrep_set_checkpoint(handlerton* hton, const XID* xid);
static int innobase_wsrep_get_checkpoint(handlerton* hton, XID* xid);
#endif /* WITH_WSREP */
/********************************************************************//**
-Increments innobase_active_counter and every INNOBASE_WAKE_INTERVALth
-time calls srv_active_wake_master_thread. This function should be used
-when a single database operation may introduce a small need for
-server utility activity, like checkpointing. */
-inline
-void
-innobase_active_small(void)
-/*=======================*/
-{
- innobase_active_counter++;
-
- if ((innobase_active_counter % INNOBASE_WAKE_INTERVAL) == 0) {
- srv_active_wake_master_thread();
- }
-}
-
-/********************************************************************//**
Converts an InnoDB error code to a MySQL error code and also tells to MySQL
about a possible transaction rollback inside InnoDB caused by a lock wait
timeout or a deadlock.
@@ -6487,11 +6462,6 @@ ha_innobase::close()
MONITOR_INC(MONITOR_TABLE_CLOSE);
- /* Tell InnoDB server that there might be work for
- utility threads: */
-
- srv_active_wake_master_thread();
-
DBUG_RETURN(0);
}
@@ -8189,8 +8159,6 @@ report_error:
}
func_exit:
- innobase_active_small();
-
DBUG_RETURN(error_result);
}
@@ -8870,11 +8838,6 @@ func_exit:
error, m_prebuilt->table->flags, m_user_thd);
}
- /* Tell InnoDB server that there might be work for
- utility threads: */
-
- innobase_active_small();
-
#ifdef WITH_WSREP
if (error == DB_SUCCESS && trx->is_wsrep()
&& wsrep_thd_is_local(m_user_thd)
@@ -8936,11 +8899,6 @@ ha_innobase::delete_row(
innobase_srv_conc_exit_innodb(m_prebuilt);
- /* Tell the InnoDB server that there might be work for
- utility threads: */
-
- innobase_active_small();
-
#ifdef WITH_WSREP
if (error == DB_SUCCESS && trx->is_wsrep()
&& wsrep_thd_is_local(m_user_thd)
@@ -12756,7 +12714,6 @@ create_table_info_t::create_table_update_dict()
if (m_flags2 & DICT_TF2_FTS) {
if (!innobase_fts_load_stopword(innobase_table, NULL, m_thd)) {
dict_table_close(innobase_table, FALSE, FALSE);
- srv_active_wake_master_thread();
trx_free(m_trx);
DBUG_RETURN(-1);
}
@@ -12906,11 +12863,6 @@ ha_innobase::create(
error = info.create_table_update_dict();
- /* Tell the InnoDB server that there might be work for
- utility threads: */
-
- srv_active_wake_master_thread();
-
DBUG_RETURN(error);
}
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 840d8c2d062..3f63cc82f89 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -11236,11 +11236,6 @@ foreign_fail:
log_append_on_checkpoint(NULL);
- /* Tell the InnoDB server that there might be work for
- utility threads: */
-
- srv_active_wake_master_thread();
-
if (fail) {
for (inplace_alter_handler_ctx** pctx = ctx_array;
*pctx; pctx++) {
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index 23c25f76362..a3fc72c1d7e 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -887,8 +887,11 @@ rec_get_nth_cfield(
ulint n,
ulint* len)
{
- ut_ad(rec_offs_validate(rec, index, offsets));
-
+ /* Because this function may be invoked by innobase_rec_to_mysql()
+ for reporting a duplicate key during ALTER TABLE or
+ CREATE UNIQUE INDEX, and in that case the rec omit the fixed-size
+ header of 5 or 6 bytes, the check
+ rec_offs_validate(rec, index, offsets) must be avoided here. */
if (!rec_offs_nth_default(offsets, n)) {
return rec_get_nth_field(rec, offsets, n, len);
}
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index e1d37613dc9..961d6aa1073 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -784,19 +784,6 @@ srv_reset_io_thread_op_info();
/** Wake up the purge threads if there is work to do. */
void
srv_wake_purge_thread_if_not_active();
-/** Wake up the InnoDB master thread if it was suspended (not sleeping). */
-void
-srv_active_wake_master_thread_low();
-
-#define srv_active_wake_master_thread() \
- do { \
- if (!srv_read_only_mode) { \
- srv_active_wake_master_thread_low(); \
- } \
- } while (0)
-/** Wake up the master thread if it is suspended or being suspended. */
-void
-srv_wake_master_thread();
/******************************************************************//**
Outputs to a file the output of the InnoDB Monitor.
@@ -825,13 +812,13 @@ reading this value as it is only used in heuristics.
ulint
srv_get_activity_count(void);
/*========================*/
-/*******************************************************************//**
-Check if there has been any activity.
+
+/** Check if there has been any activity.
+@param[in,out] activity_count recent activity count to be returned
+if there is a change
@return FALSE if no change in activity counter. */
-ibool
-srv_check_activity(
-/*===============*/
- ulint old_activity_count); /*!< old activity count */
+bool srv_check_activity(ulint *activity_count);
+
/******************************************************************//**
Increment the server activity counter. */
void
diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc
index 54ee05fba26..8e0fe582c84 100644
--- a/storage/innobase/log/log0log.cc
+++ b/storage/innobase/log/log0log.cc
@@ -1714,6 +1714,9 @@ wait_suspend_loop:
"Waiting for page cleaner");
ib::info() << "Waiting for page_cleaner to "
"finish flushing of buffer pool";
+ /* This is a workaround to avoid the InnoDB hang
+ when OS datetime changed backwards */
+ os_event_set(buf_flush_event);
count = 0;
}
}
diff --git a/storage/innobase/log/log0recv.cc b/storage/innobase/log/log0recv.cc
index 705e39c40dd..42b194b3d3f 100644
--- a/storage/innobase/log/log0recv.cc
+++ b/storage/innobase/log/log0recv.cc
@@ -2793,8 +2793,9 @@ loop:
if (lsn == checkpoint_lsn) {
if (recv_sys.mlog_checkpoint_lsn) {
- ut_ad(recv_sys.mlog_checkpoint_lsn
- <= recv_sys.recovered_lsn);
+ /* There can be multiple
+ MLOG_CHECKPOINT lsn for the
+ same checkpoint. */
break;
}
recv_sys.mlog_checkpoint_lsn
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index ca4b64c94b7..9a70f749041 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -2225,8 +2225,14 @@ row_ins_duplicate_online(
return(DB_SUCCESS);
}
- if (fields == n_uniq + 2) {
- /* rec is an exact match of entry. */
+ ulint trx_id_len;
+
+ if (fields == n_uniq + 2
+ && memcmp(rec_get_nth_field(rec, offsets, n_uniq, &trx_id_len),
+ reset_trx_id, DATA_TRX_ID_LEN + DATA_ROLL_PTR_LEN)) {
+ ut_ad(trx_id_len == DATA_TRX_ID_LEN);
+ /* rec is an exact match of entry, and DB_TRX_ID belongs
+ to a transaction that started after our ALTER TABLE. */
return(DB_SUCCESS_LOCKED_REC);
}
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index e80e7889d19..ac5986243d6 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -3811,7 +3811,7 @@ funct_exit_all_freed:
trx->op_info = "";
- srv_wake_master_thread();
+ srv_inc_activity_count();
DBUG_RETURN(err);
}
diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc
index 4bbe0c8d717..6f070f7c7d8 100644
--- a/storage/innobase/row/row0vers.cc
+++ b/storage/innobase/row/row0vers.cc
@@ -93,7 +93,7 @@ row_vers_impl_x_locked_low(
trx_id_t trx_id;
rec_t* prev_version = NULL;
rec_offs clust_offsets_[REC_OFFS_NORMAL_SIZE];
- rec_offs* clust_offsets = clust_offsets_;
+ rec_offs* clust_offsets;
mem_heap_t* heap;
dtuple_t* ientry = NULL;
mem_heap_t* v_heap = NULL;
@@ -115,7 +115,7 @@ row_vers_impl_x_locked_low(
heap = mem_heap_create(1024);
- clust_offsets = rec_get_offsets(clust_rec, clust_index, clust_offsets,
+ clust_offsets = rec_get_offsets(clust_rec, clust_index, clust_offsets_,
true, ULINT_UNDEFINED, &heap);
trx_id = row_get_rec_trx_id(clust_rec, clust_index, clust_offsets);
@@ -204,7 +204,7 @@ row_vers_impl_x_locked_low(
ut_ad(committed || prev_version
|| !rec_get_deleted_flag(version, comp));
- /* Free version. */
+ /* Free version and clust_offsets. */
mem_heap_free(old_heap);
if (committed) {
@@ -239,7 +239,7 @@ not_locked:
}
clust_offsets = rec_get_offsets(
- prev_version, clust_index, clust_offsets, true,
+ prev_version, clust_index, clust_offsets_, true,
ULINT_UNDEFINED, &heap);
vers_del = rec_get_deleted_flag(prev_version, comp);
diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc
index ab47157ee9b..0bd52cb486d 100644
--- a/storage/innobase/srv/srv0srv.cc
+++ b/storage/innobase/srv/srv0srv.cc
@@ -1910,33 +1910,6 @@ srv_get_active_thread_type(void)
return(ret);
}
-/** Wake up the InnoDB master thread if it was suspended (not sleeping). */
-void
-srv_active_wake_master_thread_low()
-{
- ut_ad(!srv_read_only_mode);
- ut_ad(!mutex_own(&srv_sys.mutex));
-
- srv_inc_activity_count();
-
- if (srv_sys.n_threads_active[SRV_MASTER] == 0) {
- srv_slot_t* slot;
-
- srv_sys_mutex_enter();
-
- slot = &srv_sys.sys_threads[SRV_MASTER_SLOT];
-
- /* Only if the master thread has been started. */
-
- if (slot->in_use) {
- ut_a(srv_slot_get_type(slot) == SRV_MASTER);
- os_event_set(slot->event);
- }
-
- srv_sys_mutex_exit();
- }
-}
-
/** Wake up the purge threads if there is work to do. */
void
srv_wake_purge_thread_if_not_active()
@@ -1952,14 +1925,6 @@ srv_wake_purge_thread_if_not_active()
}
}
-/** Wake up the master thread if it is suspended or being suspended. */
-void
-srv_wake_master_thread()
-{
- srv_inc_activity_count();
- srv_release_threads(SRV_MASTER, 1);
-}
-
/*******************************************************************//**
Get current server activity count. We don't hold srv_sys::mutex while
reading this value as it is only used in heuristics.
@@ -1971,15 +1936,20 @@ srv_get_activity_count(void)
return(srv_sys.activity_count);
}
-/*******************************************************************//**
-Check if there has been any activity.
+/** Check if there has been any activity.
+@param[in,out] activity_count recent activity count to be returned
+if there is a change
@return FALSE if no change in activity counter. */
-ibool
-srv_check_activity(
-/*===============*/
- ulint old_activity_count) /*!< in: old activity count */
+bool srv_check_activity(ulint *activity_count)
{
- return(srv_sys.activity_count != old_activity_count);
+ ulint new_activity_count= srv_sys.activity_count;
+ if (new_activity_count != *activity_count)
+ {
+ *activity_count= new_activity_count;
+ return true;
+ }
+
+ return false;
}
/********************************************************************//**
@@ -2284,6 +2254,10 @@ srv_master_do_idle_tasks(void)
log_checkpoint(true);
MONITOR_INC_TIME_IN_MICRO_SECS(MONITOR_SRV_CHECKPOINT_MICROSECOND,
counter_time);
+
+ /* This is a workaround to avoid the InnoDB hang when OS datetime
+ changed backwards.*/
+ os_event_set(buf_flush_event);
}
/** Perform shutdown tasks.
@@ -2372,48 +2346,30 @@ DECLARE_THREAD(srv_master_thread)(
slot = srv_reserve_slot(SRV_MASTER);
ut_a(slot == srv_sys.sys_threads);
-loop:
while (srv_shutdown_state <= SRV_SHUTDOWN_INITIATED) {
srv_master_sleep();
MONITOR_INC(MONITOR_MASTER_THREAD_SLEEP);
- if (srv_check_activity(old_activity_count)) {
- old_activity_count = srv_get_activity_count();
+ if (srv_check_activity(&old_activity_count)) {
srv_master_do_active_tasks();
} else {
srv_master_do_idle_tasks();
}
}
- switch (srv_shutdown_state) {
- case SRV_SHUTDOWN_NONE:
- case SRV_SHUTDOWN_INITIATED:
- break;
- case SRV_SHUTDOWN_FLUSH_PHASE:
- case SRV_SHUTDOWN_LAST_PHASE:
- ut_ad(0);
- /* fall through */
- case SRV_SHUTDOWN_EXIT_THREADS:
- /* srv_init_abort() must have been invoked */
- case SRV_SHUTDOWN_CLEANUP:
- if (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP
- && srv_fast_shutdown < 2) {
- srv_shutdown(srv_fast_shutdown == 0);
- }
- srv_suspend_thread(slot);
- my_thread_end();
- os_thread_exit();
- }
+ ut_ad(srv_shutdown_state == SRV_SHUTDOWN_EXIT_THREADS
+ || srv_shutdown_state == SRV_SHUTDOWN_CLEANUP);
- srv_main_thread_op_info = "suspending";
+ if (srv_shutdown_state == SRV_SHUTDOWN_CLEANUP
+ && srv_fast_shutdown < 2) {
+ srv_shutdown(srv_fast_shutdown == 0);
+ }
srv_suspend_thread(slot);
-
- srv_main_thread_op_info = "waiting for server activity";
-
- srv_resume_thread(slot);
- goto loop;
+ my_thread_end();
+ os_thread_exit();
+ OS_THREAD_DUMMY_RETURN;
}
/** @return whether purge should exit due to shutdown */
@@ -2581,15 +2537,13 @@ static uint32_t srv_do_purge(ulint* n_total_purged
++n_use_threads;
}
- } else if (srv_check_activity(old_activity_count)
+ } else if (srv_check_activity(&old_activity_count)
&& n_use_threads > 1) {
/* History length same or smaller since last snapshot,
use fewer threads. */
--n_use_threads;
-
- old_activity_count = srv_get_activity_count();
}
/* Ensure that the purge threads are less than what
diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc
index 746935f5794..42d757d1a84 100644
--- a/storage/innobase/srv/srv0start.cc
+++ b/storage/innobase/srv/srv0start.cc
@@ -1088,7 +1088,7 @@ srv_shutdown_all_bg_threads()
if (srv_start_state_is_set(SRV_START_STATE_MASTER)) {
/* c. We wake the master thread so that
it exits */
- srv_wake_master_thread();
+ srv_inc_activity_count();
}
if (srv_start_state_is_set(SRV_START_STATE_PURGE)) {
@@ -2420,7 +2420,7 @@ void srv_shutdown_bg_undo_sources()
fts_optimize_shutdown();
dict_stats_shutdown();
while (row_get_background_drop_list_len_low()) {
- srv_wake_master_thread();
+ srv_inc_activity_count();
os_thread_yield();
}
srv_undo_sources = false;
diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc
index 0e60c6fb745..917274d5f0d 100644
--- a/storage/innobase/trx/trx0roll.cc
+++ b/storage/innobase/trx/trx0roll.cc
@@ -62,7 +62,7 @@ static bool trx_rollback_finish(trx_t* trx)
trx->commit();
} else {
ut_a(trx->error_state == DB_INTERRUPTED);
- ut_ad(!srv_is_being_started);
+ ut_ad(srv_shutdown_state != SRV_SHUTDOWN_NONE);
ut_a(!srv_undo_sources);
ut_ad(srv_fast_shutdown);
ut_d(trx->in_rollback = false);
@@ -160,9 +160,6 @@ trx_rollback_to_savepoint_low(
mem_heap_free(heap);
- /* There might be work for utility threads.*/
- srv_active_wake_master_thread();
-
MONITOR_DEC(MONITOR_TRX_ACTIVE);
}
@@ -800,7 +797,8 @@ void trx_rollback_recovered(bool all)
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
ut_d(trx_mutex_exit(trx));
- if (!srv_is_being_started && !srv_undo_sources && srv_fast_shutdown)
+ if (srv_shutdown_state != SRV_SHUTDOWN_NONE && !srv_undo_sources &&
+ srv_fast_shutdown)
goto discard;
if (all || trx_get_dict_operation(trx) != TRX_DICT_OP_NONE)
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 7da5b2bc738..d63d7db4e32 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -1485,11 +1485,6 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr)
must_flush_log_later= true;
else if (srv_flush_log_at_trx_commit)
trx_flush_log_if_needed(commit_lsn, this);
-
- /* Tell server some activity has happened, since the trx does
- changes something. Background utility threads like master thread,
- purge thread or page_cleaner thread might have some work to do. */
- srv_active_wake_master_thread();
}
ut_ad(!rsegs.m_noredo.undo);
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt
index 2ba887b3fae..d065c5e7bc3 100644
--- a/storage/rocksdb/CMakeLists.txt
+++ b/storage/rocksdb/CMakeLists.txt
@@ -112,9 +112,15 @@ SET(ROCKSDB_SE_SOURCES
# This is a strong requirement coming from RocksDB. No conditional checks here.
#ADD_DEFINITIONS(-DROCKSDB_PLATFORM_POSIX -DROCKSDB_LIB_IO_POSIX
#)
+if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
+ SET(ATOMIC_EXTRA_LIBS -latomic)
+else()
+ SET(ATOMIC_EXTRA_LIBS)
+endif()
MYSQL_ADD_PLUGIN(rocksdb ${ROCKSDB_SE_SOURCES} MODULE_ONLY STORAGE_ENGINE
MODULE_OUTPUT_NAME ha_rocksdb
+ LINK_LIBRARIES ${ATOMIC_EXTRA_LIBS}
COMPONENT rocksdb-engine)
IF(NOT TARGET rocksdb)
@@ -165,6 +171,7 @@ TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY})
if (UNIX AND NOT APPLE)
TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt)
endif()
+TARGET_LINK_LIBRARIES(rocksdb_aux_lib ${ATOMIC_EXTRA_LIBS})
# IF (WITH_JEMALLOC)
# FIND_LIBRARY(JEMALLOC_LIBRARY
diff --git a/storage/rocksdb/build_rocksdb.cmake b/storage/rocksdb/build_rocksdb.cmake
index f7b2170978d..2b4649b1fbe 100644
--- a/storage/rocksdb/build_rocksdb.cmake
+++ b/storage/rocksdb/build_rocksdb.cmake
@@ -18,17 +18,16 @@ if(WIN32)
# include(${ROCKSDB_SOURCE_DIR}/thirdparty.inc)
else()
option(WITH_ROCKSDB_JEMALLOC "build RocksDB with JeMalloc" OFF)
- if(WITH_ROCKSDB_JEMALLOC)
- find_package(JeMalloc REQUIRED)
- add_definitions(-DROCKSDB_JEMALLOC)
- ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE)
- include_directories(${JEMALLOC_INCLUDE_DIR})
- endif()
if(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
# FreeBSD has jemaloc as default malloc
add_definitions(-DROCKSDB_JEMALLOC)
ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE)
set(WITH_JEMALLOC ON)
+ elseif(WITH_ROCKSDB_JEMALLOC)
+ find_package(JeMalloc REQUIRED)
+ add_definitions(-DROCKSDB_JEMALLOC)
+ ADD_DEFINITIONS(-DROCKSDB_MALLOC_USABLE_SIZE)
+ include_directories(${JEMALLOC_INCLUDE_DIR})
endif()
endif()
@@ -127,6 +126,10 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
ADD_DEFINITIONS(-DHAVE_POWER8 -DHAS_ALTIVEC)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+if(CMAKE_SYSTEM_PROCESSOR STREQUAL "riscv64")
+ set(SYSTEM_LIBS ${SYSTEM_LIBS} -latomic)
+endif()
+
option(WITH_FALLOCATE "build with fallocate" ON)
if(WITH_FALLOCATE AND UNIX)
@@ -437,6 +440,17 @@ else()
util/crc32c_ppc.c
util/crc32c_ppc_asm.S)
endif(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64")
+ # aarch
+ if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
+ INCLUDE(CheckCXXCompilerFlag)
+ CHECK_CXX_COMPILER_FLAG("-march=armv8-a+crc+crypto" HAS_ARMV8_CRC)
+ if(HAS_ARMV8_CRC)
+ message(STATUS " HAS_ARMV8_CRC yes")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=armv8-a+crc+crypto -Wno-unused-function")
+ list(APPEND ROCKSDB_SOURCES
+ util/crc32c_arm64.cc)
+ endif(HAS_ARMV8_CRC)
+ endif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|AARCH64")
endif()
SET(SOURCES)
FOREACH(s ${ROCKSDB_SOURCES})
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test b/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
index 3ebdd67a1a6..aee653830e2 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/concurrent_alter.test
@@ -30,7 +30,7 @@ $MYSQL_SLAP --silent --delimiter=";" --query="select * from a1 where b=1" --conc
wait
EOF
---exec bash $MYSQL_TMP_DIR/concurrent_alter.sh
+--exec sh $MYSQL_TMP_DIR/concurrent_alter.sh
let $server_charset=`select @@character_set_server`;
--replace_result $server_charset DEFAULT_CHARSET
diff --git a/vio/vio_priv.h b/vio/vio_priv.h
index 9b68624a811..3a0f826e7e8 100644
--- a/vio/vio_priv.h
+++ b/vio/vio_priv.h
@@ -33,6 +33,7 @@ my_bool vio_is_connected_pipe(Vio *vio);
int vio_close_pipe(Vio * vio);
int cancel_io(HANDLE handle, DWORD thread_id);
int vio_shutdown_pipe(Vio *vio,int how);
+uint vio_pending_pipe(Vio* vio);
#endif
diff --git a/vio/viopipe.c b/vio/viopipe.c
index 6db0944d8df..567884807fe 100644
--- a/vio/viopipe.c
+++ b/vio/viopipe.c
@@ -140,5 +140,11 @@ int vio_close_pipe(Vio *vio)
DBUG_RETURN(ret);
}
+/* return number of bytes readable from pipe.*/
+uint vio_pending_pipe(Vio *vio)
+{
+ DWORD bytes;
+ return PeekNamedPipe(vio->hPipe, NULL, 0, NULL, &bytes, NULL) ? bytes : 0;
+}
#endif
diff --git a/vio/viosocket.c b/vio/viosocket.c
index aedcf01b455..0820176371d 100644
--- a/vio/viosocket.c
+++ b/vio/viosocket.c
@@ -1232,7 +1232,6 @@ my_bool vio_is_connected(Vio *vio)
DBUG_RETURN(bytes ? TRUE : FALSE);
}
-#ifndef DBUG_OFF
/**
Number of bytes in the read or socket buffer
@@ -1251,22 +1250,34 @@ ssize_t vio_pending(Vio *vio)
return vio->read_end - vio->read_pos;
/* Skip non-socket based transport types. */
- if (vio->type == VIO_TYPE_TCPIP || vio->type == VIO_TYPE_SOCKET)
+ switch (vio->type)
{
+ case VIO_TYPE_TCPIP:
+ /* fallthrough */
+ case VIO_TYPE_SOCKET:
/* Obtain number of readable bytes in the socket buffer. */
if (socket_peek_read(vio, &bytes))
return -1;
- }
+ return bytes;
- /*
- SSL not checked due to a yaSSL bug in SSL_pending that
- causes it to attempt to read from the socket.
- */
+ case VIO_TYPE_SSL:
+ bytes= (uint) SSL_pending(vio->ssl_arg);
+ if (bytes)
+ return bytes;
+ if (socket_peek_read(vio, &bytes))
+ return -1;
+ return bytes;
- return (ssize_t) bytes;
+#ifdef _WIN32
+ case VIO_TYPE_NAMEDPIPE:
+ bytes= vio_pending_pipe(vio);
+ return bytes;
+#endif
+ default:
+ return -1;
+ }
}
-#endif /* DBUG_OFF */
/**
Checks if the error code, returned by vio_getnameinfo(), means it was the