From 744580d5a7440bcb878e434fa8012a119d79e2dc Mon Sep 17 00:00:00 2001 From: Brandon Nesterenko Date: Mon, 10 Jun 2024 04:08:42 -0600 Subject: [PATCH 01/60] MDEV-32892: IO Thread Reports False Error When Stopped During Connecting to Primary The IO thread can report error code 2013 into the error log when it is stopped during the initial connection process to the primary, as well as when trying to read an event. However, because the IO thread is being stopped, its connection to the primary is force-killed by the signaling thread (see THD::awake_no_mutex()), and thereby these connection errors should be ignored. Reviewed By: ============ Kristian Nielsen --- .../suite/rpl/r/rpl_stop_slave_error.result | 2 ++ .../suite/rpl/t/rpl_stop_slave_error.test | 15 +++++++++++ sql/slave.cc | 25 +++++++++++++++++-- 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_stop_slave_error.result b/mysql-test/suite/rpl/r/rpl_stop_slave_error.result index 956e53cf465..71cb980b5d5 100644 --- a/mysql-test/suite/rpl/r/rpl_stop_slave_error.result +++ b/mysql-test/suite/rpl/r/rpl_stop_slave_error.result @@ -2,7 +2,9 @@ include/master-slave.inc [connection master] connection master; connection slave; +# MDEV-32892: Repeatedly starting/stopping io_thread.. include/stop_slave.inc NOT FOUND /Error reading packet from server: Lost connection/ in slave_log.err +NOT FOUND /error code: 2013/ in slave_log.err include/start_slave.inc include/rpl_end.inc diff --git a/mysql-test/suite/rpl/t/rpl_stop_slave_error.test b/mysql-test/suite/rpl/t/rpl_stop_slave_error.test index 10d7c7736f1..97542baf563 100644 --- a/mysql-test/suite/rpl/t/rpl_stop_slave_error.test +++ b/mysql-test/suite/rpl/t/rpl_stop_slave_error.test @@ -6,11 +6,26 @@ source include/master-slave.inc; connection master; sync_slave_with_master; + +--let $iter=100 +--echo # MDEV-32892: Repeatedly starting/stopping io_thread.. +--disable_query_log +while ($iter) +{ + stop slave io_thread; + start slave io_thread; + --dec $iter +} +--enable_query_log source include/stop_slave.inc; + let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/slave_log.err; let SEARCH_PATTERN=Error reading packet from server: Lost connection; source include/search_pattern_in_file.inc; +let SEARCH_PATTERN=error code: 2013; +source include/search_pattern_in_file.inc; + source include/start_slave.inc; source include/rpl_end.inc; diff --git a/sql/slave.cc b/sql/slave.cc index 6032256c60c..f258f9f3595 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2292,6 +2292,9 @@ past_checksum: if (unlikely(mysql_real_query(mysql, STRING_WITH_LEN("SET skip_replication=1")))) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2336,6 +2339,9 @@ past_checksum: STRINGIFY_ARG(MARIA_SLAVE_CAPABILITY_MINE)))); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2377,6 +2383,9 @@ after_set_capability: !(master_res= mysql_store_result(mysql)) || !(master_row= mysql_fetch_row(master_res))) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2412,6 +2421,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2445,6 +2457,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2478,6 +2493,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -2514,6 +2532,9 @@ after_set_capability: rc= mysql_real_query(mysql, query_str.ptr(), query_str.length()); if (unlikely(rc)) { + if (check_io_slave_killed(mi, NULL)) + goto slave_killed_err; + err_code= mysql_errno(mysql); if (is_network_error(err_code)) { @@ -3658,7 +3679,7 @@ static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings, } else { - if (!mi->rli.abort_slave) + if (!(mi->rli.abort_slave || io_slave_killed(mi))) { sql_print_error("Error reading packet from server: %s (server_errno=%d)", mysql_error(mysql), mysql_errno(mysql)); @@ -7432,7 +7453,7 @@ static int connect_to_master(THD* thd, MYSQL* mysql, Master_info* mi, mi->port, 0, client_flag) == 0)) { /* Don't repeat last error */ - if ((int)mysql_errno(mysql) != last_errno) + if ((int)mysql_errno(mysql) != last_errno && !io_slave_killed(mi)) { last_errno=mysql_errno(mysql); suppress_warnings= 0; From b418b60ebf5a870ca27a2c578a405e0ed1af2fee Mon Sep 17 00:00:00 2001 From: Rex Date: Wed, 19 Jun 2024 12:56:45 +1100 Subject: [PATCH 02/60] MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated st_select_lex::update_correlated_cache() fails to take JSON_TABLE functions in subqueries into account. Reviewed by Sergei Petrunia (sergey@mariadb.com) --- mysql-test/main/subselect.result | 26 +++++++++++++++++++ mysql-test/main/subselect.test | 22 ++++++++++++++++ .../main/subselect_no_exists_to_in.result | 26 +++++++++++++++++++ mysql-test/main/subselect_no_mat.result | 26 +++++++++++++++++++ mysql-test/main/subselect_no_opts.result | 26 +++++++++++++++++++ mysql-test/main/subselect_no_scache.result | 26 +++++++++++++++++++ mysql-test/main/subselect_no_semijoin.result | 26 +++++++++++++++++++ sql/sql_lex.cc | 3 +++ 8 files changed, 181 insertions(+) diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result index 9fbf36e3d6e..3b5954754d2 100644 --- a/mysql-test/main/subselect.result +++ b/mysql-test/main/subselect.result @@ -7559,5 +7559,31 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test index badf55ca958..eca5af78eb7 100644 --- a/mysql-test/main/subselect.test +++ b/mysql-test/main/subselect.test @@ -6434,6 +6434,28 @@ insert into t2 select (('e','e') IN (SELECT v1.id, v1.id FROM v1 JOIN t3)); drop view v1; drop table t1, t2, t3; +--echo # +--echo # MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +--echo # update_correlated_cache() fails to take JSON_TABLE functions in +--echo # subqueries into account. +--echo # + +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), + ('[{"x":"10"},{"x":"20"}]'), + ('[{"x":"100"},{"x":"200"}]'); +select c, + (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) + AS jt) + from t1; + +explain select c, + (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) + AS jt) + from t1; + +drop table t1; + --echo # --echo # End of 10.6 tests --echo # diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result index 0fdd573b339..806e2f67c63 100644 --- a/mysql-test/main/subselect_no_exists_to_in.result +++ b/mysql-test/main/subselect_no_exists_to_in.result @@ -7559,6 +7559,32 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # set optimizer_switch=default; diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result index 5183d50cd49..cef26709fd3 100644 --- a/mysql-test/main/subselect_no_mat.result +++ b/mysql-test/main/subselect_no_mat.result @@ -7552,6 +7552,32 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # set optimizer_switch=default; diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result index 603958d2815..7ef17b14791 100644 --- a/mysql-test/main/subselect_no_opts.result +++ b/mysql-test/main/subselect_no_opts.result @@ -7550,6 +7550,32 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # set @optimizer_switch_for_subselect_test=null; diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result index 67d738a8a78..9bbaf51fe33 100644 --- a/mysql-test/main/subselect_no_scache.result +++ b/mysql-test/main/subselect_no_scache.result @@ -7565,6 +7565,32 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # set optimizer_switch=default; diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result index 0ec32e0fbf8..7269ad94df7 100644 --- a/mysql-test/main/subselect_no_semijoin.result +++ b/mysql-test/main/subselect_no_semijoin.result @@ -7550,6 +7550,32 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # # diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index b45b9271269..f8acaa24278 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -5501,6 +5501,9 @@ void st_select_lex::update_correlated_cache() while ((tl= ti++)) { + if (tl->table_function) + is_correlated|= MY_TEST(tl->table_function->used_tables() & + OUTER_REF_TABLE_BIT); // is_correlated|= tl->is_with_table_recursive_reference(); if (tl->on_expr) is_correlated|= MY_TEST(tl->on_expr->used_tables() & OUTER_REF_TABLE_BIT); From b7718a1c1cf40f4b15263c27861c3f712cf8a62a Mon Sep 17 00:00:00 2001 From: Denis Protivensky Date: Wed, 6 Dec 2023 18:31:23 +0300 Subject: [PATCH 03/60] MDEV-32738: Don't roll back high-prio txn waiting on a lock in InnoDB DML transactions on FK-child tables also get table locks on FK-parent tables. If there is a DML transaction holding such a lock, and a TOI transaction starts, the latter BF-aborts the former and puts itself into a waiting state. If at this moment another DML transaction on FK-child table starts, it doesn't check that the transaction waiting on a parent table lock is TOI, and it erroneously BF-aborts the waiting TOI transaction. The fix: don't roll back high-priority transaction waiting on a lock in InnoDB, instead roll back an incoming DML transaction. Signed-off-by: Julius Goryavsky --- mysql-test/suite/galera/r/MDEV-32738.result | 32 +++++++++ mysql-test/suite/galera/t/MDEV-32738.cnf | 5 ++ mysql-test/suite/galera/t/MDEV-32738.test | 74 +++++++++++++++++++++ storage/innobase/lock/lock0lock.cc | 17 ++++- 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/galera/r/MDEV-32738.result create mode 100644 mysql-test/suite/galera/t/MDEV-32738.cnf create mode 100644 mysql-test/suite/galera/t/MDEV-32738.test diff --git a/mysql-test/suite/galera/r/MDEV-32738.result b/mysql-test/suite/galera/r/MDEV-32738.result new file mode 100644 index 00000000000..90bd7d49023 --- /dev/null +++ b/mysql-test/suite/galera/r/MDEV-32738.result @@ -0,0 +1,32 @@ +connection node_2; +connection node_1; +connect con1_1,127.0.0.1,root,,test,$NODE_MYPORT_1; +connect con1_2,127.0.0.1,root,,test,$NODE_MYPORT_1; +CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t1_fk(c1 INT PRIMARY KEY, c2 INT, INDEX (c2), FOREIGN KEY (c2) REFERENCES t1(c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +connection con1_1; +SET DEBUG_SYNC = 'ib_after_row_insert WAIT_FOR bf_abort'; +INSERT INTO t1_fk VALUES (1, 1); +connection con1_2; +SET DEBUG_SYNC = 'ha_write_row_start SIGNAL may_alter WAIT_FOR may_insert'; +INSERT INTO t1_fk VALUES (2, 2); +connection node_1; +SET DEBUG_SYNC = 'now WAIT_FOR may_alter'; +SET DEBUG_SYNC = 'after_lock_table_for_trx SIGNAL may_insert WAIT_FOR alter_continue'; +ALTER TABLE t1 ADD COLUMN c2 INT; +connection con1_1; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +connection con1_2; +ERROR 40001: Deadlock found when trying to get lock; try restarting transaction +SET DEBUG_SYNC = 'now SIGNAL alter_continue'; +connection node_1; +connection node_2; +INSERT INTO t1 (c1, c2) VALUES (2, 2); +connection node_1; +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1_fk, t1; +disconnect con1_1; +disconnect con1_2; +disconnect node_2; +disconnect node_1; diff --git a/mysql-test/suite/galera/t/MDEV-32738.cnf b/mysql-test/suite/galera/t/MDEV-32738.cnf new file mode 100644 index 00000000000..5e02ce5aa19 --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-32738.cnf @@ -0,0 +1,5 @@ +!include ../galera_2nodes.cnf + +# Disable retry for autocommit statements. +[mysqld] +wsrep-retry-autocommit=0 diff --git a/mysql-test/suite/galera/t/MDEV-32738.test b/mysql-test/suite/galera/t/MDEV-32738.test new file mode 100644 index 00000000000..fc698af6cfc --- /dev/null +++ b/mysql-test/suite/galera/t/MDEV-32738.test @@ -0,0 +1,74 @@ +# +# MDEV-32738: Don't roll back high-priority transaction waiting on a lock in InnoDB. +# +# DML transactions on FK-child tables also get table locks on FK-parent tables. +# If there is a DML transaction holding such a lock, and a TOI transaction starts, +# the latter BF-aborts the former and puts itself into a waiting state. +# If at this moment another DML transaction on FK-child table starts, it doesn't +# check that the transaction waiting on a parent table lock is TOI, and it +# erroneously BF-aborts the waiting TOI transaction. +# +# The fix: check that the waiting transaction is TOI and in this case roll back +# the incoming DML transaction in InnoDB. +# +# The test runs with autocommit statement retry disabled. +# + +--source include/galera_cluster.inc +--source include/have_debug_sync.inc +--source include/have_debug.inc + +--connect con1_1,127.0.0.1,root,,test,$NODE_MYPORT_1 +--connect con1_2,127.0.0.1,root,,test,$NODE_MYPORT_1 + +CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t1_fk(c1 INT PRIMARY KEY, c2 INT, INDEX (c2), FOREIGN KEY (c2) REFERENCES t1(c1)) ENGINE=InnoDB; + +INSERT INTO t1 VALUES (1); + +--connection con1_1 +SET DEBUG_SYNC = 'ib_after_row_insert WAIT_FOR bf_abort'; +# INSERT also grabs FK-referenced table lock. +--send + INSERT INTO t1_fk VALUES (1, 1); + +--connection con1_2 +SET DEBUG_SYNC = 'ha_write_row_start SIGNAL may_alter WAIT_FOR may_insert'; +# Stop before doing anything, but pass wsrep_sync_wait(). +# This should be done before ALTER enters TOI. +--send + INSERT INTO t1_fk VALUES (2, 2); + +--connection node_1 +SET DEBUG_SYNC = 'now WAIT_FOR may_alter'; +SET DEBUG_SYNC = 'after_lock_table_for_trx SIGNAL may_insert WAIT_FOR alter_continue'; +# ALTER BF-aborts the first INSERT and lets the second INSERT continue. +--send + ALTER TABLE t1 ADD COLUMN c2 INT; + +--connection con1_1 +# First INSERT gets BF-aborted. +--error ER_LOCK_DEADLOCK +--reap + +--connection con1_2 +# Second INSERT rolls back as ALTER is waiting on the lock. +--error ER_LOCK_DEADLOCK +--reap +SET DEBUG_SYNC = 'now SIGNAL alter_continue'; + +--connection node_1 +# ALTER succeeds. +--reap + +--connection node_2 +# Sanity check that ALTER has been replicated. +INSERT INTO t1 (c1, c2) VALUES (2, 2); + +# Cleanup. +--connection node_1 +SET DEBUG_SYNC = 'RESET'; +DROP TABLE t1_fk, t1; +--disconnect con1_1 +--disconnect con1_2 +--source include/galera_end.inc diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 05a3260f705..d0b4105d9c6 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -3738,6 +3738,19 @@ lock_table_enqueue_waiting( } #ifdef WITH_WSREP + /* + Check if a BF-transaction holds the conflicting lock. + In this case, roll back current transaction. + */ + if (trx->is_wsrep() && c_lock->trx->is_wsrep() && + wsrep_thd_is_BF(c_lock->trx->mysql_thd, FALSE)) { + if (wsrep_thd_is_BF(trx->mysql_thd, FALSE)) { + /* BF-BF wait is a bug. */ + ut_error; + } + trx->lock.was_chosen_as_deadlock_victim = TRUE; + } + if (trx->is_wsrep() && trx->lock.was_chosen_as_deadlock_victim) { return(DB_DEADLOCK); } @@ -3811,7 +3824,8 @@ lock_table_other_has_incompatible( && (wait || !lock_get_wait(lock))) { #ifdef WITH_WSREP - if (lock->trx->is_wsrep()) { + if (lock->trx->is_wsrep() && + !wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE)) { if (UNIV_UNLIKELY(wsrep_debug)) { ib::info() << "WSREP: table lock abort for table:" << table->name; @@ -3921,6 +3935,7 @@ lock_table( trx_mutex_exit(trx); + DEBUG_SYNC_C("after_lock_table_for_trx"); return(err); } From 8d61a94b8b1cfc18e1a07f8a29dcaef1dfe9d73b Mon Sep 17 00:00:00 2001 From: sjaakola Date: Thu, 27 Jun 2024 15:10:25 +0300 Subject: [PATCH 04/60] MDEV-34477 galera.galera_gcache_recover_manytrx sporadic failures The problem was in error message suppression, which did not match the actual warning messages, due to bad quotations. Changed warnings message suppressions to more simple format. Signed-off-by: Julius Goryavsky --- .../suite/galera/r/galera_gcache_recover_manytrx.result | 5 ++--- mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result index c853d5b79f6..8c6da8f8f46 100644 --- a/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result +++ b/mysql-test/suite/galera/r/galera_gcache_recover_manytrx.result @@ -94,7 +94,6 @@ CALL insert_1m ();; connection node_1_insert_10m; CALL insert_10m ();; connection node_2; -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); SET SESSION wsrep_sync_wait = 0; Killing server ... connection node_1; @@ -131,9 +130,9 @@ DROP PROCEDURE update_simple; DROP PROCEDURE insert_1k; DROP PROCEDURE insert_1m; connection node_1; -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("conflict state 7 after post commit"); CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); connection node_2; -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); diff --git a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test index e3921264f3d..532de6d5d10 100644 --- a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test +++ b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test @@ -126,7 +126,6 @@ DELIMITER ;| --send CALL insert_10m (); --connection node_2 -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); SET SESSION wsrep_sync_wait = 0; # Make sure that node_2 is not killed while TOIs are applied. @@ -200,12 +199,12 @@ DROP PROCEDURE insert_1k; DROP PROCEDURE insert_1m; --connection node_1 -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("conflict state 7 after post commit"); # Warning happens when the cluster is started for the first time CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); --connection node_2 -call mtr.add_suppression("Error in Log_event::read_log_event\(\):.*"); +call mtr.add_suppression("Error in Log_event::read_log_event\\(\\)"); CALL mtr.add_suppression("Skipped GCache ring buffer recovery"); From f942927141e74b4e5fb168a530a772e96fad9f3e Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Wed, 3 Jul 2024 19:04:24 +0200 Subject: [PATCH 05/60] MDEV-21538: galera_desync_overlapped test result content mismatch The test has been made more stable according to the recommendations of the Codership team. --- mysql-test/suite/galera/disabled.def | 1 - mysql-test/suite/galera/r/galera_desync_overlapped.result | 3 ++- mysql-test/suite/galera/t/galera_desync_overlapped.test | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index 45c04bdfd4b..4f3f9884997 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -18,4 +18,3 @@ galera_as_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsr galera_slave_replay : MDEV-32780 galera_as_slave_replay: assertion in the wsrep::transaction::before_rollback() galera_sst_mysqldump_with_key : MDEV-32782 galera_sst_mysqldump_with_key test failed galera_var_ignore_apply_errors : MENT-1997 galera_var_ignore_apply_errors test freezes -galera_desync_overlapped : MDEV-21538 galera_desync_overlapped MTR failed: Result content mismatch diff --git a/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-test/suite/galera/r/galera_desync_overlapped.result index e3f40d444ee..f7aa7a1c5df 100644 --- a/mysql-test/suite/galera/r/galera_desync_overlapped.result +++ b/mysql-test/suite/galera/r/galera_desync_overlapped.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_1; -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; CREATE TABLE t2 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; @@ -12,6 +12,7 @@ wsrep_desync_count 1 SET DEBUG_SYNC='before_execute_sql_command SIGNAL alter1 WAIT_FOR alter2'; INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM ten AS a1, ten AS a2, ten AS a3; connection node_1a; +FLUSH STATUS; SET GLOBAL wsrep_desync = 1; Warnings: Warning 1231 'wsrep_desync' is already ON. diff --git a/mysql-test/suite/galera/t/galera_desync_overlapped.test b/mysql-test/suite/galera/t/galera_desync_overlapped.test index 8b78e8cdeb7..659e4a2e1e2 100644 --- a/mysql-test/suite/galera/t/galera_desync_overlapped.test +++ b/mysql-test/suite/galera/t/galera_desync_overlapped.test @@ -11,7 +11,7 @@ --connection node_1 -CREATE TABLE ten (f1 INTEGER); +CREATE TABLE ten (f1 INTEGER PRIMARY KEY) Engine=InnoDB; INSERT INTO ten VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); CREATE TABLE t1 (f1 INTEGER, PRIMARY KEY (f1)) Engine=InnoDB; @@ -24,6 +24,7 @@ send INSERT INTO t1 (f1) SELECT 0000 + (100 * a1.f1) + (10 * a2.f1) + a3.f1 FROM --connection node_1a +FLUSH STATUS; SET GLOBAL wsrep_desync = 1; show status like 'wsrep_desync_count'; SET DEBUG_SYNC='now WAIT_FOR alter1'; From d0a2d4e755210523ce2e7186adecae2632c55835 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Thu, 4 Jul 2024 02:43:32 +0200 Subject: [PATCH 06/60] galera mtr tests: correction of inaccuracies in warnings suppressions --- .../suite/galera/include/galera_sst_restore.inc | 2 +- .../galera/include/galera_sst_set_mysqldump.inc | 4 ++-- mysql-test/suite/galera/r/GAL-401.result | 2 +- mysql-test/suite/galera/r/GAL-419.result | 9 +++++---- mysql-test/suite/galera/r/GCF-939.result | 4 ++-- mysql-test/suite/galera/r/MDEV-21479.result | 2 +- mysql-test/suite/galera/r/MDEV-26575.result | 2 +- mysql-test/suite/galera/r/MDEV-29142.result | 12 ++++++------ mysql-test/suite/galera/r/MW-284.result | 2 +- mysql-test/suite/galera/r/MW-329.result | 3 +-- mysql-test/suite/galera/r/galera#500.result | 2 +- .../suite/galera/r/galera-features#117.result | 2 +- .../galera/r/galera_bf_abort_shutdown.result | 2 +- .../galera/r/galera_desync_overlapped.result | 1 + .../suite/galera/r/galera_drop_database.result | 2 +- .../suite/galera/r/galera_drop_multi.result | 2 +- mysql-test/suite/galera/r/galera_events2.result | 2 +- .../r/galera_forced_binlog_format_ctas.result | 2 +- mysql-test/suite/galera/r/galera_gra_log.result | 2 +- .../suite/galera/r/galera_gtid_server_id.result | 2 +- .../suite/galera/r/galera_ist_mysqldump.result | 8 ++++---- mysql-test/suite/galera/r/galera_kill_ddl.result | 2 +- .../suite/galera/r/galera_partition.result | 2 +- .../r/galera_query_cache_invalidate.result | 4 ++-- .../suite/galera/r/galera_replica_no_gtid.result | 2 +- .../r/galera_restart_on_unknown_option.result | 2 +- .../suite/galera/r/galera_ssl_compression.result | 2 +- .../suite/galera/r/galera_ssl_upgrade.result | 8 ++------ .../suite/galera/r/galera_sst_mysqldump.result | 6 +++--- .../r/galera_sst_mysqldump_with_key.result | 6 +++--- .../suite/galera/r/galera_toi_ddl_error.result | 4 ++-- .../r/galera_var_ignore_apply_errors.result | 12 ++++++------ .../galera/r/galera_var_slave_threads.result | 2 +- .../r/galera_var_wsrep_start_position.result | 2 +- .../suite/galera/r/galera_vote_rejoin_ddl.result | 4 ++-- mysql-test/suite/galera/r/galera_wan.result | 6 +++--- .../galera_wsrep_provider_options_syntax.result | 2 +- mysql-test/suite/galera/r/mdev-28433.result | 2 +- mysql-test/suite/galera/r/mdev-31651.result | 4 ++-- mysql-test/suite/galera/r/mysql-wsrep#33.result | 6 +++--- .../suite/galera/r/versioning_trx_id.result | 2 +- mysql-test/suite/galera/t/GAL-401.test | 2 +- mysql-test/suite/galera/t/GAL-419.test | 9 +++++---- mysql-test/suite/galera/t/GCF-939.test | 5 ++--- mysql-test/suite/galera/t/MDEV-21479.test | 2 +- mysql-test/suite/galera/t/MDEV-26575.test | 2 +- mysql-test/suite/galera/t/MDEV-29142.test | 12 ++++++------ mysql-test/suite/galera/t/MW-284.test | 2 +- mysql-test/suite/galera/t/MW-329.test | 6 ++---- mysql-test/suite/galera/t/MW-369.test | 1 - .../suite/galera/t/enforce_storage_engine2.cnf | 4 ---- mysql-test/suite/galera/t/galera#414.cnf | 1 - mysql-test/suite/galera/t/galera#500.test | 2 +- .../suite/galera/t/galera-features#117.test | 2 +- .../suite/galera/t/galera_bf_abort_shutdown.test | 2 +- mysql-test/suite/galera/t/galera_defaults.test | 2 +- .../suite/galera/t/galera_desync_overlapped.test | 4 +--- .../suite/galera/t/galera_drop_database.test | 2 +- mysql-test/suite/galera/t/galera_drop_multi.test | 2 +- mysql-test/suite/galera/t/galera_events2.test | 2 +- .../suite/galera/t/galera_fk_truncate.test | 1 + .../t/galera_forced_binlog_format_ctas.test | 2 +- mysql-test/suite/galera/t/galera_gra_log.test | 2 +- .../suite/galera/t/galera_gtid_server_id.test | 2 +- .../suite/galera/t/galera_ist_mysqldump.test | 2 +- .../galera/t/galera_ist_restart_joiner.test | 1 - mysql-test/suite/galera/t/galera_kill_ddl.test | 2 +- mysql-test/suite/galera/t/galera_partition.test | 5 +---- .../galera/t/galera_query_cache_invalidate.test | 4 ++-- .../suite/galera/t/galera_replica_no_gtid.test | 2 +- .../t/galera_restart_on_unknown_option.test | 2 +- .../suite/galera/t/galera_ssl_compression.test | 2 +- .../suite/galera/t/galera_ssl_upgrade.test | 10 ++-------- .../suite/galera/t/galera_toi_ddl_error.test | 4 ++-- .../galera/t/galera_var_ignore_apply_errors.test | 13 ++++++------- .../suite/galera/t/galera_var_slave_threads.test | 2 +- .../t/galera_var_wsrep_start_position.test | 2 +- .../suite/galera/t/galera_vote_rejoin_ddl.test | 4 ++-- mysql-test/suite/galera/t/galera_wan.test | 8 +++----- .../t/galera_wsrep_provider_options_syntax.test | 2 +- mysql-test/suite/galera/t/mdev-28433.test | 2 +- mysql-test/suite/galera/t/mdev-31651.test | 5 ++--- mysql-test/suite/galera/t/versioning_trx_id.test | 2 +- mysql-test/suite/galera_3nodes/disabled.def | 1 - .../galera_3nodes/include/galera_resume.inc | 1 - mysql-test/suite/galera_3nodes/r/GCF-354.result | 8 ++++---- mysql-test/suite/galera_3nodes/r/GCF-363.result | 6 +++--- mysql-test/suite/galera_3nodes/r/GCF-376.result | 2 +- .../suite/galera_3nodes/r/MDEV-29171.result | 4 ++-- .../galera_3nodes/r/galera-features#119.result | 6 +++--- .../r/galera_evs_suspect_timeout.result | 2 +- .../suite/galera_3nodes/r/galera_garbd.result | 6 +++--- .../galera_3nodes/r/galera_garbd_backup.result | 6 +++--- .../r/galera_gtid_consistency.result | 13 +++++++------ .../galera_3nodes/r/galera_ipv6_mysqldump.result | 8 ++++---- .../galera_3nodes/r/galera_join_with_cc_A.result | 6 +++--- .../galera_3nodes/r/galera_join_with_cc_B.result | 6 +++--- .../galera_3nodes/r/galera_join_with_cc_C.result | 8 ++++---- .../galera_3nodes/r/galera_pc_bootstrap.result | 2 +- .../r/galera_safe_to_bootstrap.result | 16 ++++++++-------- .../suite/galera_3nodes/r/galera_toi_vote.result | 2 +- .../r/galera_vote_rejoin_mysqldump.result | 6 +++--- .../r/inconsistency_shutdown.result | 10 +++++----- mysql-test/suite/galera_3nodes/t/GCF-354.test | 8 ++++---- mysql-test/suite/galera_3nodes/t/GCF-363.test | 6 +++--- mysql-test/suite/galera_3nodes/t/GCF-376.test | 2 +- mysql-test/suite/galera_3nodes/t/MDEV-29171.test | 4 ++-- .../galera_3nodes/t/galera-features#119.test | 7 +++---- .../t/galera_evs_suspect_timeout.test | 2 +- .../suite/galera_3nodes/t/galera_garbd.test | 6 +++--- .../galera_3nodes/t/galera_garbd_backup.test | 6 +++--- .../galera_3nodes/t/galera_gtid_consistency.test | 13 +++++++------ .../galera_3nodes/t/galera_ipv6_mysqldump.test | 7 ++++--- .../galera_3nodes/t/galera_join_with_cc_A.test | 6 +++--- .../galera_3nodes/t/galera_join_with_cc_B.test | 6 +++--- .../galera_3nodes/t/galera_join_with_cc_C.test | 8 ++++---- .../galera_3nodes/t/galera_pc_bootstrap.test | 2 +- .../t/galera_safe_to_bootstrap.test | 16 ++++++++-------- .../suite/galera_3nodes/t/galera_toi_vote.test | 2 +- .../galera_3nodes/t/galera_var_node_address.cnf | 1 - .../galera_3nodes/t/inconsistency_shutdown.test | 10 +++++----- mysql-test/suite/galera_3nodes_sr/t/GCF-336.test | 1 - mysql-test/suite/galera_sr/r/MDEV-30838.result | 2 +- .../suite/galera_sr/r/galera_sr_cc_master.result | 2 +- .../galera_sr/r/galera_sr_mysqldump_sst.result | 6 +++--- .../galera_sr/r/galera_sr_shutdown_slave.result | 2 +- .../suite/galera_sr/r/galera_sr_ws_size.result | 8 ++++---- .../suite/galera_sr/r/galera_sr_ws_size2.result | 16 ++++++++-------- mysql-test/suite/galera_sr/r/mdev_18631.result | 2 +- mysql-test/suite/galera_sr/t/GCF-1008.test | 1 - mysql-test/suite/galera_sr/t/GCF-1051.test | 1 - mysql-test/suite/galera_sr/t/GCF-845.test | 1 - mysql-test/suite/galera_sr/t/GCF-851.test | 1 - mysql-test/suite/galera_sr/t/GCF-889.test | 1 - mysql-test/suite/galera_sr/t/MDEV-21613.test | 2 -- mysql-test/suite/galera_sr/t/MDEV-30838.test | 2 +- .../suite/galera_sr/t/galera_sr_cc_master.test | 2 +- .../galera_sr/t/galera_sr_shutdown_slave.test | 2 +- .../suite/galera_sr/t/galera_sr_ws_size.test | 8 ++++---- .../suite/galera_sr/t/galera_sr_ws_size2.test | 16 ++++++++-------- .../t/galera_var_ignore_apply_errors_sr.test | 2 +- mysql-test/suite/galera_sr/t/mdev_18631.test | 3 +-- .../suite/galera_sr/t/mysql-wsrep-bugs-900.test | 2 +- 143 files changed, 286 insertions(+), 322 deletions(-) diff --git a/mysql-test/suite/galera/include/galera_sst_restore.inc b/mysql-test/suite/galera/include/galera_sst_restore.inc index 83d07f086d1..ab24ca00ed8 100644 --- a/mysql-test/suite/galera/include/galera_sst_restore.inc +++ b/mysql-test/suite/galera/include/galera_sst_restore.inc @@ -20,7 +20,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); --disable_query_log --eval SET GLOBAL wsrep_sst_method = '$wsrep_sst_method_orig'; --eval SET GLOBAL wsrep_sst_receive_address = '$wsrep_sst_receive_address_orig'; diff --git a/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc b/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc index 16af5742b9b..70f086934df 100644 --- a/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc +++ b/mysql-test/suite/galera/include/galera_sst_set_mysqldump.inc @@ -4,8 +4,8 @@ --echo Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); --connection node_1 # We need a user with a password to perform SST, otherwise we hit LP #1378253 diff --git a/mysql-test/suite/galera/r/GAL-401.result b/mysql-test/suite/galera/r/GAL-401.result index 859a4415f8d..9522dc80bad 100644 --- a/mysql-test/suite/galera/r/GAL-401.result +++ b/mysql-test/suite/galera/r/GAL-401.result @@ -24,6 +24,6 @@ t1 CREATE TABLE `t1` ( PRIMARY KEY (`f1`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); connection node_1; SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false'; diff --git a/mysql-test/suite/galera/r/GAL-419.result b/mysql-test/suite/galera/r/GAL-419.result index c70c9ee3263..e6bde169c23 100644 --- a/mysql-test/suite/galera/r/GAL-419.result +++ b/mysql-test/suite/galera/r/GAL-419.result @@ -1,10 +1,11 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*"); +call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); call mtr.add_suppression("Aborting"); -call mtr.add_suppression("Plugin \'wsrep\' init function returned error."); -call mtr.add_suppression("Plugin \'wsrep\' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("Failed to initialize plugins."); +call mtr.add_suppression("Plugin 'wsrep' init function returned error"); +call mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("Plugin 'wsrep' registration as a FUNCTION failed"); +call mtr.add_suppression("Failed to initialize plugins"); connection node_2; SET SESSION wsrep_sync_wait = 0; Killing server ... diff --git a/mysql-test/suite/galera/r/GCF-939.result b/mysql-test/suite/galera/r/GCF-939.result index 24d4eab67e5..f9b65bced42 100644 --- a/mysql-test/suite/galera/r/GCF-939.result +++ b/mysql-test/suite/galera/r/GCF-939.result @@ -8,6 +8,6 @@ INSERT INTO t1 VALUES (1); GRA_.log GRA_.log DROP TABLE t1; -CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query"); +CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query"); connection node_2; -CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query"); +CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query"); diff --git a/mysql-test/suite/galera/r/MDEV-21479.result b/mysql-test/suite/galera/r/MDEV-21479.result index 7d1220a038b..de00413bdcc 100644 --- a/mysql-test/suite/galera/r/MDEV-21479.result +++ b/mysql-test/suite/galera/r/MDEV-21479.result @@ -66,7 +66,7 @@ SHOW STATUS LIKE 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 SET @@global.wsrep_desync = 0; -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); connection node_1; # Wait until both nodes are back to cluster SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=false'; diff --git a/mysql-test/suite/galera/r/MDEV-26575.result b/mysql-test/suite/galera/r/MDEV-26575.result index 5b447e1ae20..0856c836f7e 100644 --- a/mysql-test/suite/galera/r/MDEV-26575.result +++ b/mysql-test/suite/galera/r/MDEV-26575.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); connection node_1; connection node_1; connection node_2; diff --git a/mysql-test/suite/galera/r/MDEV-29142.result b/mysql-test/suite/galera/r/MDEV-29142.result index 2528520e236..370cbf5b074 100644 --- a/mysql-test/suite/galera/r/MDEV-29142.result +++ b/mysql-test/suite/galera/r/MDEV-29142.result @@ -3,14 +3,14 @@ connection node_1; connection node_1; connection node_2; connection node_1; -call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*"); -call mtr.add_suppression("WSREP: Failed to apply write set:.*"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed: "); +call mtr.add_suppression("WSREP: Failed to apply write set: "); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); connection node_2; -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); SET @@global.tx_read_only = ON; SET default_storage_engine = SEQUENCE; create table t1 (c1 int); @@ -39,7 +39,7 @@ connection node_1; SET SESSION wsrep_sync_wait = 0; Killing server ... connection node_2; -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); DROP TABLE IF EXISTS t1; diff --git a/mysql-test/suite/galera/r/MW-284.result b/mysql-test/suite/galera/r/MW-284.result index 6ca1f16db6b..ba8b67e9c31 100644 --- a/mysql-test/suite/galera/r/MW-284.result +++ b/mysql-test/suite/galera/r/MW-284.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; -call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use "); call mtr.add_suppression("WSREP has not yet prepared node for application use"); connection node_1; CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/r/MW-329.result b/mysql-test/suite/galera/r/MW-329.result index 54d55eea7ca..16afcc15996 100644 --- a/mysql-test/suite/galera/r/MW-329.result +++ b/mysql-test/suite/galera/r/MW-329.result @@ -1,6 +1,5 @@ connection node_2; connection node_1; -CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*"); CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; INSERT INTO t1 (f1) VALUES (1),(65535); CREATE PROCEDURE proc_insert () @@ -19,5 +18,5 @@ connection node_1b; connection node_1; DROP PROCEDURE proc_insert; DROP TABLE t1; -CALL mtr.add_suppression("conflict state 3 after post commit"); +CALL mtr.add_suppression("WSREP: .* conflict state after post commit "); set global innodb_status_output=Default; diff --git a/mysql-test/suite/galera/r/galera#500.result b/mysql-test/suite/galera/r/galera#500.result index a5ab0b19718..a142e966e94 100644 --- a/mysql-test/suite/galera/r/galera#500.result +++ b/mysql-test/suite/galera/r/galera#500.result @@ -15,4 +15,4 @@ SET GLOBAL wsrep_provider_options="pc.bootstrap=1"; connection node_2; SET SESSION wsrep_on=0; connection node_2; -CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2."); +CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast\\.isolate=2\\."); diff --git a/mysql-test/suite/galera/r/galera-features#117.result b/mysql-test/suite/galera/r/galera-features#117.result index 21d810ca165..900e4fe2aac 100644 --- a/mysql-test/suite/galera/r/galera-features#117.result +++ b/mysql-test/suite/galera/r/galera-features#117.result @@ -34,7 +34,7 @@ SHOW TABLES IN test; Tables_in_test t1 Killing server ... -CALL mtr.add_suppression("Inconsistent by consensus."); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("WSREP: Failed to execute TOI action"); CALL mtr.add_suppression("WSREP: TO isolation end failed"); connection node_1; diff --git a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result index 5233ea6c63c..1015e7b652d 100644 --- a/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result +++ b/mysql-test/suite/galera/r/galera_bf_abort_shutdown.result @@ -5,7 +5,7 @@ connection node_2; connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY); connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue'; INSERT INTO t1 VALUES (1); connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; diff --git a/mysql-test/suite/galera/r/galera_desync_overlapped.result b/mysql-test/suite/galera/r/galera_desync_overlapped.result index f7aa7a1c5df..69ae5e2766d 100644 --- a/mysql-test/suite/galera/r/galera_desync_overlapped.result +++ b/mysql-test/suite/galera/r/galera_desync_overlapped.result @@ -36,6 +36,7 @@ Warning 1231 'wsrep_desync' is already OFF. show status like 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 +call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized\\."); show status like 'wsrep_desync_count'; Variable_name Value wsrep_desync_count 0 diff --git a/mysql-test/suite/galera/r/galera_drop_database.result b/mysql-test/suite/galera/r/galera_drop_database.result index 03b55136c6f..ed94678c08e 100644 --- a/mysql-test/suite/galera/r/galera_drop_database.result +++ b/mysql-test/suite/galera/r/galera_drop_database.result @@ -48,6 +48,6 @@ SHOW TABLES; Tables_in_fts DROP DATABASE fts; connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); Warnings: Note 1049 Unknown database 'fts' diff --git a/mysql-test/suite/galera/r/galera_drop_multi.result b/mysql-test/suite/galera/r/galera_drop_multi.result index 1ff8afe3219..7934d6e0f15 100644 --- a/mysql-test/suite/galera/r/galera_drop_multi.result +++ b/mysql-test/suite/galera/r/galera_drop_multi.result @@ -19,6 +19,6 @@ SHOW CREATE TABLE t3; ERROR 42S02: Table 'test.t3' doesn't exist SHOW CREATE TABLE t4; ERROR 42S02: Table 'test.t4' doesn't exist -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t2,test\\.t4'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); connection node_1; DROP TABLE t5; diff --git a/mysql-test/suite/galera/r/galera_events2.result b/mysql-test/suite/galera/r/galera_events2.result index 26d3a74a7f3..5cbee44f186 100644 --- a/mysql-test/suite/galera/r/galera_events2.result +++ b/mysql-test/suite/galera/r/galera_events2.result @@ -111,7 +111,7 @@ f1 f2 SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD STATUS ON_COMPLETION EVENT_COMMENT def test one_event root@localhost SQL SELECT 123 RECURRING NULL 10 SECOND SLAVESIDE_DISABLED NOT PRESERVE -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); connection node_1; SELECT * FROM t1; f1 f2 diff --git a/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result b/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result index cae5f723c51..a8a51b278bd 100644 --- a/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result +++ b/mysql-test/suite/galera/r/galera_forced_binlog_format_ctas.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since "); SET GLOBAL wsrep_forced_binlog_format=ROW; connection node_1; CREATE TABLE t1(a int not null primary key auto_increment, b int) ENGINE=InnoDB; diff --git a/mysql-test/suite/galera/r/galera_gra_log.result b/mysql-test/suite/galera/r/galera_gra_log.result index 8c0286a4ef1..128509a220f 100644 --- a/mysql-test/suite/galera/r/galera_gra_log.result +++ b/mysql-test/suite/galera/r/galera_gra_log.result @@ -35,4 +35,4 @@ ROLLBACK /* added by mysqlbinlog */; Killing server ... SET GLOBAL wsrep_ignore_apply_errors = 7; DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); diff --git a/mysql-test/suite/galera/r/galera_gtid_server_id.result b/mysql-test/suite/galera/r/galera_gtid_server_id.result index 8765fcc1636..5acf4519d0c 100644 --- a/mysql-test/suite/galera/r/galera_gtid_server_id.result +++ b/mysql-test/suite/galera/r/galera_gtid_server_id.result @@ -5,7 +5,7 @@ select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; @@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode 0 11 1 1 connection node_2; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; @@gtid_domain_id @@server_id @@wsrep_gtid_domain_id @@wsrep_gtid_mode 0 12 1 1 diff --git a/mysql-test/suite/galera/r/galera_ist_mysqldump.result b/mysql-test/suite/galera/r/galera_ist_mysqldump.result index 6c57a571b85..8737819e552 100644 --- a/mysql-test/suite/galera/r/galera_ist_mysqldump.result +++ b/mysql-test/suite/galera/r/galera_ist_mysqldump.result @@ -1,15 +1,15 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; SET GLOBAL wsrep_sst_auth = 'sst:'; connection node_2; SET GLOBAL wsrep_sst_method = 'mysqldump'; -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to "); connection node_1; connection node_2; Performing State Transfer on a server that has been shut down cleanly and restarted @@ -364,4 +364,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); diff --git a/mysql-test/suite/galera/r/galera_kill_ddl.result b/mysql-test/suite/galera/r/galera_kill_ddl.result index 33a1b19095f..34d2cc0be76 100644 --- a/mysql-test/suite/galera/r/galera_kill_ddl.result +++ b/mysql-test/suite/galera/r/galera_kill_ddl.result @@ -3,7 +3,7 @@ connection node_1; connection node_1; connection node_2; connection node_1; -call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member "); SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true'; CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; connection node_2; diff --git a/mysql-test/suite/galera/r/galera_partition.result b/mysql-test/suite/galera/r/galera_partition.result index 7b4d6e41054..ca335984ab4 100644 --- a/mysql-test/suite/galera/r/galera_partition.result +++ b/mysql-test/suite/galera/r/galera_partition.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; connection node_1; -call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); connection node_1; CREATE TABLE t1( diff --git a/mysql-test/suite/galera/r/galera_query_cache_invalidate.result b/mysql-test/suite/galera/r/galera_query_cache_invalidate.result index 98438b3b527..425b512bc03 100644 --- a/mysql-test/suite/galera/r/galera_query_cache_invalidate.result +++ b/mysql-test/suite/galera/r/galera_query_cache_invalidate.result @@ -3,9 +3,9 @@ connection node_1; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4; connection node_2; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); connection node_4; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); connection node_3; CHANGE MASTER TO master_host='127.0.0.1', master_user='root', master_port=NODE_MYPORT_1, master_use_gtid=current_pos;; START SLAVE; diff --git a/mysql-test/suite/galera/r/galera_replica_no_gtid.result b/mysql-test/suite/galera/r/galera_replica_no_gtid.result index 80d713c2348..f4b1a344400 100644 --- a/mysql-test/suite/galera/r/galera_replica_no_gtid.result +++ b/mysql-test/suite/galera/r/galera_replica_no_gtid.result @@ -37,7 +37,7 @@ connection node_2; # Start node_2 again ยค Wait until node_2 is back on cluster connection node_2; -call mtr.add_suppression("Slave: Operation CREATE USER failed for .*"); +call mtr.add_suppression("Slave: Operation CREATE USER failed for "); SELECT COUNT(*) AS EXPECT_0 FROM mysql.gtid_slave_pos; EXPECT_0 0 diff --git a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result index b1ee6f5955f..221ccc76afd 100644 --- a/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result +++ b/mysql-test/suite/galera/r/galera_restart_on_unknown_option.result @@ -41,7 +41,7 @@ f1 f2 connection node_2; Starting server ... Starting server ... -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SELECT * FROM t1; f1 f2 1 a diff --git a/mysql-test/suite/galera/r/galera_ssl_compression.result b/mysql-test/suite/galera/r/galera_ssl_compression.result index 0acc4b97eea..545f4babfe1 100644 --- a/mysql-test/suite/galera/r/galera_ssl_compression.result +++ b/mysql-test/suite/galera/r/galera_ssl_compression.result @@ -24,5 +24,5 @@ COUNT(*) = 1 1 connection node_1; DROP TABLE t1; -CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'"); +CALL mtr.add_suppression("Unknown parameter 'socket\\.ssl_compression'"); CALL mtr.add_suppression("Set options returned 7"); diff --git a/mysql-test/suite/galera/r/galera_ssl_upgrade.result b/mysql-test/suite/galera/r/galera_ssl_upgrade.result index 9993b86e0e9..9030850b67e 100644 --- a/mysql-test/suite/galera/r/galera_ssl_upgrade.result +++ b/mysql-test/suite/galera/r/galera_ssl_upgrade.result @@ -1,10 +1,6 @@ connection node_2; connection node_1; connection node_1; -call mtr.add_suppression("WSREP: write_handler().*"); -connection node_2; -call mtr.add_suppression("WSREP: write_handler():.*"); -connection node_1; connection node_2; connection node_1; connection node_2; @@ -28,6 +24,6 @@ VARIABLE_VALUE = 2 1 connection node_2; connection node_1; -call mtr.add_suppression("WSREP: write_handler().*"); +call mtr.add_suppression("WSREP: write_handler\\(\\)"); connection node_2; -call mtr.add_suppression("WSREP: write_handler():.*"); +call mtr.add_suppression("WSREP: write_handler\\(\\)"); diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump.result b/mysql-test/suite/galera/r/galera_sst_mysqldump.result index e63b6f6f98d..e76d72383c1 100644 --- a/mysql-test/suite/galera/r/galera_sst_mysqldump.result +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -708,4 +708,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); diff --git a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result index fcb250f02ce..fe574abf93f 100644 --- a/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result +++ b/mysql-test/suite/galera/r/galera_sst_mysqldump_with_key.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -368,5 +368,5 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); DROP USER sslsst; diff --git a/mysql-test/suite/galera/r/galera_toi_ddl_error.result b/mysql-test/suite/galera/r/galera_toi_ddl_error.result index 9aec137d010..d9e66dc537b 100644 --- a/mysql-test/suite/galera/r/galera_toi_ddl_error.result +++ b/mysql-test/suite/galera/r/galera_toi_ddl_error.result @@ -21,6 +21,6 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; DROP TABLE ten; -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); connection node_2; -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); diff --git a/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result index 082d2e8eb1d..0b32f43704f 100644 --- a/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result +++ b/mysql-test/suite/galera/r/galera_var_ignore_apply_errors.result @@ -178,9 +178,9 @@ connection node_2; SET GLOBAL wsrep_ignore_apply_errors = 7; CALL mtr.add_suppression("Can't find record in 't.*'"); CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event"); -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query."); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t1'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query\\. Default database: 'test'\\. Query: 'DROP SCHEMA s1', Error_code: 1008"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\."); diff --git a/mysql-test/suite/galera/r/galera_var_slave_threads.result b/mysql-test/suite/galera/r/galera_var_slave_threads.result index 36dc79bdf82..936f58b89a0 100644 --- a/mysql-test/suite/galera/r/galera_var_slave_threads.result +++ b/mysql-test/suite/galera/r/galera_var_slave_threads.result @@ -6,7 +6,7 @@ connection node_1; CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB; connection node_2; -CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread."); +CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread\\."); SET GLOBAL wsrep_slave_threads = 0; Warnings: Warning 1292 Truncated incorrect wsrep_slave_threads value: '0' diff --git a/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result index 3d409f90eac..fe0bdaa404f 100644 --- a/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result +++ b/mysql-test/suite/galera/r/galera_var_wsrep_start_position.result @@ -3,7 +3,7 @@ connection node_1; # # wsrep_start_position # -CALL mtr.add_suppression("WSREP: SST failed for position .*"); +CALL mtr.add_suppression("WSREP: SST failed for position "); SET @wsrep_start_position_global_saved = @@global.wsrep_start_position; # default SELECT @@global.wsrep_start_position; diff --git a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result index ff0063fbf7b..fa0d7d83c80 100644 --- a/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result +++ b/mysql-test/suite/galera/r/galera_vote_rejoin_ddl.result @@ -53,7 +53,7 @@ expect_0 SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; expect_1 1 -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); connection node_4; SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; expect_0 @@ -61,7 +61,7 @@ expect_0 SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; expect_1 1 -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); DROP TABLE t2; disconnect node_3; disconnect node_4; diff --git a/mysql-test/suite/galera/r/galera_wan.result b/mysql-test/suite/galera/r/galera_wan.result index bc4113ffb1c..0021b509bf2 100644 --- a/mysql-test/suite/galera/r/galera_wan.result +++ b/mysql-test/suite/galera/r/galera_wan.result @@ -1,9 +1,9 @@ connection node_2; connection node_1; -CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*"); -CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +CALL mtr.add_suppression("WSREP: Stray state UUID msg:"); +CALL mtr.add_suppression("Sending JOIN failed: "); +CALL mtr.add_suppression("WSREP: .* sending install message failed: Socket is not connected"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 4 1 diff --git a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result index 0f7cd134156..5b35bdcef10 100644 --- a/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result +++ b/mysql-test/suite/galera/r/galera_wsrep_provider_options_syntax.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'"); +call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\\.segment'"); call mtr.add_suppression("WSREP\: Set options returned 7"); SET GLOBAL wsrep_provider_options="gmcasts.segment=1"; ERROR HY000: Incorrect arguments to SET diff --git a/mysql-test/suite/galera/r/mdev-28433.result b/mysql-test/suite/galera/r/mdev-28433.result index c2dde6481f4..dc5fdd5be49 100644 --- a/mysql-test/suite/galera/r/mdev-28433.result +++ b/mysql-test/suite/galera/r/mdev-28433.result @@ -19,7 +19,7 @@ wsrep_ready OFF SHOW STATUS LIKE 'wsrep_cluster_status'; Variable_name Value wsrep_cluster_status Disconnected -call mtr.add_suppression("WSREP: .*Invalid backend URI.*"); +call mtr.add_suppression("WSREP: .*Invalid backend URI"); call mtr.add_suppression("WSREP: gcs connect failed: Invalid argument"); disconnect node_2; disconnect node_1; diff --git a/mysql-test/suite/galera/r/mdev-31651.result b/mysql-test/suite/galera/r/mdev-31651.result index f715aa895f8..15c56a71344 100644 --- a/mysql-test/suite/galera/r/mdev-31651.result +++ b/mysql-test/suite/galera/r/mdev-31651.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field.*"); -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table.*"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table"); CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b)) engine=innodb; BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w='; BINLOG 'wlZOTxMBAAAAKgAAADwCAAAAACkAAAAAAAEABHRlc3QAAnQxAAIDAwAC wlZOTxcBAAAAJgAAAGICAAAAACkAAAAAAAEAAv/8AgAAAAgAAAA='; diff --git a/mysql-test/suite/galera/r/mysql-wsrep#33.result b/mysql-test/suite/galera/r/mysql-wsrep#33.result index 2c116347fca..ef4240869a8 100644 --- a/mysql-test/suite/galera/r/mysql-wsrep#33.result +++ b/mysql-test/suite/galera/r/mysql-wsrep#33.result @@ -3,8 +3,8 @@ connection node_1; connection node_1; connection node_2; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -709,6 +709,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); SET GLOBAL general_log = ON; SET GLOBAL slow_query_log = ON; diff --git a/mysql-test/suite/galera/r/versioning_trx_id.result b/mysql-test/suite/galera/r/versioning_trx_id.result index c28662dcfe6..099be737e65 100644 --- a/mysql-test/suite/galera/r/versioning_trx_id.result +++ b/mysql-test/suite/galera/r/versioning_trx_id.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("Sending JOIN failed:.*"); +call mtr.add_suppression("Sending JOIN failed: "); connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; connection node_1; create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning; diff --git a/mysql-test/suite/galera/t/GAL-401.test b/mysql-test/suite/galera/t/GAL-401.test index 06ce37dc81f..243fde23642 100644 --- a/mysql-test/suite/galera/t/GAL-401.test +++ b/mysql-test/suite/galera/t/GAL-401.test @@ -48,7 +48,7 @@ SET @@global.wsrep_desync = 0; SET SESSION wsrep_sync_wait=15; SHOW CREATE TABLE t1; DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); --connection node_1 --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; diff --git a/mysql-test/suite/galera/t/GAL-419.test b/mysql-test/suite/galera/t/GAL-419.test index 60c34f209eb..699a8e54361 100644 --- a/mysql-test/suite/galera/t/GAL-419.test +++ b/mysql-test/suite/galera/t/GAL-419.test @@ -5,11 +5,12 @@ --source include/galera_cluster.inc --source include/big_test.inc -call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node.*"); +call mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); call mtr.add_suppression("Aborting"); -call mtr.add_suppression("Plugin \'wsrep\' init function returned error."); -call mtr.add_suppression("Plugin \'wsrep\' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("Failed to initialize plugins."); +call mtr.add_suppression("Plugin 'wsrep' init function returned error"); +call mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed"); +call mtr.add_suppression("Plugin 'wsrep' registration as a FUNCTION failed"); +call mtr.add_suppression("Failed to initialize plugins"); --connection node_2 SET SESSION wsrep_sync_wait = 0; diff --git a/mysql-test/suite/galera/t/GCF-939.test b/mysql-test/suite/galera/t/GCF-939.test index 637d656996e..62bcdb818c7 100644 --- a/mysql-test/suite/galera/t/GCF-939.test +++ b/mysql-test/suite/galera/t/GCF-939.test @@ -25,7 +25,6 @@ INSERT INTO t1 VALUES (1); --list_files $MYSQLTEST_VARDIR/mysqld.2/data GRA_*.log DROP TABLE t1; -CALL mtr.add_suppression("Ignoring error 'Unknown table 'test.t1'' on query"); +CALL mtr.add_suppression("Ignoring error 'Unknown table 'test\\.t1'' on query"); --connection node_2 -CALL mtr.add_suppression("Error 'Unknown table 'test.t1'' on query"); - +CALL mtr.add_suppression("Error 'Unknown table 'test\\.t1'' on query"); diff --git a/mysql-test/suite/galera/t/MDEV-21479.test b/mysql-test/suite/galera/t/MDEV-21479.test index 86de97ea77c..17451b3bb77 100644 --- a/mysql-test/suite/galera/t/MDEV-21479.test +++ b/mysql-test/suite/galera/t/MDEV-21479.test @@ -77,7 +77,7 @@ SET @@global.wsrep_desync = 0; --let $wait_condition = SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; --source include/wait_condition.inc -CALL mtr.add_suppression("WSREP: Protocol violation. JOIN message sender (.*) is not in state transfer \\(SYNCED\\). Message ignored."); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender (.*) is not in state transfer \\(SYNCED\\)\\. Message ignored\\."); --connection node_1 --echo # Wait until both nodes are back to cluster diff --git a/mysql-test/suite/galera/t/MDEV-26575.test b/mysql-test/suite/galera/t/MDEV-26575.test index 4554f632c6f..acb5ee2494f 100644 --- a/mysql-test/suite/galera/t/MDEV-26575.test +++ b/mysql-test/suite/galera/t/MDEV-26575.test @@ -6,7 +6,7 @@ --source include/galera_cluster.inc --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --connection node_1 # Save original auto_increment_offset values. diff --git a/mysql-test/suite/galera/t/MDEV-29142.test b/mysql-test/suite/galera/t/MDEV-29142.test index f7a8b329089..2dc48a74a9d 100644 --- a/mysql-test/suite/galera/t/MDEV-29142.test +++ b/mysql-test/suite/galera/t/MDEV-29142.test @@ -8,15 +8,15 @@ --source include/auto_increment_offset_save.inc --connection node_1 -call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*"); -call mtr.add_suppression("WSREP: Failed to apply write set:.*"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed: "); +call mtr.add_suppression("WSREP: Failed to apply write set: "); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); --connection node_2 -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); -call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*"); +call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); SET @@global.tx_read_only = ON; --error 0,1286 @@ -59,7 +59,7 @@ SET SESSION wsrep_sync_wait = 0; --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --source include/start_mysqld.inc -call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing"); +call mtr.add_suppression("WSREP: Failed to open table mysql\\.wsrep_streaming_log for writing"); call mtr.add_suppression("WSREP: Failed to open SR table for write"); call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0"); diff --git a/mysql-test/suite/galera/t/MW-284.test b/mysql-test/suite/galera/t/MW-284.test index d7da1dcd214..bc630912d57 100644 --- a/mysql-test/suite/galera/t/MW-284.test +++ b/mysql-test/suite/galera/t/MW-284.test @@ -6,7 +6,7 @@ --source include/galera_cluster.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 -call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*"); +call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use "); call mtr.add_suppression("WSREP has not yet prepared node for application use"); --disable_query_log diff --git a/mysql-test/suite/galera/t/MW-329.test b/mysql-test/suite/galera/t/MW-329.test index 904fc2f95d8..38f2007f6b6 100644 --- a/mysql-test/suite/galera/t/MW-329.test +++ b/mysql-test/suite/galera/t/MW-329.test @@ -5,7 +5,6 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -CALL mtr.add_suppression("WSREP: .*conflict state . after post commit .*"); CREATE TABLE t1 (f1 INTEGER, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB; # We start with a populated table @@ -78,7 +77,6 @@ while ($count) --eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old > 0 AS wsrep_local_replays; --enable_query_log - # # Terminate the stored procedure # @@ -99,6 +97,6 @@ DROP PROCEDURE proc_insert; DROP TABLE t1; # Due to MW-330, Multiple "conflict state 3 after post commit" warnings if table is dropped while SP is running -CALL mtr.add_suppression("conflict state 3 after post commit"); +CALL mtr.add_suppression("WSREP: .* conflict state after post commit "); -set global innodb_status_output=Default; \ No newline at end of file +set global innodb_status_output=Default; diff --git a/mysql-test/suite/galera/t/MW-369.test b/mysql-test/suite/galera/t/MW-369.test index 0efac20dbe0..157993a3eb4 100644 --- a/mysql-test/suite/galera/t/MW-369.test +++ b/mysql-test/suite/galera/t/MW-369.test @@ -340,4 +340,3 @@ SELECT * FROM cg; DROP TABLE cg; DROP TABLE pg; - diff --git a/mysql-test/suite/galera/t/enforce_storage_engine2.cnf b/mysql-test/suite/galera/t/enforce_storage_engine2.cnf index b14fce85b36..590c4afd4d9 100644 --- a/mysql-test/suite/galera/t/enforce_storage_engine2.cnf +++ b/mysql-test/suite/galera/t/enforce_storage_engine2.cnf @@ -7,7 +7,3 @@ sql_mode='' [mysqld.2] enforce_storage_engine=innodb sql_mode='' - - - - diff --git a/mysql-test/suite/galera/t/galera#414.cnf b/mysql-test/suite/galera/t/galera#414.cnf index fbd1c58754f..03e7214b76f 100644 --- a/mysql-test/suite/galera/t/galera#414.cnf +++ b/mysql-test/suite/galera/t/galera#414.cnf @@ -5,4 +5,3 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=2' [mysqld.2] wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=2' - diff --git a/mysql-test/suite/galera/t/galera#500.test b/mysql-test/suite/galera/t/galera#500.test index 471620b32c1..c393b7fd056 100644 --- a/mysql-test/suite/galera/t/galera#500.test +++ b/mysql-test/suite/galera/t/galera#500.test @@ -40,6 +40,6 @@ SET SESSION wsrep_on=0; --source include/restart_mysqld.inc --connection node_2 -CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast.isolate=2."); +CALL mtr.add_suppression("WSREP: exception from gcomm, backend must be restarted: Gcomm backend termination was requested by setting gmcast\\.isolate=2\\."); --source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera-features#117.test b/mysql-test/suite/galera/t/galera-features#117.test index 30301996d1c..9a3eaf8686e 100644 --- a/mysql-test/suite/galera/t/galera-features#117.test +++ b/mysql-test/suite/galera/t/galera-features#117.test @@ -38,7 +38,7 @@ SHOW TABLES IN test; --source include/wait_until_disconnected.inc --source include/start_mysqld.inc -CALL mtr.add_suppression("Inconsistent by consensus."); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("WSREP: Failed to execute TOI action"); CALL mtr.add_suppression("WSREP: TO isolation end failed"); diff --git a/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test index 6eb1cd9f4b2..a9109ac42d8 100644 --- a/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test +++ b/mysql-test/suite/galera/t/galera_bf_abort_shutdown.test @@ -18,7 +18,7 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY); --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SET DEBUG_SYNC = 'wsrep_before_certification WAIT_FOR continue'; --send INSERT INTO t1 VALUES (1) diff --git a/mysql-test/suite/galera/t/galera_defaults.test b/mysql-test/suite/galera/t/galera_defaults.test index 28e6f0cce38..74022a40b3a 100644 --- a/mysql-test/suite/galera/t/galera_defaults.test +++ b/mysql-test/suite/galera/t/galera_defaults.test @@ -13,7 +13,7 @@ --source include/force_restart.inc # Make sure that the test is operating on the right version of galera library. ---let $galera_version=26.4.6 +--let $galera_version=26.4.8 source ../wsrep/include/check_galera_version.inc; # Global Variables diff --git a/mysql-test/suite/galera/t/galera_desync_overlapped.test b/mysql-test/suite/galera/t/galera_desync_overlapped.test index 659e4a2e1e2..2d94011690b 100644 --- a/mysql-test/suite/galera/t/galera_desync_overlapped.test +++ b/mysql-test/suite/galera/t/galera_desync_overlapped.test @@ -46,9 +46,7 @@ show status like 'wsrep_desync_count'; SET GLOBAL wsrep_desync = 0; show status like 'wsrep_desync_count'; ---disable_query_log -call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized."); ---enable_query_log +call mtr.add_suppression("Trying to make wsrep_desync = OFF on the node that is already synchronized\\."); show status like 'wsrep_desync_count'; SET GLOBAL wsrep_desync = 0; diff --git a/mysql-test/suite/galera/t/galera_drop_database.test b/mysql-test/suite/galera/t/galera_drop_database.test index c1a66e1f66c..7bffe94287d 100644 --- a/mysql-test/suite/galera/t/galera_drop_database.test +++ b/mysql-test/suite/galera/t/galera_drop_database.test @@ -56,7 +56,7 @@ SHOW TABLES; DROP DATABASE fts; --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'fts_t1'; --source include/wait_condition.inc --let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'fts_t2'; diff --git a/mysql-test/suite/galera/t/galera_drop_multi.test b/mysql-test/suite/galera/t/galera_drop_multi.test index 44b1b619b2b..920c089185e 100644 --- a/mysql-test/suite/galera/t/galera_drop_multi.test +++ b/mysql-test/suite/galera/t/galera_drop_multi.test @@ -35,7 +35,7 @@ SHOW CREATE TABLE t3; --error ER_NO_SUCH_TABLE SHOW CREATE TABLE t4; -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t2,test.t4'' on query\. Default database: 'test'\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t2,test\\.t4'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1, t2, t3, t4', Error_code: 1051"); --connection node_1 DROP TABLE t5; diff --git a/mysql-test/suite/galera/t/galera_events2.test b/mysql-test/suite/galera/t/galera_events2.test index b29ad3ba2f2..6f200257e16 100644 --- a/mysql-test/suite/galera/t/galera_events2.test +++ b/mysql-test/suite/galera/t/galera_events2.test @@ -137,7 +137,7 @@ SELECT * FROM t1; --echo # node_2 Event should be SERVERSIDE_DISABLED SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='one_event'; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --connection node_1 SELECT * FROM t1; diff --git a/mysql-test/suite/galera/t/galera_fk_truncate.test b/mysql-test/suite/galera/t/galera_fk_truncate.test index 9d54a720432..61b0f562065 100644 --- a/mysql-test/suite/galera/t/galera_fk_truncate.test +++ b/mysql-test/suite/galera/t/galera_fk_truncate.test @@ -1,4 +1,5 @@ --source include/galera_cluster.inc +--source include/have_innodb.inc CREATE TABLE author ( id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, diff --git a/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test b/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test index bb9cb6a9403..6260acaba2f 100644 --- a/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test +++ b/mysql-test/suite/galera/t/galera_forced_binlog_format_ctas.test @@ -1,6 +1,6 @@ --source include/galera_cluster.inc -call mtr.add_suppression("Unsafe statement written to the binary log using statement format since.*"); +call mtr.add_suppression("Unsafe statement written to the binary log using statement format since "); SET GLOBAL wsrep_forced_binlog_format=ROW; diff --git a/mysql-test/suite/galera/t/galera_gra_log.test b/mysql-test/suite/galera/t/galera_gra_log.test index 23561d9a2b1..ad19bb44118 100644 --- a/mysql-test/suite/galera/t/galera_gra_log.test +++ b/mysql-test/suite/galera/t/galera_gra_log.test @@ -43,7 +43,7 @@ CREATE TABLE t1 (f1 INTEGER); --eval SET GLOBAL wsrep_ignore_apply_errors = $restore_wsrep_ignore_apply_errors DROP TABLE t1; -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); # Restore original auto_increment_offset values. --source include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera/t/galera_gtid_server_id.test b/mysql-test/suite/galera/t/galera_gtid_server_id.test index 9bb07371f92..f61bef4909b 100644 --- a/mysql-test/suite/galera/t/galera_gtid_server_id.test +++ b/mysql-test/suite/galera/t/galera_gtid_server_id.test @@ -3,7 +3,7 @@ --connection node_1 select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; --connection node_2 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); select @@gtid_domain_id, @@server_id, @@wsrep_gtid_domain_id,@@wsrep_gtid_mode; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_ist_mysqldump.test b/mysql-test/suite/galera/t/galera_ist_mysqldump.test index 7bfca0334fa..73b406d016b 100644 --- a/mysql-test/suite/galera/t/galera_ist_mysqldump.test +++ b/mysql-test/suite/galera/t/galera_ist_mysqldump.test @@ -4,7 +4,7 @@ --source suite/galera/include/galera_sst_set_mysqldump.inc -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to .*"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to "); --let $node_1=node_1 --let $node_2=node_2 diff --git a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test index 940b511f752..0c31cf4ab58 100644 --- a/mysql-test/suite/galera/t/galera_ist_restart_joiner.test +++ b/mysql-test/suite/galera/t/galera_ist_restart_joiner.test @@ -96,4 +96,3 @@ DROP TABLE t1; --source include/auto_increment_offset_restore.inc --source include/galera_end.inc - diff --git a/mysql-test/suite/galera/t/galera_kill_ddl.test b/mysql-test/suite/galera/t/galera_kill_ddl.test index 1034b81eddf..2b59bcbad95 100644 --- a/mysql-test/suite/galera/t/galera_kill_ddl.test +++ b/mysql-test/suite/galera/t/galera_kill_ddl.test @@ -11,7 +11,7 @@ --source include/auto_increment_offset_save.inc --connection node_1 -call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member .*"); +call mtr.add_suppression("WSREP: Last Applied Action message in non-primary configuration from member "); # Enable the master to continue running during the split-brain situation that # occurs when the slave is killed diff --git a/mysql-test/suite/galera/t/galera_partition.test b/mysql-test/suite/galera/t/galera_partition.test index d69f87b6472..d85ec5f5994 100644 --- a/mysql-test/suite/galera/t/galera_partition.test +++ b/mysql-test/suite/galera/t/galera_partition.test @@ -6,7 +6,7 @@ --connection node_1 -call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*"); +call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER"); call mtr.add_suppression("WSREP: ALTER TABLE isolation failure"); --connection node_1 @@ -438,6 +438,3 @@ reap; --connection node_1 DROP TABLE t1; DROP PROCEDURE p1; - - - diff --git a/mysql-test/suite/galera/t/galera_query_cache_invalidate.test b/mysql-test/suite/galera/t/galera_query_cache_invalidate.test index d72d8a9ba40..fde02d6b9a8 100644 --- a/mysql-test/suite/galera/t/galera_query_cache_invalidate.test +++ b/mysql-test/suite/galera/t/galera_query_cache_invalidate.test @@ -22,9 +22,9 @@ --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 --connection node_2 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); --connection node_4 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); --connection node_3 diff --git a/mysql-test/suite/galera/t/galera_replica_no_gtid.test b/mysql-test/suite/galera/t/galera_replica_no_gtid.test index 8cc88ef211a..12e9038dc1c 100644 --- a/mysql-test/suite/galera/t/galera_replica_no_gtid.test +++ b/mysql-test/suite/galera/t/galera_replica_no_gtid.test @@ -87,7 +87,7 @@ SELECT COUNT(*) AS EXPECT_10000 FROM t1; --source include/wait_condition.inc --connection node_2 -call mtr.add_suppression("Slave: Operation CREATE USER failed for .*"); +call mtr.add_suppression("Slave: Operation CREATE USER failed for "); SELECT COUNT(*) AS EXPECT_0 FROM mysql.gtid_slave_pos; SELECT COUNT(*) AS EXPECT_10000 FROM t1; diff --git a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test index e3a8b749cb4..9a11a174dfe 100644 --- a/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test +++ b/mysql-test/suite/galera/t/galera_restart_on_unknown_option.test @@ -125,7 +125,7 @@ SELECT * FROM t1; # Sanity check (node 2 is running now and can perform SQL operators): -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); SELECT * FROM t1; --connection node_1 diff --git a/mysql-test/suite/galera/t/galera_ssl_compression.test b/mysql-test/suite/galera/t/galera_ssl_compression.test index 75f92c5b2f4..1df4aa26ebb 100644 --- a/mysql-test/suite/galera/t/galera_ssl_compression.test +++ b/mysql-test/suite/galera/t/galera_ssl_compression.test @@ -31,5 +31,5 @@ SELECT COUNT(*) = 1 FROM t1 WHERE f1 = REPEAT('a', 333) AND f2 = REPEAT('b', 655 --connection node_1 DROP TABLE t1; -CALL mtr.add_suppression("Unknown parameter 'socket\.ssl_compression'"); +CALL mtr.add_suppression("Unknown parameter 'socket\\.ssl_compression'"); CALL mtr.add_suppression("Set options returned 7"); diff --git a/mysql-test/suite/galera/t/galera_ssl_upgrade.test b/mysql-test/suite/galera/t/galera_ssl_upgrade.test index 2c55238809f..c09615527fd 100644 --- a/mysql-test/suite/galera/t/galera_ssl_upgrade.test +++ b/mysql-test/suite/galera/t/galera_ssl_upgrade.test @@ -8,11 +8,6 @@ --source include/have_innodb.inc --source include/have_ssl_communication.inc ---connection node_1 -call mtr.add_suppression("WSREP: write_handler().*"); ---connection node_2 -call mtr.add_suppression("WSREP: write_handler():.*"); - # Save original auto_increment_offset values. --let $node_1=node_1 --let $node_2=node_2 @@ -77,7 +72,6 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --source include/auto_increment_offset_restore.inc --connection node_1 -call mtr.add_suppression("WSREP: write_handler().*"); +call mtr.add_suppression("WSREP: write_handler\\(\\)"); --connection node_2 -call mtr.add_suppression("WSREP: write_handler():.*"); - +call mtr.add_suppression("WSREP: write_handler\\(\\)"); diff --git a/mysql-test/suite/galera/t/galera_toi_ddl_error.test b/mysql-test/suite/galera/t/galera_toi_ddl_error.test index 6ee2a6e9b16..474828311b9 100644 --- a/mysql-test/suite/galera/t/galera_toi_ddl_error.test +++ b/mysql-test/suite/galera/t/galera_toi_ddl_error.test @@ -28,7 +28,7 @@ SHOW CREATE TABLE t1; DROP TABLE t1; DROP TABLE ten; -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); --connection node_2 -CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query."); \ No newline at end of file +CALL mtr.add_suppression("Ignoring error 'Duplicate entry '111110' for key 'PRIMARY'' on query\\."); diff --git a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test index 5a00048a90e..e5bff5d8dc4 100644 --- a/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test +++ b/mysql-test/suite/galera/t/galera_var_ignore_apply_errors.test @@ -277,15 +277,14 @@ SET GLOBAL wsrep_on = ON; CREATE TABLE t1 (f1 INTEGER, f2 INTEGER); DROP TABLE t1; - --connection node_2 SET GLOBAL wsrep_ignore_apply_errors = 7; CALL mtr.add_suppression("Can't find record in 't.*'"); CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event"); -CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test.t1'' on query. Default database: 'test'. Query: 'DROP TABLE t1', Error_code: 1051"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query. Default database: 'test'. Query: 'DROP SCHEMA s1', Error_code: 1008"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query. Default database: 'test'. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query."); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown table 'test\\.t1'' on query\\. Default database: 'test'\\. Query: 'DROP TABLE t1', Error_code: 1051"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't drop database 's1'; database doesn't exist' on query\\. Default database: 'test'\\. Query: 'DROP SCHEMA s1', Error_code: 1008"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'DROP INDEX idx1 ON t1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'idx1'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP INDEX idx1', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Can't DROP 'f2'; check that column/key exists' on query\\. Default database: 'test'\\. Query: 'ALTER TABLE t1 DROP COLUMN f2', Error_code: 1091"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\."); diff --git a/mysql-test/suite/galera/t/galera_var_slave_threads.test b/mysql-test/suite/galera/t/galera_var_slave_threads.test index 4a2dd07098c..66909baff07 100644 --- a/mysql-test/suite/galera/t/galera_var_slave_threads.test +++ b/mysql-test/suite/galera/t/galera_var_slave_threads.test @@ -19,7 +19,7 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY) Engine=InnoDB; CREATE TABLE t2 (f1 INT AUTO_INCREMENT PRIMARY KEY) Engine=InnoDB; --connection node_2 -CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread."); +CALL mtr.add_suppression("WSREP: Refusing exit for the last slave thread\\."); # Setting wsrep_slave_threads to zero triggers a warning SET GLOBAL wsrep_slave_threads = 0; SHOW WARNINGS; diff --git a/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test index 43fd09b902c..24e2e033676 100644 --- a/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test +++ b/mysql-test/suite/galera/t/galera_var_wsrep_start_position.test @@ -4,7 +4,7 @@ --echo # wsrep_start_position --echo # -CALL mtr.add_suppression("WSREP: SST failed for position .*"); +CALL mtr.add_suppression("WSREP: SST failed for position "); SET @wsrep_start_position_global_saved = @@global.wsrep_start_position; --echo # default diff --git a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test index c14dd7b8a0e..c868e5e8e5b 100644 --- a/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test +++ b/mysql-test/suite/galera/t/galera_vote_rejoin_ddl.test @@ -82,12 +82,12 @@ CALL mtr.add_suppression("Slave SQL: Error 'Unknown table"); --connection node_3 SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); --connection node_4 SELECT COUNT(*) AS expect_0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'; SELECT COUNT(*) AS expect_1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2'; -CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on .* is inconsistent with group\\. Leaving cluster\\."); DROP TABLE t2; diff --git a/mysql-test/suite/galera/t/galera_wan.test b/mysql-test/suite/galera/t/galera_wan.test index ca86a3000a6..b3dc190dc06 100644 --- a/mysql-test/suite/galera/t/galera_wan.test +++ b/mysql-test/suite/galera/t/galera_wan.test @@ -9,11 +9,10 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -CALL mtr.add_suppression("WSREP: Stray state UUID msg:.*"); -CALL mtr.add_suppression("WSREP: Sending JOIN failed:.*"); +CALL mtr.add_suppression("WSREP: Stray state UUID msg:"); +CALL mtr.add_suppression("Sending JOIN failed: "); +CALL mtr.add_suppression("WSREP: .* sending install message failed: Socket is not connected"); CALL mtr.add_suppression("There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); - SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; @@ -37,4 +36,3 @@ SELECT VARIABLE_VALUE LIKE '%gmcast.segment = 3%' FROM INFORMATION_SCHEMA.GLOBAL SELECT COUNT(*) = 1 FROM t1; DROP TABLE t1; - diff --git a/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test b/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test index fe1abcf6c35..04d78a306a8 100644 --- a/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test +++ b/mysql-test/suite/galera/t/galera_wsrep_provider_options_syntax.test @@ -5,7 +5,7 @@ --source include/have_innodb.inc --let LOGF=$MYSQLTEST_VARDIR/log/mysqld.1.err --disable_info -call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\.segment'"); +call mtr.add_suppression("WSREP\: Unknown parameter 'gmcasts\\.segment'"); call mtr.add_suppression("WSREP\: Set options returned 7"); --error ER_WRONG_ARGUMENTS SET GLOBAL wsrep_provider_options="gmcasts.segment=1"; diff --git a/mysql-test/suite/galera/t/mdev-28433.test b/mysql-test/suite/galera/t/mdev-28433.test index ddee3618fee..c501519561c 100644 --- a/mysql-test/suite/galera/t/mdev-28433.test +++ b/mysql-test/suite/galera/t/mdev-28433.test @@ -26,7 +26,7 @@ SHOW STATUS LIKE 'wsrep_cluster_status'; --enable_query_log --source include/wait_until_connected_again.inc --source include/galera_wait_ready.inc -call mtr.add_suppression("WSREP: .*Invalid backend URI.*"); +call mtr.add_suppression("WSREP: .*Invalid backend URI"); call mtr.add_suppression("WSREP: gcs connect failed: Invalid argument"); # Restore original auto_increment_offset values. diff --git a/mysql-test/suite/galera/t/mdev-31651.test b/mysql-test/suite/galera/t/mdev-31651.test index 3598057a53f..ebd6ff6ac44 100644 --- a/mysql-test/suite/galera/t/mdev-31651.test +++ b/mysql-test/suite/galera/t/mdev-31651.test @@ -1,8 +1,7 @@ --source include/galera_cluster.inc - -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field.*"); -call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table.*"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not read field"); +call mtr.add_suppression("BINLOG_BASE64_EVENT: Could not execute Write_rows_v1 event on table"); CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT PRIMARY KEY, b INT, KEY(b)) engine=innodb; BINLOG 'AMqaOw8BAAAAdAAAAHgAAAAAAAQANS42LjM0LTc5LjEtZGVidWctbG9nAAAAAAAAAAAAAAAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAYVx w2w='; --error ER_GET_ERRNO diff --git a/mysql-test/suite/galera/t/versioning_trx_id.test b/mysql-test/suite/galera/t/versioning_trx_id.test index fc9ea18eeb4..22111d6b889 100644 --- a/mysql-test/suite/galera/t/versioning_trx_id.test +++ b/mysql-test/suite/galera/t/versioning_trx_id.test @@ -1,6 +1,6 @@ --source include/galera_cluster.inc -call mtr.add_suppression("Sending JOIN failed:.*"); +call mtr.add_suppression("Sending JOIN failed: "); --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def index f2e6f9802ce..bcd0fb03478 100644 --- a/mysql-test/suite/galera_3nodes/disabled.def +++ b/mysql-test/suite/galera_3nodes/disabled.def @@ -12,7 +12,6 @@ galera_2_cluster : MDEV-32631 galera_2_cluster: before_rollback(): Assertion `0' failed galera_ssl_reload : MDEV-32778 galera_ssl_reload failed with warning message -galera_ipv6_mariabackup : temporarily disabled at the request of Codership galera_pc_bootstrap : temporarily disabled at the request of Codership galera_ipv6_mariabackup_section : temporarily disabled at the request of Codership GCF-354 : MDEV-25614 Galera test failure on GCF-354 diff --git a/mysql-test/suite/galera_3nodes/include/galera_resume.inc b/mysql-test/suite/galera_3nodes/include/galera_resume.inc index af8f2b956fd..3b913cd665a 100644 --- a/mysql-test/suite/galera_3nodes/include/galera_resume.inc +++ b/mysql-test/suite/galera_3nodes/include/galera_resume.inc @@ -6,4 +6,3 @@ system("kill -SIGCONT $mysqld_pid"); exit(0); EOF - diff --git a/mysql-test/suite/galera_3nodes/r/GCF-354.result b/mysql-test/suite/galera_3nodes/r/GCF-354.result index 2b1399e6265..3fdd44fe9d3 100644 --- a/mysql-test/suite/galera_3nodes/r/GCF-354.result +++ b/mysql-test/suite/galera_3nodes/r/GCF-354.result @@ -43,13 +43,13 @@ Nodes 2 and 3 started connection node_2; USE test; Node 2 synced -CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1049"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1049"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); connection node_3; Node 3 synced -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1050"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1050"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); diff --git a/mysql-test/suite/galera_3nodes/r/GCF-363.result b/mysql-test/suite/galera_3nodes/r/GCF-363.result index a7b811f794a..0dadff2673f 100644 --- a/mysql-test/suite/galera_3nodes/r/GCF-363.result +++ b/mysql-test/suite/galera_3nodes/r/GCF-363.result @@ -37,13 +37,13 @@ f1 f2 1 a DROP TABLE t1; connection node_1; -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); connection node_2; -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); connection node_3; -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); connection node_1; diff --git a/mysql-test/suite/galera_3nodes/r/GCF-376.result b/mysql-test/suite/galera_3nodes/r/GCF-376.result index 7b535a01ed4..bf996963a3d 100644 --- a/mysql-test/suite/galera_3nodes/r/GCF-376.result +++ b/mysql-test/suite/galera_3nodes/r/GCF-376.result @@ -86,6 +86,6 @@ DROP TABLE t1; connection node_2; CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos (.*), Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event (.*) Write_rows_v1 apply failed: 121, seqno "); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on (.*)"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result index 55513ff53af..3a91bfea211 100644 --- a/mysql-test/suite/galera_3nodes/r/MDEV-29171.result +++ b/mysql-test/suite/galera_3nodes/r/MDEV-29171.result @@ -56,7 +56,7 @@ connection node_1; set global wsrep_gtid_domain_id=100; connection node_2; set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); connection node_3; set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera-features#119.result b/mysql-test/suite/galera_3nodes/r/galera-features#119.result index aa49e4e5284..704e25c95b4 100644 --- a/mysql-test/suite/galera_3nodes/r/galera-features#119.result +++ b/mysql-test/suite/galera_3nodes/r/galera-features#119.result @@ -25,8 +25,8 @@ connection node_2; Killing server ... # restart connection node_2; -CALL mtr.add_suppression("Inconsistent by consensus."); -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno"); -CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster..."); +CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster\\.\\.\\."); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result index 1910106c646..b280a803b37 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result +++ b/mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result @@ -29,7 +29,7 @@ COUNT(*) connection node_3; Resuming node ... CALL mtr.add_suppression("WSREP: gcs_caused"); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg"); SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; COUNT(*) diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd.result b/mysql-test/suite/galera_3nodes/r/galera_garbd.result index ebc5fdf33f4..676ba7e8a0e 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_garbd.result +++ b/mysql-test/suite/galera_3nodes/r/galera_garbd.result @@ -26,8 +26,8 @@ DROP TABLE t1; Restarting node #3 to satisfy MTR's end-of-test checks connection node_3; connection node_1; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_2; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_3; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result b/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result index 4a5e9a4530c..fdf3f5abde0 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result +++ b/mysql-test/suite/galera_3nodes/r/galera_garbd_backup.result @@ -34,8 +34,8 @@ Restarting node #3 to satisfy MTR's end-of-test checks connection node_3; connection node_1; connection node_1; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_2; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); connection node_3; -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result b/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result index a35f31da422..ffc5ec0627a 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result +++ b/mysql-test/suite/galera_3nodes/r/galera_gtid_consistency.result @@ -197,16 +197,17 @@ COUNT(*) 2750 connection node_2; call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); connection node_3; call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); # cleanup connection node_1; +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); DROP PROCEDURE insert_row; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result index 934218492d6..4573834cb45 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result +++ b/mysql-test/suite/galera_3nodes/r/galera_ipv6_mysqldump.result @@ -1,7 +1,7 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; connection node_2; connection node_3; @@ -35,6 +35,6 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); connection node_2; -CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); +CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled\\. Expect abort"); diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result index 1813607517a..fdea4154626 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result +++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_A.result @@ -77,8 +77,8 @@ SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_2; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_3; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result index a88909f4bfb..7811059db42 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result +++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_B.result @@ -87,11 +87,11 @@ SET GLOBAL wsrep_provider_options = 'signal=process_primary_configuration'; SET GLOBAL wsrep_provider_options = 'dbug='; connection node_1; DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_2; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_3; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); disconnect node_1a; disconnect node_3; disconnect node_2; diff --git a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result index d85f121b0f7..ea185bf676a 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result +++ b/mysql-test/suite/galera_3nodes/r/galera_join_with_cc_C.result @@ -94,9 +94,9 @@ SET GLOBAL wsrep_provider_options = 'dbug='; SET GLOBAL wsrep_provider_options = 'signal=after_shift_to_joining'; connection node_1; DROP TABLE t1; -call mtr.add_suppression("WSREP: Send action {\(.*\), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Send action {(.*), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_2; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); connection node_3; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result index 8cdd62db959..cb12e9d865e 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_pc_bootstrap.result @@ -1,6 +1,6 @@ connection node_2; connection node_1; -call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*"); +call mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg\\(\\)"); connection node_1; connection node_2; connection node_3; diff --git a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result index 5d4b1d43fd6..2aefefaad00 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result +++ b/mysql-test/suite/galera_3nodes/r/galera_safe_to_bootstrap.result @@ -43,10 +43,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); connection node_3; CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible"); CALL mtr.add_suppression("WSREP: It may not be safe to bootstrap the cluster from this node"); @@ -56,10 +56,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result b/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result index 13caead79d3..d8d3abe40e9 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result +++ b/mysql-test/suite/galera_3nodes/r/galera_toi_vote.result @@ -19,4 +19,4 @@ disconnect node_3; connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; Killing server ... # restart -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); diff --git a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result index cacf1298058..124b9d1976e 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result +++ b/mysql-test/suite/galera_3nodes/r/galera_vote_rejoin_mysqldump.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -77,7 +77,7 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); connection node_2; # restart connection node_1; diff --git a/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result b/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result index 83c5b015a50..cd4087e01ca 100644 --- a/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result +++ b/mysql-test/suite/galera_3nodes/r/inconsistency_shutdown.result @@ -135,8 +135,8 @@ SET SESSION wsrep_sync_wait = 15; SET GLOBAL wsrep_on=OFF; # restart DROP TABLE t1; -CALL mtr.add_suppression('Can\'t find record in \'t1\''); -CALL mtr.add_suppression('Update_rows_v1 apply failed'); -CALL mtr.add_suppression('Inconsistency detected: Inconsistent by consensus on'); -CALL mtr.add_suppression('last left .* greater than drain seqno'); -CALL mtr.add_suppression('WSREP: Failed to apply write set:'); +CALL mtr.add_suppression("Can't find record in 't1'"); +CALL mtr.add_suppression("Update_rows_v1 apply failed"); +CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("last left .* greater than drain seqno"); +CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/t/GCF-354.test b/mysql-test/suite/galera_3nodes/t/GCF-354.test index e1459734cf3..44dfa3deeb7 100644 --- a/mysql-test/suite/galera_3nodes/t/GCF-354.test +++ b/mysql-test/suite/galera_3nodes/t/GCF-354.test @@ -88,18 +88,18 @@ USE test; --let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' --source include/wait_condition.inc --echo Node 2 synced -CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1049"); +CALL mtr.add_suppression("Slave SQL: Error 'Unknown database 'test'' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1049"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); --connection node_3 --let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' --source include/wait_condition.inc --echo Node 3 synced -CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'CREATE TABLE test.t1 \\\(f1 INTEGER\\\)', Error_code: 1050"); +CALL mtr.add_suppression("Slave SQL: Error 'Table 't1' already exists' on query\\. Default database: 'test'\\. Query: 'CREATE TABLE test\\.t1 \\(f1 INTEGER\\)', Error_code: 1050"); CALL mtr.add_suppression("Query apply failed"); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on .*"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/GCF-363.test b/mysql-test/suite/galera_3nodes/t/GCF-363.test index 00af02126af..1e245597f08 100644 --- a/mysql-test/suite/galera_3nodes/t/GCF-363.test +++ b/mysql-test/suite/galera_3nodes/t/GCF-363.test @@ -60,15 +60,15 @@ SELECT * FROM t1; DROP TABLE t1; --connection node_1 -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); --connection node_2 -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos 155, Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno "); --connection node_3 -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); diff --git a/mysql-test/suite/galera_3nodes/t/GCF-376.test b/mysql-test/suite/galera_3nodes/t/GCF-376.test index 20b9703f835..930d89e7f4f 100644 --- a/mysql-test/suite/galera_3nodes/t/GCF-376.test +++ b/mysql-test/suite/galera_3nodes/t/GCF-376.test @@ -113,6 +113,6 @@ DROP TABLE t1; --connection node_2 CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST, end_log_pos (.*), Error_code: 1062"); CALL mtr.add_suppression("WSREP: Event (.*) Write_rows_v1 apply failed: 121, seqno "); -CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on (.*)"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); CALL mtr.add_suppression("Plugin 'InnoDB' will be forced to shutdown"); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); diff --git a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test index 9e35cd0e0d9..df1282609f0 100644 --- a/mysql-test/suite/galera_3nodes/t/MDEV-29171.test +++ b/mysql-test/suite/galera_3nodes/t/MDEV-29171.test @@ -119,8 +119,8 @@ set global wsrep_gtid_domain_id=100; --connection node_2 set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); --connection node_3 set global wsrep_gtid_domain_id=100; -CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +CALL mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); diff --git a/mysql-test/suite/galera_3nodes/t/galera-features#119.test b/mysql-test/suite/galera_3nodes/t/galera-features#119.test index d1dd435c5e4..0effe780a22 100644 --- a/mysql-test/suite/galera_3nodes/t/galera-features#119.test +++ b/mysql-test/suite/galera_3nodes/t/galera-features#119.test @@ -60,13 +60,12 @@ DROP TABLE test.t1; --source include/start_mysqld.inc --connection node_2 -CALL mtr.add_suppression("Inconsistent by consensus."); -CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); +CALL mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on "); +CALL mtr.add_suppression("Slave SQL: Could not execute Write_rows event on table test\\.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log FIRST"); CALL mtr.add_suppression("WSREP: Event 3 Write_rows_v1 apply failed: 121, seqno"); -CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster..."); +CALL mtr.add_suppression("WSREP: Node consistency compromized, leaving cluster\\.\\.\\."); CALL mtr.add_suppression("WSREP: Failed to apply write set: "); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc - diff --git a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test index 8848e698c25..c0b23e4cc8e 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test +++ b/mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test @@ -72,7 +72,7 @@ SELECT COUNT(*) FROM t1; --source include/galera_wait_ready.inc CALL mtr.add_suppression("WSREP: gcs_caused"); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg"); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg"); SET SESSION wsrep_sync_wait = 15; SELECT COUNT(*) FROM t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd.test b/mysql-test/suite/galera_3nodes/t/galera_garbd.test index 05b1b25930f..da1956d8c85 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd.test @@ -81,10 +81,10 @@ let $restart_noprint=2; # Workaround for galera#101 --connection node_1 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_2 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_3 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test b/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test index f5eaf6fc59a..d1d8e643d8e 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test +++ b/mysql-test/suite/galera_3nodes/t/galera_garbd_backup.test @@ -127,10 +127,10 @@ let $restart_noprint=2; --source ../galera/include/auto_increment_offset_restore.inc --connection node_1 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_2 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); --connection node_3 -CALL mtr.add_suppression("WSREP: Protocol violation\. JOIN message sender 1\.0 \(.*\) is not in state transfer \(SYNCED\)"); +CALL mtr.add_suppression("WSREP: Protocol violation\\. JOIN message sender 1\\.0 (.*) is not in state transfer \\(SYNCED\\)"); diff --git a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test index f41230bc8e6..f00972b0461 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test +++ b/mysql-test/suite/galera_3nodes/t/galera_gtid_consistency.test @@ -316,17 +316,18 @@ SELECT COUNT(*) FROM t1; # --connection node_2 call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); --connection node_3 call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node"); -call mtr.add_suppression("WSREP: Sending JOIN failed:.*"); -call mtr.add_suppression("Sending JOIN failed:.*"); -call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST.*"); +call mtr.add_suppression("Sending JOIN failed: "); +call mtr.add_suppression("WSREP: Failed to JOIN the cluster after SST"); +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); --echo # cleanup --connection node_1 +call mtr.add_suppression("WSREP: FLOW message from member .* in non-primary configuration"); DROP PROCEDURE insert_row; DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test index 27e71da29fa..0e0112f86c7 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test +++ b/mysql-test/suite/galera_3nodes/t/galera_ipv6_mysqldump.test @@ -3,8 +3,8 @@ --source include/check_ipv6.inc --source include/force_restart.inc -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); --let $galera_connection_name = node_3 --let $galera_server_number = 3 @@ -86,8 +86,9 @@ SELECT VARIABLE_VALUE LIKE '%[::1]%' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE --source ../galera/include/auto_increment_offset_restore.inc --source suite/galera/include/galera_sst_restore.inc + --connection node_2 -CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled. Expect abort"); +CALL mtr.add_suppression("Unsupported protocol downgrade: incremental data collection disabled\\. Expect abort"); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test index db8bf90cb5c..bb25b1dd9d1 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test +++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_A.test @@ -259,12 +259,12 @@ INSERT INTO t1 VALUES (9, 2); DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_2 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_3 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test index d06cdcc8ae4..b5983c384ed 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test +++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_B.test @@ -270,13 +270,13 @@ SELECT * FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debu DROP TABLE t1; -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_2 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_3 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --disconnect node_1a diff --git a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test index d1111e9fd4a..d914482a100 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test +++ b/mysql-test/suite/galera_3nodes/t/galera_join_with_cc_C.test @@ -295,13 +295,13 @@ INSERT INTO t1 VALUES (9, 2); DROP TABLE t1; -call mtr.add_suppression("WSREP: Send action {\(.*\), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Send action {(.*), STATE_REQUEST} returned -107 \\(Transport endpoint is not connected\\)"); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_2 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --connection node_3 -call mtr.add_suppression("WSREP: Rejecting JOIN message from \(.*\): new State Transfer required."); +call mtr.add_suppression("WSREP: Rejecting JOIN message from (.*): new State Transfer required\\."); --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test index 58a67c7b32b..7020400e5ea 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test +++ b/mysql-test/suite/galera_3nodes/t/galera_pc_bootstrap.test @@ -5,7 +5,7 @@ --source include/galera_cluster.inc --source include/have_innodb.inc -call mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\).*"); +call mtr.add_suppression("WSREP: gcs/src/gcs_core\\.cpp:core_handle_uuid_msg\\(\\)"); # # Create connection node_3 and save auto increment variables. diff --git a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test index 65b4000cd1f..80482151518 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test +++ b/mysql-test/suite/galera_3nodes/t/galera_safe_to_bootstrap.test @@ -191,10 +191,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); --connection node_3 CALL mtr.add_suppression("WSREP: no nodes coming from prim view, prim not possible"); @@ -205,10 +205,10 @@ CALL mtr.add_suppression("WSREP: moving position backwards: [0-9]+ -> 0"); CALL mtr.add_suppression("Failed to prepare for incremental state transfer"); CALL mtr.add_suppression("It may not be safe to bootstrap the cluster from this node"); CALL mtr.add_suppression("Aborting"); -CALL mtr.add_suppression("Plugin 'wsrep' init function returned error."); -CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed."); -CALL mtr.add_suppression("Failed to initialize plugins."); -CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg()"); +CALL mtr.add_suppression("Plugin 'wsrep' init function returned error\\."); +CALL mtr.add_suppression("Plugin 'wsrep' registration as a STORAGE ENGINE failed\\."); +CALL mtr.add_suppression("Failed to initialize plugins\\."); +CALL mtr.add_suppression("WSREP: gcs/src/gcs_core.cpp:core_handle_uuid_msg\\(\\)"); SHOW CREATE TABLE t1; diff --git a/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test index 7b5682ed030..6bc87cf8874 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test +++ b/mysql-test/suite/galera_3nodes/t/galera_toi_vote.test @@ -61,7 +61,7 @@ SET SESSION wsrep_sync_wait=0; --let $wait_condition = SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready' --source include/wait_condition.inc -CALL mtr.add_suppression("WSREP: Vote 0 \\\(success\\\) on (.*) is inconsistent with group. Leaving cluster."); +CALL mtr.add_suppression("WSREP: Vote 0 \\(success\\) on (.*) is inconsistent with group\\. Leaving cluster\\."); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf index aa0c47f1e0f..60dd48dba52 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf +++ b/mysql-test/suite/galera_3nodes/t/galera_var_node_address.cnf @@ -5,4 +5,3 @@ wsrep_node_address=127.0.0.1 [mysqld.3] wsrep_node_address=localhost - diff --git a/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test index 7a9c4e83f87..347433a6f14 100644 --- a/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test +++ b/mysql-test/suite/galera_3nodes/t/inconsistency_shutdown.test @@ -180,11 +180,11 @@ SET GLOBAL wsrep_on=OFF; DROP TABLE t1; -CALL mtr.add_suppression('Can\'t find record in \'t1\''); -CALL mtr.add_suppression('Update_rows_v1 apply failed'); -CALL mtr.add_suppression('Inconsistency detected: Inconsistent by consensus on'); -CALL mtr.add_suppression('last left .* greater than drain seqno'); -CALL mtr.add_suppression('WSREP: Failed to apply write set:'); +CALL mtr.add_suppression("Can't find record in 't1'"); +CALL mtr.add_suppression("Update_rows_v1 apply failed"); +CALL mtr.add_suppression("Inconsistency detected: Inconsistent by consensus on"); +CALL mtr.add_suppression("last left .* greater than drain seqno"); +CALL mtr.add_suppression("WSREP: Failed to apply write set: "); # Restore original auto_increment_offset values. --source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test index 20d5955e4fc..db675f64ca9 100644 --- a/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test +++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-336.test @@ -54,5 +54,4 @@ CALL mtr.add_suppression("WSREP: failed to send SR rollback for "); --connection node_3 --source include/galera_wait_ready.inc - --enable_ps2_protocol diff --git a/mysql-test/suite/galera_sr/r/MDEV-30838.result b/mysql-test/suite/galera_sr/r/MDEV-30838.result index 6997b9c4d5d..2b55827485f 100644 --- a/mysql-test/suite/galera_sr/r/MDEV-30838.result +++ b/mysql-test/suite/galera_sr/r/MDEV-30838.result @@ -12,4 +12,4 @@ SELECT * FROM t1; f1 SET debug_dbug='-d,ib_create_table_fail_too_many_trx'; DROP TABLE t1; -CALL mtr.add_suppression("Error writing into mysql.wsrep_streaming_log: 177"); +CALL mtr.add_suppression("Error writing into mysql\\.wsrep_streaming_log: 177"); diff --git a/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result index 654b86d56a8..5d1416d3fa7 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_cc_master.result @@ -61,7 +61,7 @@ EXPECT_0 0 DROP TABLE t1; connection node_2b; -CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for"); +CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for "); disconnect node_2; connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2; disconnect node_2a; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result index 6789990f18e..b0f04b8f457 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_mysqldump_sst.result @@ -1,8 +1,8 @@ connection node_2; connection node_1; Setting SST method to mysqldump ... -call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'"); -call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos"); +call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127\\.0\\.0\\.1'"); +call mtr.add_suppression("Failed to load slave replication state from table mysql\\.gtid_slave_pos"); connection node_1; CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; @@ -57,4 +57,4 @@ CALL mtr.add_suppression("Can't open and lock time zone table"); CALL mtr.add_suppression("Can't open and lock privilege tables"); CALL mtr.add_suppression("Info table is not ready to be used"); CALL mtr.add_suppression("Native table .* has the wrong structure"); -CALL mtr.add_suppression("Table \'mysql.gtid_slave_pos\' doesn\'t exist"); +CALL mtr.add_suppression("Table 'mysql\\.gtid_slave_pos' doesn't exist"); diff --git a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result index 34995d35a4f..fbf62ea42a1 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result @@ -3,7 +3,7 @@ connection node_1; connection node_1; connection node_2; connection node_2; -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); connection node_1; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB; connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result index b7bdd94dd68..d3ecb699732 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size.result @@ -30,7 +30,7 @@ COUNT(*) = 100 DROP TABLE t1; DROP TABLE ten; connection node_1; -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); diff --git a/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result index 6bd8b6b8212..94aeef9b69e 100644 --- a/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result +++ b/mysql-test/suite/galera_sr/r/galera_sr_ws_size2.result @@ -23,12 +23,12 @@ COUNT(*) = 0 connection node_1; DROP TABLE t1; DROP TABLE ten; -call mtr.add_suppression('WSREP: SR rollback replication failure.*'); -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: SR rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); -call mtr.add_suppression('WSREP: fragment replication failed:'); +call mtr.add_suppression('WSREP: SR rollback replication failure'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: SR rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); +call mtr.add_suppression('WSREP: fragment replication failed: '); call mtr.add_suppression('WSREP: post commit failed for SR rollback'); -call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*'); -call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *'); +call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd: '); +call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for '); diff --git a/mysql-test/suite/galera_sr/r/mdev_18631.result b/mysql-test/suite/galera_sr/r/mdev_18631.result index 779ae5266a3..aa3b2c252e8 100644 --- a/mysql-test/suite/galera_sr/r/mdev_18631.result +++ b/mysql-test/suite/galera_sr/r/mdev_18631.result @@ -5,7 +5,7 @@ connection node_1; CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1), (2), (3); connection node_2; -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); SELECT * FROM t1; f1 1 diff --git a/mysql-test/suite/galera_sr/t/GCF-1008.test b/mysql-test/suite/galera_sr/t/GCF-1008.test index c6926840bd1..9c7f015c13f 100644 --- a/mysql-test/suite/galera_sr/t/GCF-1008.test +++ b/mysql-test/suite/galera_sr/t/GCF-1008.test @@ -15,4 +15,3 @@ --let $galera_sync_point = before_certify_apply_monitor_enter --source GCF-1008.inc - diff --git a/mysql-test/suite/galera_sr/t/GCF-1051.test b/mysql-test/suite/galera_sr/t/GCF-1051.test index 1db4ed15c41..5e52701165e 100644 --- a/mysql-test/suite/galera_sr/t/GCF-1051.test +++ b/mysql-test/suite/galera_sr/t/GCF-1051.test @@ -47,5 +47,4 @@ SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; SELECT COUNT(*) = 0 FROM t1; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; - DROP TABLE t1; diff --git a/mysql-test/suite/galera_sr/t/GCF-845.test b/mysql-test/suite/galera_sr/t/GCF-845.test index 316317c6a10..6ef50d3a1d5 100644 --- a/mysql-test/suite/galera_sr/t/GCF-845.test +++ b/mysql-test/suite/galera_sr/t/GCF-845.test @@ -27,4 +27,3 @@ DROP TABLE t1; --let $assert_text = No BF-BF log line found --let $assert_only_after = CURRENT_TEST --source include/assert_grep.inc - diff --git a/mysql-test/suite/galera_sr/t/GCF-851.test b/mysql-test/suite/galera_sr/t/GCF-851.test index 28d5302a422..3a6edab6b56 100644 --- a/mysql-test/suite/galera_sr/t/GCF-851.test +++ b/mysql-test/suite/galera_sr/t/GCF-851.test @@ -21,4 +21,3 @@ SELECT COUNT(*) > 0 FROM t1; --connection node_1 SELECT COUNT(*) > 0 FROM t1; DROP TABLE t1; - diff --git a/mysql-test/suite/galera_sr/t/GCF-889.test b/mysql-test/suite/galera_sr/t/GCF-889.test index e785b282019..e4cb3578011 100644 --- a/mysql-test/suite/galera_sr/t/GCF-889.test +++ b/mysql-test/suite/galera_sr/t/GCF-889.test @@ -26,4 +26,3 @@ SET GLOBAL wsrep_ignore_apply_errors = 7; --connection node_1 DROP TABLE t1; - diff --git a/mysql-test/suite/galera_sr/t/MDEV-21613.test b/mysql-test/suite/galera_sr/t/MDEV-21613.test index 8a1fea1b7f5..4d32fee900a 100644 --- a/mysql-test/suite/galera_sr/t/MDEV-21613.test +++ b/mysql-test/suite/galera_sr/t/MDEV-21613.test @@ -21,12 +21,10 @@ INSERT INTO t1 VALUES(1), (2); --connection node_ctrl SET DEBUG_SYNC = "now WAIT_FOR fragment_removal_reached"; - --connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connection node_1a TRUNCATE TABLE t1; - --connection node_1 --error ER_LOCK_DEADLOCK --reap diff --git a/mysql-test/suite/galera_sr/t/MDEV-30838.test b/mysql-test/suite/galera_sr/t/MDEV-30838.test index 39ca7d2a375..3270c523daf 100644 --- a/mysql-test/suite/galera_sr/t/MDEV-30838.test +++ b/mysql-test/suite/galera_sr/t/MDEV-30838.test @@ -15,4 +15,4 @@ COMMIT; SELECT * FROM t1; SET debug_dbug='-d,ib_create_table_fail_too_many_trx'; DROP TABLE t1; -CALL mtr.add_suppression("Error writing into mysql.wsrep_streaming_log: 177"); +CALL mtr.add_suppression("Error writing into mysql\\.wsrep_streaming_log: 177"); diff --git a/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test index f6a1b11cba9..25cd8f3005b 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_cc_master.test @@ -101,7 +101,7 @@ SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; DROP TABLE t1; --connection node_2b -CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for"); +CALL mtr.add_suppression("WSREP: Failed to replicate rollback fragment for "); --disconnect node_2 --connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2 diff --git a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test index 5d4a58b2d03..035ef873700 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test @@ -9,7 +9,7 @@ --let $node_2=node_2 --source ../galera/include/auto_increment_offset_save.inc --connection node_2 -call mtr.add_suppression("WSREP: Failed to scan the last segment to the end. Last events may be missing. Last recovered event:.*"); +call mtr.add_suppression("WSREP: Failed to scan the last segment to the end\\. Last events may be missing\\. Last recovered event: "); --connection node_1 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE = InnoDB; diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test index 98f6e796ef6..c8ae06637ed 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size.test @@ -64,7 +64,7 @@ DROP TABLE ten; --eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig'; --enable_query_log -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); diff --git a/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test index 2b9bc4819b8..07b79e49461 100644 --- a/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test +++ b/mysql-test/suite/galera_sr/t/galera_sr_ws_size2.test @@ -51,12 +51,12 @@ SELECT COUNT(*) = 0 FROM t1; DROP TABLE t1; DROP TABLE ten; -call mtr.add_suppression('WSREP: SR rollback replication failure.*'); -call mtr.add_suppression('WSREP: transaction size limit.*'); -call mtr.add_suppression('WSREP: SR rbr write fail.*'); -call mtr.add_suppression('WSREP: Maximum writeset size exceeded by.*'); -call mtr.add_suppression('WSREP: transaction size exceeded.*'); -call mtr.add_suppression('WSREP: fragment replication failed:'); +call mtr.add_suppression('WSREP: SR rollback replication failure'); +call mtr.add_suppression('WSREP: transaction size limit'); +call mtr.add_suppression('WSREP: SR rbr write fail'); +call mtr.add_suppression('WSREP: Maximum writeset size exceeded by '); +call mtr.add_suppression('WSREP: transaction size exceeded'); +call mtr.add_suppression('WSREP: fragment replication failed: '); call mtr.add_suppression('WSREP: post commit failed for SR rollback'); -call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd:*'); -call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for *'); +call mtr.add_suppression('WSREP: pre_commit for SR rollback returned 2, thd: '); +call mtr.add_suppression('WSREP: wsrep_rollback failed to send SR ROLLBACK for '); diff --git a/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test index ea40f58db73..3097318dafb 100644 --- a/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test +++ b/mysql-test/suite/galera_sr/t/galera_var_ignore_apply_errors_sr.test @@ -35,4 +35,4 @@ DROP TABLE t1; SET GLOBAL wsrep_ignore_apply_errors = 7; CALL mtr.add_suppression("Slave SQL: Could not execute Delete_rows event"); -CALL mtr.add_suppression("Can't find record in 't1'"); \ No newline at end of file +CALL mtr.add_suppression("Can't find record in 't1'"); diff --git a/mysql-test/suite/galera_sr/t/mdev_18631.test b/mysql-test/suite/galera_sr/t/mdev_18631.test index 0d1ea34c2f2..3e99e9fa9dc 100644 --- a/mysql-test/suite/galera_sr/t/mdev_18631.test +++ b/mysql-test/suite/galera_sr/t/mdev_18631.test @@ -3,7 +3,6 @@ # The configuration is provided in mdev_18631.cnf. # - --source include/galera_cluster.inc --source include/have_innodb.inc @@ -14,7 +13,7 @@ CREATE TABLE t1(f1 INT PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1), (2), (3); --connection node_2 -call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node."); +call mtr.add_suppression("WSREP: Ignoring server id for non bootstrap node\\."); SELECT * FROM t1; --connection node_1 diff --git a/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test b/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test index d534fcc5524..e30b8cd5763 100644 --- a/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test +++ b/mysql-test/suite/galera_sr/t/mysql-wsrep-bugs-900.test @@ -19,4 +19,4 @@ INSERT INTO t1 VALUES (2); COMMIT; SELECT f1 AS expect_1_and_2 FROM t1; -DROP TABLE t1; \ No newline at end of file +DROP TABLE t1; From 60125a77b7edc6fda16a16b15b0455b9e222971b Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 10 Jul 2024 11:43:03 +0530 Subject: [PATCH 07/60] MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 in ha_innobase::estimate_rows_upper_bound - Column stat_value and sample_size in mysql.innodb_index_stats table is declared as BIGINT UNSIGNED without any check constraint. user manually updates the value of stat_value and sample_size to zero. InnoDB aborts the server while reading the statistics information because InnoDB expects at least one leaf page to exist for the index. - To fix this issue, InnoDB should interpret the value of stat_n_leaf_pages, stat_index_size in innodb_index_stats stat_clustered_index_size, stat_sum_of_other_index_sizes in innodb_table_stats as valid one even though user mentioned it as 0. --- .../suite/innodb/r/innodb_stats_fetch.result | 10 +++++++ .../suite/innodb/t/innodb_stats_fetch.test | 12 ++++++++ storage/innobase/dict/dict0stats.cc | 30 +++++++++++++------ 3 files changed, 43 insertions(+), 9 deletions(-) diff --git a/mysql-test/suite/innodb/r/innodb_stats_fetch.result b/mysql-test/suite/innodb/r/innodb_stats_fetch.result index df6bc4b0cf7..76d6b022f03 100644 --- a/mysql-test/suite/innodb/r/innodb_stats_fetch.result +++ b/mysql-test/suite/innodb/r/innodb_stats_fetch.result @@ -174,3 +174,13 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5; DROP TABLE t1; +# +# MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 +# in ha_innobase::estimate_rows_upper_bound +# +CREATE TABLE t (c1 INT,c2 INT, +INDEX(c1))STATS_PERSISTENT=1 ENGINE=INNODB; +UPDATE mysql.innodb_index_stats SET stat_value=0 WHERE database_name like "test" and table_name like 't'; +UPDATE mysql.innodb_table_stats SET clustered_index_size= 0, sum_of_other_index_sizes=0 WHERE database_name like "test" and table_name like 't'; +UPDATE t SET c1=+1 ORDER BY c2; +DROP TABLE t; diff --git a/mysql-test/suite/innodb/t/innodb_stats_fetch.test b/mysql-test/suite/innodb/t/innodb_stats_fetch.test index 99fc115af1d..8968b48e0b2 100644 --- a/mysql-test/suite/innodb/t/innodb_stats_fetch.test +++ b/mysql-test/suite/innodb/t/innodb_stats_fetch.test @@ -96,3 +96,15 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_VIRTUAL LIMIT ROWS EXAMINED 5; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN LIMIT ROWS EXAMINED 5; SELECT * FROM INFORMATION_SCHEMA.INNODB_SYS_FOREIGN_COLS LIMIT ROWS EXAMINED 5; DROP TABLE t1; + +--echo # +--echo # MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 +--echo # in ha_innobase::estimate_rows_upper_bound +--echo # + +CREATE TABLE t (c1 INT,c2 INT, + INDEX(c1))STATS_PERSISTENT=1 ENGINE=INNODB; +UPDATE mysql.innodb_index_stats SET stat_value=0 WHERE database_name like "test" and table_name like 't'; +UPDATE mysql.innodb_table_stats SET clustered_index_size= 0, sum_of_other_index_sizes=0 WHERE database_name like "test" and table_name like 't'; +UPDATE t SET c1=+1 ORDER BY c2; +DROP TABLE t; diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index 9b6abab162a..8ab8cec47e3 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -2665,25 +2665,34 @@ dict_stats_fetch_table_stats_step( break; case 1: /* mysql.innodb_table_stats.clustered_index_size */ - + { ut_a(dtype_get_mtype(type) == DATA_INT); ut_a(len == 8); table->stat_clustered_index_size - = (ulint) mach_read_from_8(data); - + = std::max(mach_read_from_8(data), 1); break; + } case 2: /* mysql.innodb_table_stats.sum_of_other_index_sizes */ - + { ut_a(dtype_get_mtype(type) == DATA_INT); ut_a(len == 8); - table->stat_sum_of_other_index_sizes + ulint stat_other_idx_size = (ulint) mach_read_from_8(data); + if (!stat_other_idx_size + && UT_LIST_GET_LEN(table->indexes) > 1) { + stat_other_idx_size + = UT_LIST_GET_LEN(table->indexes) - 1; + } + table->stat_sum_of_other_index_sizes + = std::max( + mach_read_from_8(data), + UT_LIST_GET_LEN(table->indexes) - 1); break; - + } default: /* someone changed SELECT @@ -2866,12 +2875,14 @@ dict_stats_fetch_index_stats_step( if (stat_name_len == 4 /* strlen("size") */ && strncasecmp("size", stat_name, stat_name_len) == 0) { - index->stat_index_size = (ulint) stat_value; + index->stat_index_size + = std::max(stat_value, 1); arg->stats_were_modified = true; } else if (stat_name_len == 12 /* strlen("n_leaf_pages") */ && strncasecmp("n_leaf_pages", stat_name, stat_name_len) == 0) { - index->stat_n_leaf_pages = (ulint) stat_value; + index->stat_n_leaf_pages + = std::max(stat_value, 1); arg->stats_were_modified = true; } else if (stat_name_len == 12 /* strlen("n_page_split") */ && strncasecmp("n_page_split", stat_name, stat_name_len) @@ -2951,7 +2962,8 @@ dict_stats_fetch_index_stats_step( index->stat_n_diff_key_vals[n_pfx - 1] = stat_value; if (sample_size != UINT64_UNDEFINED) { - index->stat_n_sample_sizes[n_pfx - 1] = sample_size; + index->stat_n_sample_sizes[n_pfx - 1] = + std::max(sample_size, 1); } else { /* hmm, strange... the user must have UPDATEd the table manually and SET sample_size = NULL */ From 9fdc0e54405ff896c9f2f70bc1e757dfaccbcc33 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 10 Jul 2024 14:14:35 +0200 Subject: [PATCH 08/60] MDEV-34546 Windows - no error log entries after startup in XAMPP The server does not log errors after startup when it is started without the --console parameter and not as a service. This issue arises due to an undocumented behavior of FreeConsole() in Windows when only a single process (mariadbd/mysqld) is attached to it, causing the window to close. In this case stderr is redirected to a file before FreeConsole() is called. Procmon shows FreeConsole closing file handle subsequent writes to stderr fail with ERROR_INVALID_HANDLE because WriteFile() cannot operate on the closed handle. This results in losing all messages after startup, including warnings, errors, notes, and crash reports. Additionally, some users reported stderr being redirected to multi-master.info and failing at startup, but this could not be reproduced here. The workaround involves calling FreeConsole() right before the redirection of stdout/stderr. This fix has been tested with XAMPP and via cmd.exe using "start mysqld". Automated testing using MTR is challenging for this case. The fix is only applicable to version 10.5. In later versions, the FreeConsole() call has been removed. --- sql/mysqld.cc | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 7aa90bf357b..31d40b962db 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4717,6 +4717,10 @@ static int init_server_components() else { my_bool res; +#ifdef _WIN32 + if (!opt_console) + FreeConsole(); // Remove window +#endif #ifndef EMBEDDED_LIBRARY res= reopen_fstreams(log_error_file, stdout, stderr); #else @@ -5585,13 +5589,6 @@ int mysqld_main(int argc, char **argv) init_ssl(); network_init(); -#ifdef _WIN32 - if (!opt_console) - { - FreeConsole(); // Remove window - } -#endif - #ifdef WITH_WSREP // Recover and exit. if (wsrep_recovery) From ea9869504d4bd47e111fe2aab99f85b60946f648 Mon Sep 17 00:00:00 2001 From: Brandon Nesterenko Date: Thu, 20 Jun 2024 12:21:48 -0600 Subject: [PATCH 09/60] MDEV-33921: Replication breaks when filtering two-phase XA transactions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are two problems. First, replication fails when XA transactions are used where the slave has replicate_do_db set and the client has touched a different database when running DML such as inserts. This is because XA commands are not treated as keywords, and are thereby not exempt from the replication filter. The effect of this is that during an XA transaction, if its logged โ€œuse dbโ€ from the master is filtered out by the replication filter, then XA END will be ignored, yet its corresponding XA PREPARE will be executed in an invalid state, thereby breaking replication. Second, if the slave replicates an XA transaction which results in an empty transaction, the XA START through XA PREPARE first phase of the transaction wonโ€™t be binlogged, yet the XA COMMIT will be binlogged. This will break replication in chain configurations. The first problem is fixed by treating XA commands in Query_log_event as keywords, thus allowing them to bypass the replication filter. Note that Query_log_event::is_trans_keyword() is changed to accept a new parameter to define its mode, to either check for XA commands or regular transaction commands, but not both. In addition, mysqlbinlog is adapted to use this mode so its --database filter does not remove XA commands from its output. The second problem fixed by overwriting the XA state in the XID cache to be XA_ROLLBACK_ONLY, so at commit time, the server knows to rollback the transaction and skip its binlogging. If the xid cache is cleared before an XA transaction receives its completion command (e.g. on server shutdown), then before reporting ER_XAER_NOTA when the completion command is executed, the filter is first checked if the database is ignored, and if so, the error is ignored. Reviewed By: ============ Kristian Nielsen Andrei Elkin --- client/mysqlbinlog.cc | 2 +- .../rpl/r/rpl_xa_empty_transaction.result | 78 +++++++++++ .../suite/rpl/t/rpl_xa_empty_transaction.test | 127 ++++++++++++++++++ sql/handler.cc | 16 +++ sql/log_event.h | 14 +- sql/log_event_client.cc | 10 +- sql/log_event_server.cc | 18 ++- sql/rpl_filter.cc | 7 + sql/rpl_filter.h | 1 + sql/xa.cc | 24 +++- sql/xa.h | 1 + 11 files changed, 287 insertions(+), 11 deletions(-) diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 6324e5a7242..3621a3dfef5 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -1071,7 +1071,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, case QUERY_COMPRESSED_EVENT: { Query_log_event *qe= (Query_log_event*)ev; - if (!qe->is_trans_keyword()) + if (!qe->is_trans_keyword(print_event_info->is_xa_trans())) { if (shall_skip_database(qe->db)) goto end; diff --git a/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result b/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result index f3ea53c219a..b84e427095c 100644 --- a/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result +++ b/mysql-test/suite/rpl/r/rpl_xa_empty_transaction.result @@ -1164,6 +1164,84 @@ include/sync_with_master_gtid.inc connection server_1; set @@binlog_format = @sav_binlog_format; set @@global.binlog_format = @sav_binlog_format; +# +# MDEV-33921.1: If a slave's replication of an XA transaction results in +# an empty transaction, e.g. due to replication filters, the slave +# should not binlog any part of the XA transaction. +connection server_1; +create database db1; +create database db2; +create table db1.t1 (a int) engine=innodb; +include/save_master_gtid.inc +connection server_3; +include/sync_with_master_gtid.inc +include/stop_slave.inc +connection server_2; +include/stop_slave.inc +SET @@GLOBAL.replicate_ignore_db= ""; +SET @@GLOBAL.replicate_do_db= "db2"; +include/start_slave.inc +connection server_1; +use db1; +XA START "x1"; +insert into db1.t1 values (1); +XA END "x1"; +XA PREPARE "x1"; +XA COMMIT "x1"; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +connection server_2; +include/save_master_gtid.inc +connection server_3; +include/start_slave.inc +include/sync_with_master_gtid.inc +# +# 33921.2: If the slave shuts down after "preparing" a filtered-to-empty +# XA transaction (and not completing it), then when the respective +# XA completion (COMMIT in this test) command is replicated, the slave +# should not throw ER_XAER_NOTA. Note that internally, the error is +# thrown, but it is ignored because the target db is filtered. +connection server_3; +include/stop_slave.inc +connection server_1; +use db1; +XA START "x2"; +insert into db1.t1 values (2); +XA END "x2"; +XA PREPARE "x2"; +include/save_master_gtid.inc +connection server_2; +include/sync_with_master_gtid.inc +# Connection named slave is needed for reconnection +connect slave,localhost,root,,; +connect slave1,localhost,root,,; +include/rpl_restart_server.inc [server_number=2] +connection server_2; +include/stop_slave.inc +SET @@GLOBAL.replicate_do_db= "db2"; +include/start_slave.inc +connection server_1; +XA COMMIT "x2"; +connection server_2; +include/sync_with_master_gtid.inc +include/save_master_gtid.inc +connection server_3; +include/start_slave.inc +include/sync_with_master_gtid.inc +# +# 33921.3: Ensure XA commands are not considered by mysqlbinlog's +# --database filter +connection server_1; +# MYSQL_BINLOG datadir/binlog_file --start-position=pre_xa_pos --database=db2 --result-file=assert_file +include/assert_grep.inc [Mysqlbinlog should output all XA commands from the filtered transaction] +connection server_2; +include/stop_slave.inc +SET @@GLOBAL.replicate_do_db=""; +include/start_slave.inc +connection server_1; +drop database db1; +drop database db2; connection server_1; include/rpl_end.inc # End of rpl_xa_empty_transaction.test diff --git a/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test b/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test index 61cc0621d5a..e3364cd4f48 100644 --- a/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test +++ b/mysql-test/suite/rpl/t/rpl_xa_empty_transaction.test @@ -32,6 +32,10 @@ # MDEV-25616: Binlog event for XA COMMIT is generated without matching # XA START, replication aborts # +# MDEV-33921: Replication fails when XA transactions are used where the slave +# has replicate_do_db set and the client has touched a different +# database when running DML such as inserts. +# --source include/have_log_bin.inc --let $rpl_server_count= 3 @@ -167,6 +171,129 @@ set @@global.binlog_format = row; set @@binlog_format = @sav_binlog_format; set @@global.binlog_format = @sav_binlog_format; + +--echo # +--echo # MDEV-33921.1: If a slave's replication of an XA transaction results in +--echo # an empty transaction, e.g. due to replication filters, the slave +--echo # should not binlog any part of the XA transaction. +# +# Note that the MDEV-33921 report is actually about that XA END is filtered +# out (not executed), and then its corresponding XA PREPARE errors because the +# XA state of the transaction is incorrect. This test case inherently tests +# both bugs. + +--connection server_1 +create database db1; +create database db2; +create table db1.t1 (a int) engine=innodb; +--source include/save_master_gtid.inc +--connection server_3 +--source include/sync_with_master_gtid.inc +--source include/stop_slave.inc + +--connection server_2 +--source include/stop_slave.inc +SET @@GLOBAL.replicate_ignore_db= ""; +SET @@GLOBAL.replicate_do_db= "db2"; +--source include/start_slave.inc + +--connection server_1 +--let $pre_xa_gtid= `SELECT @@global.gtid_binlog_pos` +use db1; +XA START "x1"; +insert into db1.t1 values (1); +XA END "x1"; +XA PREPARE "x1"; +XA COMMIT "x1"; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc +--let $slave_binlogged_gtid= `SELECT @@global.gtid_binlog_pos` +if (`SELECT strcmp("$slave_binlogged_gtid","$pre_xa_gtid")`) +{ + --die Slave binlogged an empty XA transaction yet should not have +} + +--connection server_2 +--source include/save_master_gtid.inc + +--connection server_3 +--source include/start_slave.inc +--source include/sync_with_master_gtid.inc + +--echo # +--echo # 33921.2: If the slave shuts down after "preparing" a filtered-to-empty +--echo # XA transaction (and not completing it), then when the respective +--echo # XA completion (COMMIT in this test) command is replicated, the slave +--echo # should not throw ER_XAER_NOTA. Note that internally, the error is +--echo # thrown, but it is ignored because the target db is filtered. + +--connection server_3 +--source include/stop_slave.inc + +--connection server_1 +--let $pre_xa_gtid= `SELECT @@global.gtid_binlog_pos` + +# Used by mysqlbinlog in part 3 +--let $pre_xa_pos = query_get_value(SHOW MASTER STATUS, Position, 1) + +use db1; +XA START "x2"; +insert into db1.t1 values (2); +XA END "x2"; +XA PREPARE "x2"; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc +--let $rpl_server_number= 2 +--echo # Connection named slave is needed for reconnection +--connect(slave,localhost,root,,) +--connect(slave1,localhost,root,,) +--source include/rpl_restart_server.inc + +--connection server_2 +--source include/stop_slave.inc +SET @@GLOBAL.replicate_do_db= "db2"; +--source include/start_slave.inc + +--connection server_1 +XA COMMIT "x2"; + +--connection server_2 +--source include/sync_with_master_gtid.inc +--source include/save_master_gtid.inc + +--connection server_3 +--source include/start_slave.inc +--source include/sync_with_master_gtid.inc + +--echo # +--echo # 33921.3: Ensure XA commands are not considered by mysqlbinlog's +--echo # --database filter +--connection server_1 +--let $datadir= `select @@datadir` +--let $binlog_file= query_get_value(SHOW MASTER STATUS, File, 1) +--let assert_file= $MYSQLTEST_VARDIR/tmp/binlog_decoded.out +--echo # MYSQL_BINLOG datadir/binlog_file --start-position=pre_xa_pos --database=db2 --result-file=assert_file +--exec $MYSQL_BINLOG $datadir/$binlog_file --start-position=$pre_xa_pos --database=db2 --result-file=$assert_file + +--let assert_text= Mysqlbinlog should output all XA commands from the filtered transaction +--let assert_count= 4 +--let assert_select= XA START|XA END|XA PREPARE|XA COMMIT +--source include/assert_grep.inc + +--connection server_2 +--source include/stop_slave.inc +SET @@GLOBAL.replicate_do_db=""; +--source include/start_slave.inc + +--connection server_1 +drop database db1; +drop database db2; + + # # Cleanup --connection server_1 diff --git a/sql/handler.cc b/sql/handler.cc index 6fc74fc1fbc..66c85f07574 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -1444,6 +1444,22 @@ int ha_prepare(THD *thd) error=1; } } + else if (thd->rgi_slave) + { + /* + Slave threads will always process XA COMMITs in the binlog handler (see + MDEV-25616 and MDEV-30423), so if this is a slave thread preparing a + transaction which proved empty during replication (e.g. because of + replication filters) then mark it as XA_ROLLBACK_ONLY so the follow up + XA COMMIT will know to roll it back, rather than try to commit and binlog + a standalone XA COMMIT (without its preceding XA START - XA PREPARE). + + If the xid_cache is cleared before the completion event comes, before + issuing ER_XAER_NOTA, first check if the event targets an ignored + database, and ignore the error if so. + */ + thd->transaction->xid_state.set_rollback_only(); + } DBUG_RETURN(error); } diff --git a/sql/log_event.h b/sql/log_event.h index 5cd061df110..a869c6e04f1 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -845,6 +845,7 @@ typedef struct st_print_event_info uint lc_time_names_number; uint charset_database_number; uint verbose; + uchar gtid_ev_flags2; uint32 flags2; uint32 server_id; uint32 domain_id; @@ -916,6 +917,8 @@ typedef struct st_print_event_info copy_event_cache_to_file_and_reinit(&body_cache, file); fflush(file); } + + my_bool is_xa_trans(); } PRINT_EVENT_INFO; #endif // MYSQL_CLIENT @@ -2173,7 +2176,7 @@ public: /* !!! Public in this patch to allow old usage */ If true, the event always be applied by slave SQL thread or be printed by mysqlbinlog */ - bool is_trans_keyword() + bool is_trans_keyword(bool is_xa) { /* Before the patch for bug#50407, The 'SAVEPOINT and ROLLBACK TO' @@ -2186,10 +2189,11 @@ public: /* !!! Public in this patch to allow old usage */ but we don't handle these cases and after the patch, both quiries are binlogged in upper case with no comments. */ - return !strncmp(query, "BEGIN", q_len) || - !strncmp(query, "COMMIT", q_len) || - !strncasecmp(query, "SAVEPOINT", 9) || - !strncasecmp(query, "ROLLBACK", 8); + return is_xa ? !strncasecmp(query, C_STRING_WITH_LEN("XA ")) + : (!strncmp(query, "BEGIN", q_len) || + !strncmp(query, "COMMIT", q_len) || + !strncasecmp(query, "SAVEPOINT", 9) || + !strncasecmp(query, "ROLLBACK", 8)); } virtual bool is_begin() { return !strcmp(query, "BEGIN"); } virtual bool is_commit() { return !strcmp(query, "COMMIT"); } diff --git a/sql/log_event_client.cc b/sql/log_event_client.cc index 052110fa235..654701afaa0 100644 --- a/sql/log_event_client.cc +++ b/sql/log_event_client.cc @@ -1835,7 +1835,7 @@ bool Query_log_event::print_query_header(IO_CACHE* file, if ((flags & LOG_EVENT_SUPPRESS_USE_F)) { - if (!is_trans_keyword()) + if (!is_trans_keyword(print_event_info->is_xa_trans())) print_event_info->db[0]= '\0'; } else if (db) @@ -3762,6 +3762,7 @@ st_print_event_info::st_print_event_info() bzero(time_zone_str, sizeof(time_zone_str)); delimiter[0]= ';'; delimiter[1]= 0; + gtid_ev_flags2= 0; flags2_inited= 0; flags2= 0; sql_mode_inited= 0; @@ -3795,6 +3796,11 @@ st_print_event_info::st_print_event_info() #endif } +my_bool st_print_event_info::is_xa_trans() +{ + return (gtid_ev_flags2 & + (Gtid_log_event::FL_PREPARED_XA | Gtid_log_event::FL_COMPLETED_XA)); +} bool copy_event_cache_to_string_and_reinit(IO_CACHE *cache, LEX_STRING *to) { @@ -3906,6 +3912,8 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) goto err; } + print_event_info->gtid_ev_flags2= flags2; + return cache.flush_data(); err: return 1; diff --git a/sql/log_event_server.cc b/sql/log_event_server.cc index 3aacc4154d9..d8056fd4378 100644 --- a/sql/log_event_server.cc +++ b/sql/log_event_server.cc @@ -1437,7 +1437,7 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg, is created we create tables with thd->variables.wsrep_on=false to avoid replicating wsrep_schema tables to other nodes. */ - if (WSREP_ON && !is_trans_keyword()) + if (WSREP_ON && !is_trans_keyword(false)) { thd->wsrep_PA_safe= false; } @@ -1715,7 +1715,11 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi, ::do_apply_event(), then the companion SET also have so we don't need to reset_one_shot_variables(). */ - if (is_trans_keyword() || rpl_filter->db_ok(thd->db.str)) + if (rpl_filter->is_db_empty() || + is_trans_keyword( + (rgi->gtid_ev_flags2 & (Gtid_log_event::FL_PREPARED_XA | + Gtid_log_event::FL_COMPLETED_XA))) || + rpl_filter->db_ok(thd->db.str)) { #ifdef WITH_WSREP if (!wsrep_thd_is_applying(thd)) @@ -2040,6 +2044,16 @@ compare_errors: actual_error == ER_CONNECTION_KILLED) thd->reset_killed(); } + else if (actual_error == ER_XAER_NOTA && !rpl_filter->db_ok(get_db())) + { + /* + If there is an XA query whos XID cannot be found, if the replication + filter is active and filters the target database, assume that the XID + cache has been cleared (e.g. by server restart) since it was prepared, + so we can just ignore this event. + */ + thd->clear_error(1); + } /* Other cases: mostly we expected no error and get one. */ diff --git a/sql/rpl_filter.cc b/sql/rpl_filter.cc index 5c4a4d9f58a..39bdde9ce76 100644 --- a/sql/rpl_filter.cc +++ b/sql/rpl_filter.cc @@ -268,6 +268,13 @@ Rpl_filter::is_on() } +bool +Rpl_filter::is_db_empty() +{ + return do_db.is_empty() && ignore_db.is_empty(); +} + + /** Parse and add the given comma-separated sequence of filter rules. diff --git a/sql/rpl_filter.h b/sql/rpl_filter.h index f22ec8a0ce4..5e9497ed771 100644 --- a/sql/rpl_filter.h +++ b/sql/rpl_filter.h @@ -56,6 +56,7 @@ public: bool db_ok_with_wild_table(const char *db); bool is_on(); + bool is_db_empty(); /* Setters - add filtering rules */ diff --git a/sql/xa.cc b/sql/xa.cc index c4cd548b132..972121a1ee7 100644 --- a/sql/xa.cc +++ b/sql/xa.cc @@ -180,6 +180,13 @@ void XID_STATE::set_error(uint error) xid_cache_element->rm_error= error; } +void XID_STATE::set_rollback_only() +{ + xid_cache_element->xa_state= XA_ROLLBACK_ONLY; + if (current_thd) + MYSQL_SET_TRANSACTION_XA_STATE(current_thd->m_transaction_psi, + XA_ROLLBACK_ONLY); +} void XID_STATE::er_xaer_rmfail() const { @@ -547,8 +554,21 @@ bool trans_xa_prepare(THD *thd) } else { - thd->transaction->xid_state.xid_cache_element->xa_state= XA_PREPARED; - MYSQL_SET_TRANSACTION_XA_STATE(thd->m_transaction_psi, XA_PREPARED); + if (thd->transaction->xid_state.xid_cache_element->xa_state != + XA_ROLLBACK_ONLY) + { + thd->transaction->xid_state.xid_cache_element->xa_state= XA_PREPARED; + MYSQL_SET_TRANSACTION_XA_STATE(thd->m_transaction_psi, XA_PREPARED); + } + else + { + /* + In the non-err case, XA_ROLLBACK_ONLY should only be set by a slave + thread which prepared an empty transaction, to prevent binlogging a + standalone XA COMMIT. + */ + DBUG_ASSERT(thd->rgi_slave && !(thd->transaction->all.ha_list)); + } res= thd->variables.pseudo_slave_mode || thd->slave_thread ? slave_applier_reset_xa_trans(thd) : 0; } diff --git a/sql/xa.h b/sql/xa.h index 0b2d0696642..5f21e9e9b55 100644 --- a/sql/xa.h +++ b/sql/xa.h @@ -34,6 +34,7 @@ struct XID_STATE { bool check_has_uncommitted_xa() const; bool is_explicit_XA() const { return xid_cache_element != 0; } void set_error(uint error); + void set_rollback_only(); void er_xaer_rmfail() const; XID *get_xid() const; enum xa_states get_state_code() const; From 02e38e2ece30e72a48710e6f92e412a83352be94 Mon Sep 17 00:00:00 2001 From: Dave Gosselin Date: Fri, 26 Apr 2024 12:13:31 -0400 Subject: [PATCH 10/60] MDEV-33971 NAME_CONST in WHERE clause replaced by inner item Improve performance of queries like SELECT * FROM t1 WHERE field = NAME_CONST('a', 4); by, in this example, replacing the WHERE clause with field = 4 in the case of ref access. The rewrite is done during fix_fields and we disambiguate this case from other cases of NAME_CONST by inspecting where we are in parsing. We rely on THD::where to accomplish this. To improve performance there, we change the type of THD::where to be an enumeration, so we can avoid string comparisons during Item_name_const::fix_fields. Consequently, this patch also changes all usages of THD::where to conform likewise. --- mysql-test/main/fulltext_order_by.result | 4 +- mysql-test/main/name_const_replacement.result | 87 +++++++++++++++++++ mysql-test/main/name_const_replacement.test | 38 ++++++++ mysql-test/main/union.result | 4 +- .../innodb_fts/r/fulltext_order_by.result | 4 +- sql/item.cc | 44 ++++++++-- sql/item_subselect.cc | 16 ++-- sql/json_table.cc | 2 +- sql/opt_subselect.cc | 4 +- sql/partition_info.cc | 6 +- sql/sql_base.cc | 30 +++---- sql/sql_class.cc | 64 +++++++++++++- sql/sql_class.h | 39 +++++++-- sql/sql_derived.cc | 2 +- sql/sql_lex.cc | 6 +- sql/sql_partition.cc | 6 +- sql/sql_select.cc | 16 ++-- sql/sql_tvc.cc | 4 +- sql/sql_yacc.yy | 2 +- sql/table.cc | 7 +- 20 files changed, 310 insertions(+), 75 deletions(-) create mode 100644 mysql-test/main/name_const_replacement.result create mode 100644 mysql-test/main/name_const_replacement.test diff --git a/mysql-test/main/fulltext_order_by.result b/mysql-test/main/fulltext_order_by.result index a350a55c75d..35ae8789c7d 100644 --- a/mysql-test/main/fulltext_order_by.result +++ b/mysql-test/main/fulltext_order_by.result @@ -126,7 +126,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -142,7 +142,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/mysql-test/main/name_const_replacement.result b/mysql-test/main/name_const_replacement.result new file mode 100644 index 00000000000..bfce1dd46c1 --- /dev/null +++ b/mysql-test/main/name_const_replacement.result @@ -0,0 +1,87 @@ +create table t1 (a int, b int); +insert into t1 values (1,1),(2,2); +explain format=json +select * from t1 where a=name_const('varname',1); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "t1.a = 1" + } + } +} +explain format=json +select * from t1 left join t1 as t2 on t1.a=name_const('varname',1) and t1.b=t2.b; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "const_condition": "1", + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + }, + "block-nl-join": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "141", + "join_type": "BNL", + "attached_condition": "trigcond(t2.b = t1.b and trigcond(t1.a = 1))" + } + } +} +create table t2 ( +a varchar(100) collate utf8_unicode_ci, +b int +); +insert into t2 values ('foo', 1),('bar', 1); +create procedure p1(var1 varchar(10)) +update t2 set b=b+1 where a=var1; +call p1('foo'); +call p1('foo'); +call p1('foo'); +select * from t2; +a b +foo 4 +bar 1 +create table t3 ( +a varchar(100) collate utf8_unicode_ci, +b int +); +insert into t3 values ('foo', 1),('bar', 1); +select * from t3; +a b +foo 1 +bar 1 +explain format=json +update t3 set b=b+1 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "update": 1, + "table_name": "t3", + "access_type": "ALL", + "rows": 2, + "attached_condition": "t3.a = convert(_latin1'foo' collate latin1_swedish_ci using utf8mb3)" + } + } +} +select * from t3 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +a b +foo 1 +drop procedure p1; +drop table t1, t2, t3; diff --git a/mysql-test/main/name_const_replacement.test b/mysql-test/main/name_const_replacement.test new file mode 100644 index 00000000000..b9770d65bb0 --- /dev/null +++ b/mysql-test/main/name_const_replacement.test @@ -0,0 +1,38 @@ +# +# MDEV-33971 Using NAME_CONST() changes the plan +# + +create table t1 (a int, b int); +insert into t1 values (1,1),(2,2); +explain format=json +select * from t1 where a=name_const('varname',1); +explain format=json +select * from t1 left join t1 as t2 on t1.a=name_const('varname',1) and t1.b=t2.b; + + +create table t2 ( + a varchar(100) collate utf8_unicode_ci, + b int +); +insert into t2 values ('foo', 1),('bar', 1); +create procedure p1(var1 varchar(10)) + update t2 set b=b+1 where a=var1; +call p1('foo'); +call p1('foo'); +call p1('foo'); +select * from t2; + + +create table t3 ( + a varchar(100) collate utf8_unicode_ci, + b int +); +insert into t3 values ('foo', 1),('bar', 1); +select * from t3; +explain format=json +update t3 set b=b+1 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); +select * from t3 where a= NAME_CONST('var1',_latin1'foo' COLLATE 'latin1_swedish_ci'); + + +drop procedure p1; +drop table t1, t2, t3; diff --git a/mysql-test/main/union.result b/mysql-test/main/union.result index aab13d191a4..cd1c9022960 100644 --- a/mysql-test/main/union.result +++ b/mysql-test/main/union.result @@ -80,7 +80,7 @@ a b 2 b 1 a (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b; -ERROR 42000: Table 't1' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 't1' from one of the SELECTs cannot be used in order clause explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; id select_type table type possible_keys key key_len ref rows filtered Extra 1 PRIMARY t1 ALL NULL NULL NULL NULL 4 100.00 @@ -493,7 +493,7 @@ drop temporary table t1; create table t1 select a from t1 union select a from t2; ERROR 42S01: Table 't1' already exists select a from t1 union select a from t2 order by t2.a; -ERROR 42000: Table 't2' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 't2' from one of the SELECTs cannot be used in order clause drop table t1,t2; select length(version()) > 1 as `*` UNION select 2; * diff --git a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result index 0d3a4a85b86..02142016d40 100644 --- a/mysql-test/suite/innodb_fts/r/fulltext_order_by.result +++ b/mysql-test/suite/innodb_fts/r/fulltext_order_by.result @@ -129,7 +129,7 @@ group by a.text, b.id, b.betreff order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -145,7 +145,7 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(b.betreff) against ('+abc' in boolean mode) desc; -ERROR 42000: Table 'b' from one of the SELECTs cannot be used in ORDER clause +ERROR 42000: Table 'b' from one of the SELECTs cannot be used in order clause select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join diff --git a/sql/item.cc b/sql/item.cc index ad76b461847..d1879367e0f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2184,6 +2184,36 @@ bool Item_name_const::fix_fields(THD *thd, Item **ref) my_error(ER_RESERVED_SYNTAX, MYF(0), "NAME_CONST"); return TRUE; } + + /* + If we have either of the following: + ... WHERE foo=NAME_CONST(...) + ... JOIN ... ON foo=NAME_CONST(...) + then we have an opportunity to unwrap the NAME_CONST and + use the enclosed value directly, replacing NAME_CONST in + the parse tree with the value it encloses. + */ + if ((thd->where == THD_WHERE::WHERE_CLAUSE || + thd->where == THD_WHERE::ON_CLAUSE) && + (value_item->type() == FUNC_ITEM || + value_item->type() == CONST_ITEM)) + { + thd->change_item_tree(ref, value_item); + + /* + We're replacing NAME_CONST('name', value_item) with value_item. + Only a few constants and functions are possible as value_item, see + Create_func_name_const::create_2_arg. + Set the value_item's coercibility to be the same as NAME_CONST(...) + would have (see how it's set a few lines below). + */ + if (value_item->collation.derivation != DERIVATION_NUMERIC) + value_item->collation.set(value_item->collation.collation, + DERIVATION_IMPLICIT); + return FALSE; + } + // else, could not unwrap, fall back to default handling below. + if (value_item->collation.derivation == DERIVATION_NUMERIC) collation= DTCollation_numeric(); else @@ -5528,7 +5558,7 @@ static Item** find_field_in_group_list(Item *find_item, ORDER *group_list) is ambiguous. */ my_error(ER_NON_UNIQ_ERROR, MYF(0), - find_item->full_name(), current_thd->where); + find_item->full_name(), thd_where(current_thd)); return NULL; } } @@ -5613,7 +5643,7 @@ resolve_ref_in_select_and_group(THD *thd, Item_ident *ref, SELECT_LEX *select) push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_NON_UNIQ_ERROR, ER_THD(thd,ER_NON_UNIQ_ERROR), ref->full_name(), - thd->where); + thd_where(thd)); } } @@ -5947,7 +5977,7 @@ Item_field::fix_outer_field(THD *thd, Field **from_field, Item **reference) if (upward_lookup) { // We can't say exactly what absent table or field - my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd_where(thd)); } else { @@ -6174,7 +6204,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) { /* The column to which we link isn't valid. */ my_error(ER_BAD_FIELD_ERROR, MYF(0), (*res)->name.str, - thd->where); + thd_where(thd)); return(1); } @@ -6219,7 +6249,7 @@ bool Item_field::fix_fields(THD *thd, Item **reference) if (unlikely(!select)) { - my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), full_name(), thd_where(thd)); goto error; } if ((ret= fix_outer_field(thd, &from_field, reference)) < 0) @@ -8163,7 +8193,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) if (unlikely(!outer_context)) { /* The current reference cannot be resolved in this query. */ - my_error(ER_BAD_FIELD_ERROR,MYF(0), full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR,MYF(0), full_name(), thd_where(thd)); goto error; } @@ -8314,7 +8344,7 @@ bool Item_ref::fix_fields(THD *thd, Item **reference) { /* The item was not a table field and not a reference */ my_error(ER_BAD_FIELD_ERROR, MYF(0), - this->full_name(), thd->where); + this->full_name(), thd_where(thd)); goto error; } /* Should be checked in resolve_ref_in_select_and_group(). */ diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index af9a57f751e..dc6453f42c5 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -241,7 +241,7 @@ Item_subselect::select_transformer(JOIN *join) bool Item_subselect::fix_fields(THD *thd_param, Item **ref) { - char const *save_where= thd_param->where; + THD_WHERE save_where= thd_param->where; uint8 uncacheable; bool res; @@ -320,7 +320,7 @@ bool Item_subselect::fix_fields(THD *thd_param, Item **ref) if (have_to_be_excluded) engine->exclude(); substitution= 0; - thd->where= "checking transformed subquery"; + thd->where= THD_WHERE::CHECKING_TRANSFORMED_SUBQUERY; res= (*ref)->fix_fields_if_needed(thd, ref); goto end; @@ -3403,13 +3403,13 @@ Item_in_subselect::select_in_like_transformer(JOIN *join) { Query_arena *arena= 0, backup; SELECT_LEX *current= thd->lex->current_select; - const char *save_where= thd->where; + THD_WHERE save_where= thd->where; bool trans_res= true; bool result; DBUG_ENTER("Item_in_subselect::select_in_like_transformer"); DBUG_ASSERT(thd == join->thd); - thd->where= "IN/ALL/ANY subquery"; + thd->where= THD_WHERE::IN_ALL_ANY_SUBQUERY; /* In some optimisation cases we will not need this Item_in_optimizer @@ -3496,7 +3496,7 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref) { uint outer_cols_num; List *inner_cols; - char const *save_where= thd_arg->where; + THD_WHERE save_where= thd_arg->where; DBUG_ENTER("Item_in_subselect::fix_fields"); thd= thd_arg; @@ -3505,7 +3505,7 @@ bool Item_in_subselect::fix_fields(THD *thd_arg, Item **ref) if (test_strategy(SUBS_SEMI_JOIN)) DBUG_RETURN( !( (*ref)= new (thd->mem_root) Item_int(thd, 1)) ); - thd->where= "IN/ALL/ANY subquery"; + thd->where= THD_WHERE::IN_ALL_ANY_SUBQUERY; /* Check if the outer and inner IN operands match in those cases when we will not perform IN=>EXISTS transformation. Currently this is when we @@ -4016,7 +4016,7 @@ int join_read_next_same_or_null(READ_RECORD *info); int subselect_single_select_engine::exec() { - char const *save_where= thd->where; + THD_WHERE save_where= thd->where; SELECT_LEX *save_select= thd->lex->current_select; thd->lex->current_select= select_lex; DBUG_ENTER("subselect_single_select_engine::exec"); @@ -4137,7 +4137,7 @@ int subselect_single_select_engine::exec() int subselect_union_engine::exec() { - char const *save_where= thd->where; + THD_WHERE save_where= thd->where; int res= unit->exec(); thd->where= save_where; return res; diff --git a/sql/json_table.cc b/sql/json_table.cc index 65fe3c9a659..d4ba9f88a78 100644 --- a/sql/json_table.cc +++ b/sql/json_table.cc @@ -1146,7 +1146,7 @@ bool push_table_function_arg_context(LEX *lex, MEM_ROOT *alloc) bool Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table, SELECT_LEX *s_lex) { - thd->where= "JSON_TABLE argument"; + thd->where= THD_WHERE::JSON_TABLE_ARGUMENT; if (!m_context_setup_done) { diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 8690acded99..3dc281bca10 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -638,8 +638,8 @@ int check_and_do_in_subquery_rewrites(JOIN *join) { SELECT_LEX *current= thd->lex->current_select; thd->lex->current_select= current->return_after_parsing(); - char const *save_where= thd->where; - thd->where= "IN/ALL/ANY subquery"; + THD_WHERE save_where= thd->where; + thd->where= THD_WHERE::IN_ALL_ANY_SUBQUERY; Item **left= in_subs->left_exp_ptr(); bool failure= (*left)->fix_fields_if_needed(thd, left); diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 3af7e97db2b..3cefeae32b6 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1824,7 +1824,7 @@ bool partition_info::add_column_list_value(THD *thd, Item *item) part_column_list_val *col_val; Name_resolution_context *context= &thd->lex->current_select->context; TABLE_LIST *save_list= context->table_list; - const char *save_where= thd->where; + THD_WHERE save_where= thd->where; DBUG_ENTER("partition_info::add_column_list_value"); if (part_type == LIST_PARTITION && @@ -1838,9 +1838,9 @@ bool partition_info::add_column_list_value(THD *thd, Item *item) context->table_list= 0; if (column_list) - thd->where= "field list"; + thd->where= THD_WHERE::FIELD_LIST; else - thd->where= "partition function"; + thd->where= THD_WHERE::PARTITION_FUNCTION; if (item->walk(&Item::check_partition_func_processor, 0, NULL)) { diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 70c5b4ffbf6..f27868c83e8 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5957,7 +5957,7 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name, si { if (nj_col) { - my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd->where); + my_error(ER_NON_UNIQ_ERROR, MYF(0), name, thd_where(thd)); DBUG_RETURN(NULL); } nj_col= curr_nj_col; @@ -6604,7 +6604,7 @@ find_field_in_tables(THD *thd, Item_ident *item, item->cached_field_index= NO_CACHED_FIELD_INDEX; } - DBUG_ASSERT(thd->where); + DBUG_ASSERT(thd->where != THD_WHERE::NOWHERE); /* If we found a fully qualified field we return it directly as it can't have duplicates. @@ -6617,7 +6617,7 @@ find_field_in_tables(THD *thd, Item_ident *item, if (report_error == REPORT_ALL_ERRORS || report_error == IGNORE_EXCEPT_NON_UNIQUE) my_error(ER_NON_UNIQ_ERROR, MYF(0), - table_name ? item->full_name() : name, thd->where); + table_name ? item->full_name() : name, thd_where(thd)); return (Field*) 0; } found= cur_field; @@ -6645,13 +6645,13 @@ find_field_in_tables(THD *thd, Item_ident *item, strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS); table_name=buff; } - my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd->where); + my_error(ER_UNKNOWN_TABLE, MYF(0), table_name, thd_where(thd)); } else { if (report_error == REPORT_ALL_ERRORS || report_error == REPORT_EXCEPT_NON_UNIQUE) - my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(), thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), item->full_name(), thd_where(thd)); else found= not_found_field; } @@ -6784,7 +6784,7 @@ find_item_in_list(Item *find, List &items, uint *counter, */ if (report_error != IGNORE_ERRORS) my_error(ER_NON_UNIQ_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item**) 0; } found_unaliased= li.ref(); @@ -6815,7 +6815,7 @@ find_item_in_list(Item *find, List &items, uint *counter, continue; // Same field twice if (report_error != IGNORE_ERRORS) my_error(ER_NON_UNIQ_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item**) 0; } found= li.ref(); @@ -6870,7 +6870,7 @@ find_item_in_list(Item *find, List &items, uint *counter, { if (report_error != IGNORE_ERRORS) my_error(ER_NON_UNIQ_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item **) 0; } if (found_unaliased) @@ -6887,7 +6887,7 @@ find_item_in_list(Item *find, List &items, uint *counter, { if (report_error == REPORT_ALL_ERRORS) my_error(ER_BAD_FIELD_ERROR, MYF(0), - find->full_name(), current_thd->where); + find->full_name(), thd_where(current_thd)); return (Item **) 0; } else @@ -7093,7 +7093,7 @@ mark_common_columns(THD *thd, TABLE_LIST *table_ref_1, TABLE_LIST *table_ref_2, DBUG_PRINT ("info", ("match c1.is_common=%d", nj_col_1->is_common)); if (cur_nj_col_2->is_common || found) { - my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1->str, thd->where); + my_error(ER_NON_UNIQ_ERROR, MYF(0), field_name_1->str, thd_where(thd)); goto err; } if ((!using_fields && !field_2_invisible) || is_using_column_1) @@ -7307,7 +7307,7 @@ store_natural_using_join_columns(THD *thd, TABLE_LIST *natural_using_join, if (!(common_field= it++)) { my_error(ER_BAD_FIELD_ERROR, MYF(0), using_field_name_ptr, - current_thd->where); + thd_where(current_thd)); goto err; } if (!my_strcasecmp(system_charset_info, @@ -7561,7 +7561,7 @@ static bool setup_natural_join_row_types(THD *thd, Name_resolution_context *context) { DBUG_ENTER("setup_natural_join_row_types"); - thd->where= "from clause"; + thd->where= THD_WHERE::FROM_CLAUSE; if (from_clause->elements == 0) DBUG_RETURN(false); /* We come here in the case of UNIONs. */ @@ -7732,7 +7732,7 @@ bool setup_fields(THD *thd, Ref_ptr_array ref_pointer_array, thd->lex->current_select->nest_level); if (allow_sum_func) thd->lex->allow_sum_func.set_bit(thd->lex->current_select->nest_level); - thd->where= THD::DEFAULT_WHERE; + thd->where= THD_WHERE::DEFAULT_WHERE; save_is_item_list_lookup= thd->lex->current_select->is_item_list_lookup; thd->lex->current_select->is_item_list_lookup= 0; @@ -8491,7 +8491,7 @@ bool setup_on_expr(THD *thd, TABLE_LIST *table, bool is_update) embedded= embedding; if (embedded->on_expr) { - thd->where="on clause"; + thd->where= THD_WHERE::ON_CLAUSE; embedded->on_expr->mark_as_condition_AND_part(embedded); if (embedded->on_expr->fix_fields_if_needed_for_bool(thd, &embedded->on_expr)) @@ -8592,7 +8592,7 @@ int setup_conds(THD *thd, TABLE_LIST *tables, List &leaves, if (*conds) { - thd->where="where clause"; + thd->where= THD_WHERE::WHERE_CLAUSE; DBUG_EXECUTE("where", print_where(*conds, "WHERE in setup_conds", diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 7272ee2531b..6419a58fbe4 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -83,8 +83,6 @@ char internal_table_name[2]= "*"; char empty_c_string[1]= {0}; /* used for not defined db */ -const char * const THD::DEFAULT_WHERE= "field list"; - /**************************************************************************** ** User variables ****************************************************************************/ @@ -629,6 +627,64 @@ extern "C" void thd_kill_timeout(THD* thd) thd->awake(KILL_TIMEOUT); } +const char *thd_where(THD *thd) +{ + switch(thd->where) { + case THD_WHERE::CHECKING_TRANSFORMED_SUBQUERY: + return "checking transformed subquery"; + break; + case THD_WHERE::IN_ALL_ANY_SUBQUERY: + return "IN/ALL/ANY subquery"; + break; + case THD_WHERE::JSON_TABLE_ARGUMENT: + return "JSON_TABLE argument"; + break; + case THD_WHERE::DEFAULT_WHERE: // same as FIELD_LIST + case THD_WHERE::FIELD_LIST: + return "field list"; + break; + case THD_WHERE::PARTITION_FUNCTION: + return "partition function"; + break; + case THD_WHERE::FROM_CLAUSE: + return "from clause"; + break; + case THD_WHERE::ON_CLAUSE: + return "on clause"; + break; + case THD_WHERE::WHERE_CLAUSE: + return "where clause"; + break; + case THD_WHERE::CONVERT_CHARSET_CONST: + return "convert character set partition constant"; + break; + case THD_WHERE::FOR_SYSTEM_TIME: + return "FOR SYSTEM_TIME"; + break; + case THD_WHERE::ORDER_CLAUSE: + return "order clause"; + break; + case THD_WHERE::HAVING_CLAUSE: + return "having clause"; + break; + case THD_WHERE::GROUP_STATEMENT: + return "group statement"; + break; + case THD_WHERE::PROCEDURE_LIST: + return "procedure list"; + break; + case THD_WHERE::CHECK_OPTION: + return "check option"; + break; + case THD_WHERE::USE_WHERE_STRING: + return thd->where_str; + default: + break; // "fall-through" to default return below + }; + DBUG_ASSERT(false); + return "UNKNOWN"; +} + THD::THD(my_thread_id id, bool is_wsrep_applier) :Statement(&main_lex, &main_mem_root, STMT_CONVENTIONAL_EXECUTION, /* statement id */ 0), @@ -838,7 +894,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier) /* Variables with default values */ proc_info="login"; - where= THD::DEFAULT_WHERE; + where= THD_WHERE::DEFAULT_WHERE; slave_net = 0; m_command=COM_CONNECT; *scramble= '\0'; @@ -2328,7 +2384,7 @@ void THD::cleanup_after_query() /* Free Items that were created during this execution */ free_items(); /* Reset where. */ - where= THD::DEFAULT_WHERE; + where= THD_WHERE::DEFAULT_WHERE; /* reset table map for multi-table update */ table_map_for_update= 0; m_binlog_invoker= INVOKER_NONE; diff --git a/sql/sql_class.h b/sql/sql_class.h index bcc300a8f2c..a9d89871025 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -2668,6 +2668,33 @@ struct thd_async_state }; +enum class THD_WHERE +{ + NOWHERE = 0, + CHECKING_TRANSFORMED_SUBQUERY, + IN_ALL_ANY_SUBQUERY, + JSON_TABLE_ARGUMENT, + FIELD_LIST, + PARTITION_FUNCTION, + FROM_CLAUSE, + DEFAULT_WHERE, + ON_CLAUSE, + WHERE_CLAUSE, + CONVERT_CHARSET_CONST, + FOR_SYSTEM_TIME, + ORDER_CLAUSE, + HAVING_CLAUSE, + GROUP_STATEMENT, + PROCEDURE_LIST, + CHECK_OPTION, + USE_WHERE_STRING, // ugh, a compromise for vcol... +}; + + +class THD; +const char *thd_where(THD *thd); + + /** @class THD For each client connection we create a separate thread with THD serving as @@ -2720,13 +2747,6 @@ public: MDL_request *backup_commit_lock; void reset_for_next_command(bool do_clear_errors= 1); - /* - Constant for THD::where initialization in the beginning of every query. - - It's needed because we do not save/restore THD::where normally during - primary (non subselect) query execution. - */ - static const char * const DEFAULT_WHERE; #ifdef EMBEDDED_LIBRARY struct st_mysql *mysql; @@ -2882,12 +2902,15 @@ public: const char *get_proc_info() const { return proc_info; } + // Used by thd_where() when where==USE_WHERE_STRING + const char *where_str; + /* Used in error messages to tell user in what part of MySQL we found an error. E. g. when where= "having clause", if fix_fields() fails, user will know that the error was in having clause. */ - const char *where; + THD_WHERE where; /* Needed by MariaDB semi sync replication */ Trans_binlog_info *semisync_info; diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index de5a1f63019..78ec80ccad6 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -431,7 +431,7 @@ bool mysql_derived_merge(THD *thd, LEX *lex, TABLE_LIST *derived) derived->on_expr= expr; derived->prep_on_expr= expr->copy_andor_structure(thd); } - thd->where= "on clause"; + thd->where= THD_WHERE::ON_CLAUSE; if (derived->on_expr && derived->on_expr->fix_fields_if_needed_for_bool(thd, &derived->on_expr)) { diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index f8acaa24278..e3dc7b7ee8b 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -8147,7 +8147,7 @@ bool LEX::check_expr_allows_fields_or_error(THD *thd, const char *name) const { if (select_stack_top > 0) return false; // OK, fields are allowed - my_error(ER_BAD_FIELD_ERROR, MYF(0), name, thd->where); + my_error(ER_BAD_FIELD_ERROR, MYF(0), name, thd_where(thd)); return true; // Error, fields are not allowed } @@ -8170,7 +8170,7 @@ Item *LEX::create_item_ident_nospvar(THD *thd, if (unlikely(current_select->no_table_names_allowed)) { - my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), a->str, thd->where); + my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), a->str, thd_where(thd)); return NULL; } @@ -8385,7 +8385,7 @@ Item *LEX::create_item_ident(THD *thd, if (current_select->no_table_names_allowed) { - my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), b->str, thd->where); + my_error(ER_TABLENAME_NOT_ALLOWED_HERE, MYF(0), b->str, thd_where(thd)); return NULL; } diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 20ab2da10a6..1006c18ae11 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -142,11 +142,11 @@ Item* convert_charset_partition_constant(Item *item, CHARSET_INFO *cs) THD *thd= current_thd; Name_resolution_context *context= &thd->lex->current_select->context; TABLE_LIST *save_list= context->table_list; - const char *save_where= thd->where; + THD_WHERE save_where= thd->where; item= item->safe_charset_converter(thd, cs); context->table_list= NULL; - thd->where= "convert character set partition constant"; + thd->where= THD_WHERE::CONVERT_CHARSET_CONST; if (item && item->fix_fields_if_needed(thd, (Item**)NULL)) item= NULL; thd->where= save_where; @@ -841,7 +841,7 @@ static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table, func_expr->walk(&Item::change_context_processor, 0, &lex.first_select_lex()->context); - thd->where= "partition function"; + thd->where= THD_WHERE::PARTITION_FUNCTION; /* In execution we must avoid the use of thd->change_item_tree since we might release memory before statement is completed. We do this diff --git a/sql/sql_select.cc b/sql/sql_select.cc index cf5a2983551..4e109d634ca 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1245,7 +1245,7 @@ int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables) if (vers_conditions.is_set() && vers_conditions.type != SYSTEM_TIME_HISTORY) { - thd->where= "FOR SYSTEM_TIME"; + thd->where= THD_WHERE::FOR_SYSTEM_TIME; /* TODO: do resolve fix_length_and_dec(), fix_fields(). This requires storing vers_conditions as Item and make some magic related to vers_system_time_t/VERS_TRX_ID at stage of fix_fields() @@ -1530,7 +1530,7 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num, { nesting_map save_allow_sum_func= thd->lex->allow_sum_func; thd->lex->allow_sum_func.set_bit(select_lex->nest_level); - thd->where= "order clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; for (ORDER *order= select_lex->order_list.first; order; order= order->next) { /* Don't add the order items to all fields. Just resolve them to ensure @@ -1546,7 +1546,7 @@ JOIN::prepare(TABLE_LIST *tables_init, COND *conds_init, uint og_num, if (having) { nesting_map save_allow_sum_func= thd->lex->allow_sum_func; - thd->where="having clause"; + thd->where= THD_WHERE::HAVING_CLAUSE; thd->lex->allow_sum_func.set_bit(select_lex_arg->nest_level); select_lex->having_fix_field= 1; /* @@ -25986,7 +25986,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, if (!count || count > fields.elements) { my_error(ER_BAD_FIELD_ERROR, MYF(0), - order_item->full_name(), thd->where); + order_item->full_name(), thd_where(thd)); return TRUE; } thd->change_item_tree((Item **)&order->item, (Item *)&ref_pointer_array[count - 1]); @@ -26065,7 +26065,7 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, ER_NON_UNIQ_ERROR, ER_THD(thd, ER_NON_UNIQ_ERROR), ((Item_ident*) order_item)->field_name.str, - thd->where); + thd_where(thd)); } } else if (from_window_spec) @@ -26135,7 +26135,7 @@ int setup_order(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, SELECT_LEX *select = thd->lex->current_select; enum_parsing_place context_analysis_place= thd->lex->current_select->context_analysis_place; - thd->where="order clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; const bool for_union= select->master_unit()->is_unit_op() && select == select->master_unit()->fake_select_lex; for (uint number = 1; order; order=order->next, number++) @@ -26214,7 +26214,7 @@ setup_group(THD *thd, Ref_ptr_array ref_pointer_array, TABLE_LIST *tables, uint org_fields=all_fields.elements; - thd->where="group statement"; + thd->where= THD_WHERE::GROUP_STATEMENT; for (ord= order; ord; ord= ord->next) { if (find_order_in_list(thd, ref_pointer_array, tables, ord, fields, @@ -26332,7 +26332,7 @@ setup_new_fields(THD *thd, List &fields, new_field->item=item; /* Change to shared Item */ else { - thd->where="procedure list"; + thd->where= THD_WHERE::PROCEDURE_LIST; if ((*new_field->item)->fix_fields(thd, new_field->item)) DBUG_RETURN(1); /* purecov: inspected */ all_fields.push_front(*new_field->item, thd->mem_root); diff --git a/sql/sql_tvc.cc b/sql/sql_tvc.cc index 3d3dd2135f2..2e7a5e1c9d8 100644 --- a/sql/sql_tvc.cc +++ b/sql/sql_tvc.cc @@ -312,7 +312,7 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl, (thd->lex->context_analysis_only & CONTEXT_ANALYSIS_ONLY_VIEW) */ - thd->where="order clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; ORDER *order= sl->order_list.first; for (; order; order=order->next) { @@ -327,7 +327,7 @@ bool table_value_constr::prepare(THD *thd, SELECT_LEX *sl, if (!count || count > first_elem->elements) { my_error(ER_BAD_FIELD_ERROR, MYF(0), - order_item->full_name(), thd->where); + order_item->full_name(), thd_where(thd)); DBUG_RETURN(true); } order->in_field_list= 1; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 023af109a3f..ed2bcd5deb9 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -12520,7 +12520,7 @@ opt_order_clause: order_clause: ORDER_SYM BY { - thd->where= "ORDER clause"; + thd->where= THD_WHERE::ORDER_CLAUSE; } order_list { diff --git a/sql/table.cc b/sql/table.cc index 2c2ae5b5e22..1906acd14e2 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1212,7 +1212,8 @@ bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table, expr_str.length(parse_vcol_keyword.length); expr_str.append((char*)pos, expr_length); - thd->where= vcol_type_name(static_cast(type)); + thd->where= THD_WHERE::USE_WHERE_STRING; + thd->where_str= vcol_type_name(static_cast(type)); switch (type) { case VCOL_GENERATED_VIRTUAL: @@ -6282,8 +6283,8 @@ bool TABLE_LIST::prep_check_option(THD *thd, uint8 check_opt_type) if (check_option) { - const char *save_where= thd->where; - thd->where= "check option"; + THD_WHERE save_where= thd->where; + thd->where= THD_WHERE::CHECK_OPTION; if (check_option->fix_fields_if_needed_for_bool(thd, &check_option)) DBUG_RETURN(TRUE); thd->where= save_where; From eaf7c0cbead56f61d4cecfa88fc0971a9d917002 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 11 Jul 2024 16:51:39 +1000 Subject: [PATCH 11/60] mtr: remove not_valgrind_build The version test on not_valgrind_build.inc was broken as in BB the sp-no-valgrind.test was executed. The implication that it wouldn't work on ASAN was also incorrect as ASAN tests show it running fine there. Correct sp-no-valgrind.test for not_valgrind.inc. --- mysql-test/include/not_valgrind_build.inc | 4 ---- mysql-test/main/sp-no-valgrind.test | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 mysql-test/include/not_valgrind_build.inc diff --git a/mysql-test/include/not_valgrind_build.inc b/mysql-test/include/not_valgrind_build.inc deleted file mode 100644 index b62a1bc953b..00000000000 --- a/mysql-test/include/not_valgrind_build.inc +++ /dev/null @@ -1,4 +0,0 @@ -if (`select version() like '%valgrind%' || version() like '%asan%'`) -{ - skip Does not run with binaries built with valgrind or asan; -} diff --git a/mysql-test/main/sp-no-valgrind.test b/mysql-test/main/sp-no-valgrind.test index 6bacc7b150c..1b4a0f84f1e 100644 --- a/mysql-test/main/sp-no-valgrind.test +++ b/mysql-test/main/sp-no-valgrind.test @@ -1,5 +1,5 @@ --source include/not_msan.inc ---source include/not_valgrind_build.inc +--source include/not_valgrind.inc --echo # MDEV-20699 do not cache SP in SHOW CREATE --echo # Warmup round, this might allocate some memory for session variable From a5e4c34991ed98357fafd6821eb756ad37ee0353 Mon Sep 17 00:00:00 2001 From: Galina Shalygina Date: Tue, 9 Jul 2024 17:37:04 +0200 Subject: [PATCH 12/60] MDEV-32608: Expression with constant subquery causes a crash in pushdown from HAVING The bug is caused by refixing of the constant subquery in pushdown from HAVING into WHERE optimization. Similarly to MDEV-29363 in the problematic query two references of the constant subquery are used. After the pushdown one of the references of the subquery is pushed into WHERE-clause and the second one remains as the part of the HAVING-clause. Before the represented fix, the constant subquery reference that was going to be pushed into WHERE was cleaned up and fixed. That caused the changes of the subquery itself and, therefore, changes for the second reference that remained in HAVING. These changes caused a crash. To fix this problem all constant objects that are going to be pushed into WHERE should be marked with an IMMUTABLE_FL flag. Objects marked with this flag are not cleaned up or fixed in the pushdown optimization. Approved by Igor Babaev --- mysql-test/main/having_cond_pushdown.result | 87 +++++++++++++++++++++ mysql-test/main/having_cond_pushdown.test | 26 ++++++ sql/item.cc | 19 +++++ sql/item.h | 3 +- sql/sql_lex.cc | 10 +-- 5 files changed, 138 insertions(+), 7 deletions(-) diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result index e5e99fe2381..9713f014f43 100644 --- a/mysql-test/main/having_cond_pushdown.result +++ b/mysql-test/main/having_cond_pushdown.result @@ -5092,4 +5092,91 @@ SELECT * FROM v1 GROUP BY a HAVING a = (a IS NULL OR a IS NULL); a DROP VIEW v1; +# +# MDEV-32608: Expression with constant subquery causes a crash +# in pushdown from HAVING +# +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (2, 1), (3, 2); +EXPLAIN FORMAT=JSON SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a + b = 3; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "having_condition": "t1.a = (subquery#2)", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "(subquery#2) + t1.b = 3" + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } + } + } + ] + } + } + } +} +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a + b = 3; +a b +2 1 +EXPLAIN FORMAT=JSON SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a > b; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "having_condition": "t1.a = (subquery#2)", + "filesort": { + "sort_key": "t1.b", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100, + "attached_condition": "(subquery#2) > t1.b" + }, + "subqueries": [ + { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } + } + } + ] + } + } + } +} +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a > b; +a b +2 1 +DROP TABLE t1; End of 10.5 tests diff --git a/mysql-test/main/having_cond_pushdown.test b/mysql-test/main/having_cond_pushdown.test index f2812fb14f2..fd414e62a8c 100644 --- a/mysql-test/main/having_cond_pushdown.test +++ b/mysql-test/main/having_cond_pushdown.test @@ -1558,4 +1558,30 @@ SELECT * FROM v1 DROP VIEW v1; +--echo # +--echo # MDEV-32608: Expression with constant subquery causes a crash +--echo # in pushdown from HAVING +--echo # + +CREATE TABLE t1 (a INT, b INT); +INSERT INTO t1 VALUES (2, 1), (3, 2); + +let $q= +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a + b = 3; + +eval EXPLAIN FORMAT=JSON $q; +eval $q; + +let $q= +SELECT * FROM t1 +GROUP BY b +HAVING (SELECT MAX(b) FROM t1) = a AND a > b; + +eval EXPLAIN FORMAT=JSON $q; +eval $q; + +DROP TABLE t1; + --echo End of 10.5 tests diff --git a/sql/item.cc b/sql/item.cc index 55960ab8739..e1ad7e7d13b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1272,6 +1272,25 @@ bool Item::eq(const Item *item, bool binary_cmp) const } +Item *Item::multiple_equality_transformer(THD *thd, uchar *arg) +{ + if (const_item()) + { + /* + Mark constant item in the condition with the IMMUTABLE_FL flag. + It is needed to prevent cleanup of the sub-items of this item and following + fix_fields() call that can cause a crash on this step of the optimization. + This flag will be removed at the end of the pushdown optimization by + remove_immutable_flag_processor processor. + */ + int new_flag= IMMUTABLE_FL; + this->walk(&Item::set_extraction_flag_processor, false, + (void*)&new_flag); + } + return this; +} + + Item *Item::safe_charset_converter(THD *thd, CHARSET_INFO *tocs) { if (!needs_charset_converter(tocs)) diff --git a/sql/item.h b/sql/item.h index 73c775a849d..6e8bcd347a4 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2295,8 +2295,7 @@ public: { return this; } virtual Item *field_transformer_for_having_pushdown(THD *thd, uchar *arg) { return this; } - virtual Item *multiple_equality_transformer(THD *thd, uchar *arg) - { return this; } + virtual Item *multiple_equality_transformer(THD *thd, uchar *arg); virtual bool expr_cache_is_needed(THD *) { return FALSE; } virtual Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs); bool needs_charset_converter(uint32 length, CHARSET_INFO *tocs) const diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index e114d6de5e1..2dc5d119fd5 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -10902,7 +10902,11 @@ void mark_or_conds_to_avoid_pushdown(Item *cond) (if cond is marked with FULL_EXTRACTION_FL or cond is an AND condition and some of its parts are marked with FULL_EXTRACTION_FL) - In this case condition is transformed and pushed into attach_to_conds + + In this case condition is transformed with multiple_equality_transformer + transformer. It transforms all multiple equalities in the extracted + condition into the set of equalities. + After that the transformed condition is attached into attach_to_conds list. 2. Part of some other condition c1 that can't be entirely pushed (if ั1 isn't marked with any flag). @@ -10919,10 +10923,6 @@ void mark_or_conds_to_avoid_pushdown(Item *cond) In this case build_pushable_cond() is called for c1. This method builds a clone of the c1 part that can be pushed. - Transformation mentioned above is made with multiple_equality_transformer - transformer. It transforms all multiple equalities in the extracted - condition into the set of equalities. - @note Conditions that can be pushed are collected in attach_to_conds in this way: 1. if cond is an AND condition its parts that can be pushed into WHERE From aae3233c4f8cb0a4b7e232f60b3451d86bccc1ff Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Sat, 4 May 2024 19:50:55 +0700 Subject: [PATCH 13/60] MDEV-34041 Display additional information for materialized subqueries in EXPLAIN/ANALYZE FORMAT=JSON This commits adds the "materialization" block to the output of EXPLAIN/ANALYZE FORMAT=JSON when materialized subqueries are involved into processing. In the case of ANALYZE additional runtime information is displayed, such as: - chosen strategy of materialization - number of partial match/index lookup loops - sizes of partial match buffers --- mysql-test/include/analyze-format.inc | 2 +- mysql-test/main/analyze_format_json.result | 30 +- mysql-test/main/derived_cond_pushdown.result | 210 ++-- mysql-test/main/explain_json.result | 34 +- mysql-test/main/having_cond_pushdown.result | 84 +- mysql-test/main/in_subq_cond_pushdown.result | 966 ++++++++++-------- .../main/subselect_mat_analyze_json.result | 945 +++++++++++++++++ .../main/subselect_mat_analyze_json.test | 99 ++ sql/item_subselect.cc | 47 +- sql/item_subselect.h | 119 ++- sql/sql_array.h | 12 + sql/sql_explain.cc | 55 + sql/sql_explain.h | 31 + sql/sql_select.cc | 5 + 14 files changed, 2024 insertions(+), 615 deletions(-) create mode 100644 mysql-test/main/subselect_mat_analyze_json.result create mode 100644 mysql-test/main/subselect_mat_analyze_json.test diff --git a/mysql-test/include/analyze-format.inc b/mysql-test/include/analyze-format.inc index 330be82ef96..89d290a87ea 100644 --- a/mysql-test/include/analyze-format.inc +++ b/mysql-test/include/analyze-format.inc @@ -1,3 +1,3 @@ # The time on ANALYSE FORMAT=JSON is rather variable ---replace_regex /("(r_[a-z_]*_time_ms|r_buffer_size)": )[^, \n]*/\1"REPLACED"/ +--replace_regex /("(r_[a-z_]*_time_ms|r_buffer_size|r_partial_match_buffer_size)": )[^, \n]*/\1"REPLACED"/ diff --git a/mysql-test/main/analyze_format_json.result b/mysql-test/main/analyze_format_json.result index 5b125b26e18..8c4fc5d051a 100644 --- a/mysql-test/main/analyze_format_json.result +++ b/mysql-test/main/analyze_format_json.result @@ -659,20 +659,24 @@ ANALYZE }, "subqueries": [ { - "query_block": { - "select_id": 2, - "r_loops": 1, - "r_total_time_ms": "REPLACED", - "table": { - "table_name": "t1", - "access_type": "ALL", + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 2, + "query_block": { + "select_id": 2, "r_loops": 1, - "rows": 2, - "r_rows": 2, - "r_table_time_ms": "REPLACED", - "r_other_time_ms": "REPLACED", - "filtered": 100, - "r_filtered": 100 + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } } } } diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result index 9932eb04024..f13f04a26dc 100644 --- a/mysql-test/main/derived_cond_pushdown.result +++ b/mysql-test/main/derived_cond_pushdown.result @@ -7671,10 +7671,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "message": "Select tables optimized away" + } } } } @@ -7731,10 +7733,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "message": "Select tables optimized away" + } } } } @@ -7815,10 +7819,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -7872,10 +7878,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -7924,10 +7932,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -7976,10 +7986,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -8030,10 +8042,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -8082,10 +8096,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -8134,10 +8150,12 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "table": { - "message": "Select tables optimized away" + "materialization": { + "query_block": { + "select_id": 3, + "table": { + "message": "Select tables optimized away" + } } } } @@ -8223,10 +8241,12 @@ EXPLAIN }, "subqueries": [ { - "query_block": { - "select_id": 2, - "table": { - "message": "Impossible WHERE" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "message": "Impossible WHERE" + } } } } @@ -9294,27 +9314,29 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "t2.e > 1" + } } } } @@ -9396,27 +9418,29 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 5, - "filtered": 100, - "attached_condition": "d_tab.max_f > 20", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_f > 20", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 5, - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 5, + "filtered": 100, + "attached_condition": "d_tab.max_f > 20", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_f > 20", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 5, + "filtered": 100 + } } } } @@ -10826,16 +10850,18 @@ EXPLAIN "attached_condition": "t4.c = ``.`sum(b)`", "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`f1(a)` > 1 and `sum(b)` > 123", - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 3, - "filtered": 100, - "attached_condition": "t1.a + 1 > 10" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`f1(a)` > 1 and `sum(b)` > 123", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 3, + "filtered": 100, + "attached_condition": "t1.a + 1 > 10" + } } } } diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result index 0bf565b701d..e93d62426af 100644 --- a/mysql-test/main/explain_json.result +++ b/mysql-test/main/explain_json.result @@ -574,14 +574,16 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t1", - "access_type": "ALL", - "rows": 10, - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 10, + "filtered": 100 + } } } } @@ -906,13 +908,15 @@ EXPLAIN }, "subqueries": [ { - "query_block": { - "select_id": 2, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 2, - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } } } } diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result index 9713f014f43..3531c855781 100644 --- a/mysql-test/main/having_cond_pushdown.result +++ b/mysql-test/main/having_cond_pushdown.result @@ -1134,15 +1134,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 4, - "filtered": 100, - "attached_condition": "t2.x < 5 and t2.x > 1" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 4, + "filtered": 100, + "attached_condition": "t2.x < 5 and t2.x > 1" + } } } } @@ -1183,15 +1185,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 4, - "filtered": 100, - "attached_condition": "t2.x < 5 and t2.x > 1" + "materialization": { + "query_block": { + "select_id": 3, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 4, + "filtered": 100, + "attached_condition": "t2.x < 5 and t2.x > 1" + } } } } @@ -1257,16 +1261,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.y)` < 14", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 4, - "filtered": 100, - "attached_condition": "t2.x < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.y)` < 14", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 4, + "filtered": 100, + "attached_condition": "t2.x < 5" + } } } } @@ -1307,16 +1313,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "having_condition": "`MAX(t2.y)` < 14", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 4, - "filtered": 100, - "attached_condition": "t2.x < 5" + "materialization": { + "query_block": { + "select_id": 3, + "having_condition": "`MAX(t2.y)` < 14", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 4, + "filtered": 100, + "attached_condition": "t2.x < 5" + } } } } diff --git a/mysql-test/main/in_subq_cond_pushdown.result b/mysql-test/main/in_subq_cond_pushdown.result index eef320d2d04..0e1d1df1875 100644 --- a/mysql-test/main/in_subq_cond_pushdown.result +++ b/mysql-test/main/in_subq_cond_pushdown.result @@ -70,16 +70,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` < 25", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` < 25", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -159,16 +161,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` > 55 and t2.f < 4", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` > 55 and t2.f < 4", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -250,16 +254,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -339,16 +345,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "(`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25) and t2.f > 2", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "(`MAX(t2.g)` > 60 or `MAX(t2.g)` < 25) and t2.f > 2", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -430,16 +438,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "t2.f > 1", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "t2.f > 1", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -519,16 +529,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(v1_y)` > 20", - "temporary_table": { - "table": { - "table_name": "t3", - "access_type": "ALL", - "rows": 8, - "filtered": 100, - "attached_condition": "t3.x > 1 and t3.x <= 3" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(v1_y)` > 20", + "temporary_table": { + "table": { + "table_name": "t3", + "access_type": "ALL", + "rows": 8, + "filtered": 100, + "attached_condition": "t3.x > 1 and t3.x <= 3" + } } } } @@ -621,16 +633,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` > 20", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` > 20", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -712,15 +726,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e < 2" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e < 2" + } } } } @@ -802,15 +818,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 2 and t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 2 and t2.e < 5" + } } } } @@ -894,15 +912,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e >= 4)" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e >= 4)" + } } } } @@ -982,15 +1002,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + } } } } @@ -1070,15 +1092,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and (t2.e < 2 or t2.e = 5) and t2.f > 3" + } } } } @@ -1158,15 +1182,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e < 2" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e < 2" + } } } } @@ -1246,14 +1272,16 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e = 1" + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e = 1" + } } } } @@ -1332,15 +1360,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 1" + } } } } @@ -1418,15 +1448,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t3", - "access_type": "ALL", - "rows": 8, - "filtered": 100, - "attached_condition": "t3.x > 1 and t3.x <= 3 and t3.x < 3" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t3", + "access_type": "ALL", + "rows": 8, + "filtered": 100, + "attached_condition": "t3.x > 1 and t3.x <= 3 and t3.x < 3" + } } } } @@ -1521,15 +1553,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e <= 3" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e <= 3" + } } } } @@ -1610,16 +1644,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "t2.f < 3 or t2.f = 4", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e < 3" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "t2.f < 3 or t2.f = 4", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e < 3" + } } } } @@ -1699,16 +1735,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "t2.e + `MAX(t2.g)` > 41", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "t2.e + `MAX(t2.g)` > 41", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -1790,16 +1828,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` - t2.e < 35", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` - t2.e < 35", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -1879,16 +1919,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` * t2.e > 100", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` * t2.e > 100", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -1972,16 +2014,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` / t2.e > 30", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` / t2.e > 30", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -2061,16 +2105,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "`MAX(t2.g)` between 50 and 100", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "`MAX(t2.g)` between 50 and 100", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -2150,15 +2196,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e + t2.f > 5" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e + t2.f > 5" + } } } } @@ -2238,15 +2286,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e - t2.f > 0" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e - t2.f > 0" + } } } } @@ -2326,15 +2376,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e * t2.f > 6" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e * t2.f > 6" + } } } } @@ -2416,15 +2468,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.f / t2.e > 2" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.f / t2.e > 2" + } } } } @@ -2510,15 +2564,17 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e between 1 and 3" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e between 1 and 3" + } } } } @@ -2602,29 +2658,31 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "v2.max_g > 3", - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "v2.e < 5", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_g > 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "v2.max_g > 3", + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "v2.e < 5", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_g > 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5" + } } } } @@ -2712,28 +2770,30 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "v2.e < 5 and v2.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_g > 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "v2.e < 5 and v2.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_g > 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 1" + } } } } @@ -2822,29 +2882,31 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "having_condition": "v2.max_g < 100", - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "v2.e < 5 and v2.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_g > 25", - "filesort": { - "sort_key": "t2.e", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.e > 1" + "materialization": { + "query_block": { + "select_id": 2, + "having_condition": "v2.max_g < 100", + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "v2.e < 5 and v2.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_g > 25", + "filesort": { + "sort_key": "t2.e", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.e > 1" + } } } } @@ -2956,27 +3018,29 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "d_tab.e < 5 and d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", - "filesort": { - "sort_key": "t2.f", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "d_tab.e < 5 and d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", + "filesort": { + "sort_key": "t2.f", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100 + } } } } @@ -3107,27 +3171,29 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "d_tab.e < 5 and d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", - "filesort": { - "sort_key": "t2.f", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "d_tab.e < 5 and d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", + "filesort": { + "sort_key": "t2.f", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100 + } } } } @@ -3259,27 +3325,29 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "temporary_table": { - "table": { - "table_name": "", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "d_tab.e < 5 and d_tab.e > 1", - "materialized": { - "query_block": { - "select_id": 3, - "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", - "filesort": { - "sort_key": "t2.f", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100 + "materialization": { + "query_block": { + "select_id": 2, + "temporary_table": { + "table": { + "table_name": "", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "d_tab.e < 5 and d_tab.e > 1", + "materialized": { + "query_block": { + "select_id": 3, + "having_condition": "max_g > 25 and t2.e < 5 and t2.e > 1", + "filesort": { + "sort_key": "t2.f", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100 + } } } } @@ -3418,16 +3486,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "having_condition": "t2.f < 5", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e > 1 and t2.e < 5" + "materialization": { + "query_block": { + "select_id": 3, + "having_condition": "t2.f < 5", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e > 1 and t2.e < 5" + } } } } @@ -3587,16 +3657,18 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 3, - "having_condition": "t2.f < 5", - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e > 1 and t2.e < 5" + "materialization": { + "query_block": { + "select_id": 3, + "having_condition": "t2.f < 5", + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e > 1 and t2.e < 5" + } } } } @@ -3684,21 +3756,23 @@ EXPLAIN "filtered": 100, "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "window_functions_computation": { - "sorts": { - "filesort": { - "sort_key": "t2.f" - } - }, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.f > 1" + "materialization": { + "query_block": { + "select_id": 2, + "window_functions_computation": { + "sorts": { + "filesort": { + "sort_key": "t2.f" + } + }, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.f > 1" + } } } } @@ -3777,21 +3851,23 @@ EXPLAIN "attached_condition": "t1.c = ``.`CAST(SUM(t2.g) OVER (PARTITION BY t2.f) AS INT)`", "materialized": { "unique": 1, - "query_block": { - "select_id": 2, - "window_functions_computation": { - "sorts": { - "filesort": { - "sort_key": "t2.f" - } - }, - "temporary_table": { - "table": { - "table_name": "t2", - "access_type": "ALL", - "rows": 12, - "filtered": 100, - "attached_condition": "t2.e < 5 and t2.f > 1" + "materialization": { + "query_block": { + "select_id": 2, + "window_functions_computation": { + "sorts": { + "filesort": { + "sort_key": "t2.f" + } + }, + "temporary_table": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 12, + "filtered": 100, + "attached_condition": "t2.e < 5 and t2.f > 1" + } } } } diff --git a/mysql-test/main/subselect_mat_analyze_json.result b/mysql-test/main/subselect_mat_analyze_json.result new file mode 100644 index 00000000000..454204edbd1 --- /dev/null +++ b/mysql-test/main/subselect_mat_analyze_json.result @@ -0,0 +1,945 @@ +set @save_optimizer_switch=@@optimizer_switch; +create table t1 (a int); +create table t2 (b int); +insert into t1 values (null), (1), (2), (3); +insert into t2 values (3), (4); +set @@optimizer_switch = "materialization=on,in_to_exists=off,semijoin=off"; +explain format=json select * from t1 where a in (select b from t2); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "ALL", + "rows": 4, + "filtered": 100, + "attached_condition": "(t1.a,t1.a in (subquery#2))" + }, + "subqueries": [ + { + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 2, + "filtered": 100 + } + } + } + } + ] + } +} +# "Complete match" execution strategy +analyze format=json select * from t1 where a in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 25, + "attached_condition": "(t1.a,t1.a in (subquery#2))" + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 3, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +# "Partial match" is used due to NOT IN +# Force rowid-merge partial partial matching +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +analyze format=json select * from t1 where a not in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 50, + "attached_condition": "!(t1.a,t1.a in (subquery#2))" + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["2"], + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +# Force table scan partial matching +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +analyze format=json select * from t1 where a not in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 50, + "attached_condition": "!(t1.a,t1.a in (subquery#2))" + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +# Subselect in GROUP BY +analyze format=json select a from t1 group by a in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "filesort": { + "sort_key": "(t1.a,t1.a in (subquery#2))", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 3, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,rowid", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } + } + } +} +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +analyze format=json select a from t1 group by a not in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "filesort": { + "sort_key": "!(t1.a,t1.a in (subquery#2))", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 3, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,rowid", + "temporary_table": { + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["2"], + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } + } + } +} +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=on"; +# Subselect in ORDER BY +analyze format=json select a from t1 order by a in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "read_sorted_file": { + "r_rows": 4, + "filesort": { + "sort_key": "(t1.a,t1.a in (subquery#2))", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 4, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,addon_fields", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +# Subselect in HAVING +analyze format=json select a from t1 having a not in (select b from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "having_condition": "!(t1.a,t1.a in (subquery#2))", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +# Nested IN +analyze format=json select a from t1 where a in (select a from t1 where a in (select b from t2)); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 25, + "attached_condition": "(t1.a,t1.a in (subquery#2))" + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 3, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 25, + "attached_condition": "(t1.a,t1.a in (subquery#3))" + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup", + "r_loops": 3, + "query_block": { + "select_id": 3, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } + } + } + ] + } +} +create table t3 (c int); +insert into t3 (c) values (3), (null), (4); +# Subquery in ON-clause of outer join +analyze format=json select a from t1 left join t2 on a not in (select c from t3); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "const_condition": "1", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + }, + "block-nl-join": { + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + }, + "buffer_type": "flat", + "buffer_size": "87", + "join_type": "BNL", + "attached_condition": "trigcond(trigcond(!(t1.a,t1.a in (subquery#2))))", + "r_filtered": 50, + "r_unpack_time_ms": "REPLACED" + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 4, + "r_index_lookups": 3, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t3", + "access_type": "ALL", + "r_loops": 1, + "rows": 3, + "r_rows": 3, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +analyze format=json +select (b, b + 1, b + 2) not in +(select count(distinct a), a + 1, a + 2 from t1 group by a + 1, a + 2) +from t2; +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 2, + "r_rows": 2, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 2, + "r_index_lookups": 2, + "r_partial_matches": 2, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "read_sorted_file": { + "r_rows": 4, + "filesort": { + "sort_key": "t1.a + 1, t1.a + 2", + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "r_used_priority_queue": false, + "r_output_rows": 4, + "r_buffer_size": "REPLACED", + "r_sort_mode": "sort_key,addon_fields", + "table": { + "table_name": "t1", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + } + } + ] + } +} +drop table t1, t2, t3; +# +# Tables with more than one column +# +create table t1 (a1 char(1), a2 char(1)); +insert into t1 values (null, 'b'); +create table t2 (b1 char(1), b2 char(2)); +insert into t2 values ('a','b'), ('c', 'd'), (null, 'e'), ('f', 'g'); +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +explain format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +EXPLAIN +{ + "query_block": { + "select_id": 1, + "const_condition": "!((NULL,'b'),(NULL,'b') in (subquery#2))", + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "subqueries": [ + { + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 4, + "filtered": 100 + } + } + } + } + ] + } +} +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "const_condition": "!((NULL,'b'),(NULL,'b') in (subquery#2))", + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "filtered": 100, + "r_filtered": null + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["4", "3"], + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "const_condition": "!((NULL,'b'),(NULL,'b') in (subquery#2))", + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "filtered": 100, + "r_filtered": null + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +# Subquery in SELECT list +explain format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; +EXPLAIN +{ + "query_block": { + "select_id": 1, + "table": { + "table_name": "t1", + "access_type": "system", + "rows": 1, + "filtered": 100 + }, + "subqueries": [ + { + "materialization": { + "query_block": { + "select_id": 2, + "table": { + "table_name": "t2", + "access_type": "ALL", + "rows": 4, + "filtered": 100 + } + } + } + } + ] + } +} +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "filtered": 100, + "r_filtered": null + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "filtered": 100, + "r_filtered": null + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;full scan for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "filtered": 100, + "r_filtered": null + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["4", "3"], + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; +ANALYZE +{ + "query_block": { + "select_id": 1, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t1", + "access_type": "system", + "r_loops": 0, + "rows": 1, + "r_rows": null, + "filtered": 100, + "r_filtered": null + }, + "subqueries": [ + { + "materialization": { + "r_strategy": "index_lookup;array merge for partial match", + "r_loops": 1, + "r_partial_matches": 1, + "r_partial_match_buffer_size": "REPLACED", + "r_partial_match_array_sizes": ["4", "3"], + "query_block": { + "select_id": 2, + "r_loops": 1, + "r_total_time_ms": "REPLACED", + "table": { + "table_name": "t2", + "access_type": "ALL", + "r_loops": 1, + "rows": 4, + "r_rows": 4, + "r_table_time_ms": "REPLACED", + "r_other_time_ms": "REPLACED", + "filtered": 100, + "r_filtered": 100 + } + } + } + } + ] + } +} +drop table t1,t2; +set @@optimizer_switch=@save_optimizer_switch; diff --git a/mysql-test/main/subselect_mat_analyze_json.test b/mysql-test/main/subselect_mat_analyze_json.test new file mode 100644 index 00000000000..d949b9523bd --- /dev/null +++ b/mysql-test/main/subselect_mat_analyze_json.test @@ -0,0 +1,99 @@ +set @save_optimizer_switch=@@optimizer_switch; + +create table t1 (a int); +create table t2 (b int); +insert into t1 values (null), (1), (2), (3); +insert into t2 values (3), (4); + +set @@optimizer_switch = "materialization=on,in_to_exists=off,semijoin=off"; + +explain format=json select * from t1 where a in (select b from t2); +--echo # "Complete match" execution strategy +--source include/analyze-format.inc +analyze format=json select * from t1 where a in (select b from t2); + +--echo # "Partial match" is used due to NOT IN +--echo # Force rowid-merge partial partial matching +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/analyze-format.inc +analyze format=json select * from t1 where a not in (select b from t2); + +--echo # Force table scan partial matching +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +--source include/analyze-format.inc +analyze format=json select * from t1 where a not in (select b from t2); + +--echo # Subselect in GROUP BY +--source include/analyze-format.inc +analyze format=json select a from t1 group by a in (select b from t2); + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/analyze-format.inc +analyze format=json select a from t1 group by a not in (select b from t2); + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=on"; +--echo # Subselect in ORDER BY +--source include/analyze-format.inc +analyze format=json select a from t1 order by a in (select b from t2); + +--echo # Subselect in HAVING +--source include/analyze-format.inc +analyze format=json select a from t1 having a not in (select b from t2); + +--echo # Nested IN +--source include/analyze-format.inc +analyze format=json select a from t1 where a in (select a from t1 where a in (select b from t2)); + +create table t3 (c int); +insert into t3 (c) values (3), (null), (4); + +--echo # Subquery in ON-clause of outer join +--source include/analyze-format.inc +analyze format=json select a from t1 left join t2 on a not in (select c from t3); + +--source include/analyze-format.inc +analyze format=json +select (b, b + 1, b + 2) not in + (select count(distinct a), a + 1, a + 2 from t1 group by a + 1, a + 2) +from t2; + +drop table t1, t2, t3; + + +--echo # +--echo # Tables with more than one column +--echo # +create table t1 (a1 char(1), a2 char(1)); +insert into t1 values (null, 'b'); +create table t2 (b1 char(1), b2 char(2)); +insert into t2 values ('a','b'), ('c', 'd'), (null, 'e'), ('f', 'g'); + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +explain format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); +--source include/analyze-format.inc +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); + +set @@optimizer_switch="partial_match_rowid_merge=off,partial_match_table_scan=on"; +--source include/analyze-format.inc +analyze format=json select * from t1 where (a1, a2) not in (select b1, b2 from t2); + +--echo # Subquery in SELECT list +explain format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; + +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; + +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; + +set @@optimizer_switch="partial_match_rowid_merge=on,partial_match_table_scan=off"; +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) in (select * from t2) as in_res from t1; + +--source include/analyze-format.inc +analyze format=json select t1.*, (a1, a2) not in (select * from t2) as in_res from t1; + +drop table t1,t2; + + +set @@optimizer_switch=@save_optimizer_switch; diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 8ff9850e1b3..7f6e0fbfafc 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -42,6 +42,7 @@ #include "sql_parse.h" // check_stack_overrun #include "sql_cte.h" #include "sql_test.h" +#include "my_json_writer.h" double get_post_group_estimate(JOIN* join, double join_op_rows); @@ -192,6 +193,7 @@ void Item_in_subselect::cleanup() in_strategy&= ~SUBS_STRATEGY_CHOSEN; */ first_execution= TRUE; + materialization_tracker= NULL; pushed_cond_guards= NULL; Item_subselect::cleanup(); DBUG_VOID_RETURN; @@ -1602,6 +1604,7 @@ Item_in_subselect::Item_in_subselect(THD *thd, Item * left_exp, st_select_lex *select_lex): Item_exists_subselect(thd), left_expr_cache(0), first_execution(TRUE), in_strategy(SUBS_NOT_TRANSFORMED), + materialization_tracker(NULL), pushed_cond_guards(NULL), do_not_convert_to_sj(FALSE), is_jtbm_merged(FALSE), is_jtbm_const_tab(FALSE), is_flattenable_semijoin(FALSE), is_registered_semijoin(FALSE), @@ -3648,6 +3651,26 @@ bool Item_in_subselect::init_cond_guards() return FALSE; } +/** + Initialize the tracker which will be used to provide information for + the output of EXPLAIN and ANALYZE +*/ +void Item_in_subselect::init_subq_materialization_tracker(THD *thd) +{ + if (test_strategy(SUBS_MATERIALIZATION | SUBS_PARTIAL_MATCH_ROWID_MERGE | + SUBS_PARTIAL_MATCH_TABLE_SCAN)) + { + Explain_query *qw= thd->lex->explain; + DBUG_ASSERT(qw); + Explain_node *node= qw->get_node(unit->first_select()->select_number); + if (!node) + return; + node->subq_materialization= new(qw->mem_root) + Explain_subq_materialization(qw->mem_root); + materialization_tracker= node->subq_materialization->get_tracker(); + } +} + bool Item_allany_subselect::select_transformer(JOIN *join) @@ -4245,11 +4268,13 @@ int subselect_uniquesubquery_engine::exec() empty_result_set= TRUE; table->status= 0; Item_in_subselect *in_subs= item->get_IN_subquery(); + Subq_materialization_tracker *tracker= in_subs->get_materialization_tracker(); DBUG_ASSERT(in_subs); if (!tab->preread_init_done && tab->preread_init()) DBUG_RETURN(1); - + if (tracker) + tracker->increment_loops_count(); if (in_subs->left_expr_has_null()) { /* @@ -5002,6 +5027,9 @@ subselect_hash_sj_engine::choose_partial_match_strategy( partial_match_key_parts_arg); if (pm_buff_size > thd->variables.rowid_merge_buff_size) strategy= PARTIAL_MATCH_SCAN; + else + item->get_IN_subquery()->get_materialization_tracker()-> + report_partial_match_buffer_size(pm_buff_size); } } @@ -5777,6 +5805,7 @@ int subselect_hash_sj_engine::exec() } } + item_in->get_materialization_tracker()->report_exec_strategy(strategy); if (pm_engine) lookup_engine= pm_engine; item_in->change_engine(lookup_engine); @@ -6247,6 +6276,9 @@ int subselect_partial_match_engine::exec() DBUG_ASSERT(!(item_in->left_expr_has_null() && item_in->is_top_level_item())); + Subq_materialization_tracker *tracker= item_in->get_materialization_tracker(); + tracker->increment_loops_count(); + if (!item_in->left_expr_has_null()) { /* Try to find a matching row by index lookup. */ @@ -6260,6 +6292,7 @@ int subselect_partial_match_engine::exec() else { /* Search for a complete match. */ + tracker->increment_index_lookups(); if ((lookup_res= lookup_engine->index_lookup())) { /* An error occurred during lookup(). */ @@ -6304,6 +6337,7 @@ int subselect_partial_match_engine::exec() if (tmp_table->file->inited) tmp_table->file->ha_index_end(); + tracker->increment_partial_matches(); if (partial_match()) { /* The result of IN is UNKNOWN. */ @@ -6510,6 +6544,8 @@ subselect_rowid_merge_engine::init(MY_BITMAP *non_null_key_parts, 0, 0)) return TRUE; + item->get_IN_subquery()->get_materialization_tracker()-> + report_partial_merge_keys(merge_keys, merge_keys_count); return FALSE; } @@ -6966,3 +7002,12 @@ void Item_subselect::init_expr_cache_tracker(THD *thd) DBUG_ASSERT(expr_cache->type() == Item::EXPR_CACHE_ITEM); node->cache_tracker= ((Item_cache_wrapper *)expr_cache)->init_tracker(qw->mem_root); } + + +void Subq_materialization_tracker::report_partial_merge_keys( + Ordered_key **merge_keys, uint merge_keys_count) +{ + partial_match_array_sizes.resize(merge_keys_count, 0); + for (uint i= 0; i < merge_keys_count; i++) + partial_match_array_sizes[i]= merge_keys[i]->get_key_buff_elements(); +} diff --git a/sql/item_subselect.h b/sql/item_subselect.h index c1b531dc361..f976d905951 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -18,6 +18,7 @@ /* subselect Item */ +#include "item.h" #ifdef USE_PRAGMA_INTERFACE #pragma interface /* gcc class implementation */ #endif @@ -43,6 +44,8 @@ typedef class st_select_lex SELECT_LEX; */ typedef Comp_creator* (*chooser_compare_func_creator)(bool invert); class Cached_item; +class Subq_materialization_tracker; +class Explain_subq_materialization; /* base class for subselects */ @@ -501,6 +504,8 @@ protected: bool was_null; /* A bitmap of possible execution strategies for an IN predicate. */ uchar in_strategy; + /* Tracker collecting execution parameters of a materialized subquery */ + Subq_materialization_tracker *materialization_tracker; protected: /* Used to trigger on/off conditions that were pushed down to subselect */ bool *pushed_cond_guards; @@ -525,6 +530,7 @@ protected: left_expr could later be changed to something on the execution arena. */ Item *left_expr_orig; + public: /* Priority of this predicate in the convert-to-semi-join-nest process. */ int sj_convert_priority; @@ -626,7 +632,7 @@ public: Item_in_subselect(THD *thd_arg, Item * left_expr, st_select_lex *select_lex); Item_in_subselect(THD *thd_arg): Item_exists_subselect(thd_arg), left_expr_cache(0), first_execution(TRUE), - in_strategy(SUBS_NOT_TRANSFORMED), + in_strategy(SUBS_NOT_TRANSFORMED), materialization_tracker(NULL), pushed_cond_guards(NULL), func(NULL), do_not_convert_to_sj(FALSE), is_jtbm_merged(FALSE), is_jtbm_const_tab(FALSE), upper_item(0), converted_from_in_predicate(FALSE) {} @@ -778,6 +784,9 @@ public: { return left_expr; } inline Item* left_exp_orig() const { return left_expr_orig; } + void init_subq_materialization_tracker(THD *thd); + Subq_materialization_tracker *get_materialization_tracker() const + { return materialization_tracker; } friend class Item_ref_null_helper; friend class Item_is_not_null_test; @@ -1159,6 +1168,15 @@ public: select_result_interceptor *result, bool temp= FALSE) override; bool no_tables() const override;//=>base class + /* Possible execution strategies that can be used to compute hash semi-join.*/ + enum exec_strategy { + UNDEFINED= 0, + COMPLETE_MATCH, /* Use regular index lookups. */ + PARTIAL_MATCH, /* Use some partial matching strategy. */ + PARTIAL_MATCH_MERGE, /* Use partial matching through index merging. */ + PARTIAL_MATCH_SCAN, /* Use partial matching through table scan. */ + IMPOSSIBLE /* Subquery materialization is not applicable. */ + }; protected: /* The engine used to compute the IN predicate. */ @@ -1170,15 +1188,6 @@ protected: uint count_partial_match_columns; uint count_null_only_columns; uint count_columns_with_nulls; - /* Possible execution strategies that can be used to compute hash semi-join.*/ - enum exec_strategy { - UNDEFINED, - COMPLETE_MATCH, /* Use regular index lookups. */ - PARTIAL_MATCH, /* Use some partial matching strategy. */ - PARTIAL_MATCH_MERGE, /* Use partial matching through index merging. */ - PARTIAL_MATCH_SCAN, /* Use partial matching through table scan. */ - IMPOSSIBLE /* Subquery materialization is not applicable. */ - }; /* The chosen execution strategy. Computed after materialization. */ exec_strategy strategy; exec_strategy get_strategy_using_schema(); @@ -1311,6 +1320,7 @@ public: rownum_t get_max_null_row() { return max_null_row; } MY_BITMAP * get_null_key() { return &null_key; } ha_rows get_null_count() { return null_count; } + ha_rows get_key_buff_elements() { return key_buff_elements; } /* Get the search key element that corresponds to the i-th key part of this index. @@ -1548,4 +1558,93 @@ public: void cleanup() override; enum_engine_type engine_type() override { return TABLE_SCAN_ENGINE; } }; + +/** + @brief Subquery materialization tracker + + @details + Used to track various parameters of the materialized subquery execution, + such as the execution strategy, sizes of buffers employed, etc +*/ +class Subq_materialization_tracker +{ +public: + using Strategy = subselect_hash_sj_engine::exec_strategy; + + Subq_materialization_tracker(MEM_ROOT *mem_root) + : exec_strategy(Strategy::UNDEFINED), + partial_match_buffer_size(0), + partial_match_array_sizes(mem_root), + loops_count(0), + index_lookups_count(0), + partial_matches_count(0) + {} + + void report_partial_merge_keys(Ordered_key **merge_keys, + uint merge_keys_count); + + void report_exec_strategy(Strategy es) + { + exec_strategy= es; + } + + void report_partial_match_buffer_size(longlong sz) + { + partial_match_buffer_size= sz; + } + + void increment_loops_count() + { + loops_count++; + } + + void increment_index_lookups() + { + index_lookups_count++; + } + + void increment_partial_matches() + { + partial_matches_count++; + } + + void print_json_members(Json_writer *writer) const; +private: + Strategy exec_strategy; + ulonglong partial_match_buffer_size; + Dynamic_array partial_match_array_sizes; + + /* Number of times subquery predicate was evaluated */ + ulonglong loops_count; + + /* + Number of times we made a lookup in the materialized temptable + (we do this when all parts of left_expr are not NULLs) + */ + ulonglong index_lookups_count; + + /* + Number of times we had to check for a partial match (either by + scanning the materialized subquery or by doing a merge) + */ + ulonglong partial_matches_count; + + const char *get_exec_strategy() const + { + switch (exec_strategy) + { + case Strategy::UNDEFINED: + return "undefined"; + case Strategy::COMPLETE_MATCH: + return "index_lookup"; + case Strategy::PARTIAL_MATCH_MERGE: + return "index_lookup;array merge for partial match"; + case Strategy::PARTIAL_MATCH_SCAN: + return "index_lookup;full scan for partial match"; + default: + return "unsupported"; + } + } +}; + #endif /* ITEM_SUBSELECT_INCLUDED */ diff --git a/sql/sql_array.h b/sql/sql_array.h index b6de1b18d78..bc4afa8906f 100644 --- a/sql/sql_array.h +++ b/sql/sql_array.h @@ -140,12 +140,24 @@ public: DBUG_ASSERT(idx < array.elements); return *(((Elem*)array.buffer) + idx); } + /// Const variant of at(), which cannot change data const Elem& at(size_t idx) const { return *(((Elem*)array.buffer) + idx); } + Elem& operator[](size_t idx) + { + return at(idx); + } + + /// Const variant of operator[] + const Elem& operator[](size_t idx) const + { + return at(idx); + } + /// @returns pointer to first element Elem *front() { diff --git a/sql/sql_explain.cc b/sql/sql_explain.cc index 3d97645d212..bfd73074f76 100644 --- a/sql/sql_explain.cc +++ b/sql/sql_explain.cc @@ -24,6 +24,7 @@ #include "my_json_writer.h" #include "opt_range.h" #include "sql_expression_cache.h" +#include "item_subselect.h" const char * STR_DELETING_ALL_ROWS= "Deleting all rows"; const char * STR_IMPOSSIBLE_WHERE= "Impossible WHERE"; @@ -782,6 +783,18 @@ bool Explain_node::print_explain_json_cache(Json_writer *writer, } +bool Explain_node::print_explain_json_subq_materialization(Json_writer *writer, + bool is_analyze) +{ + if (subq_materialization) + { + subq_materialization->print_explain_json(writer, is_analyze); + return true; + } + return false; +} + + Explain_basic_join::~Explain_basic_join() { if (join_tabs) @@ -929,6 +942,8 @@ void Explain_select::print_explain_json(Explain_query *query, Json_writer_nesting_guard guard(writer); bool started_cache= print_explain_json_cache(writer, is_analyze); + bool started_subq_mat= print_explain_json_subq_materialization(writer, + is_analyze); if (message || select_type == pushed_derived_text || @@ -1032,6 +1047,8 @@ void Explain_select::print_explain_json(Explain_query *query, writer->end_object(); } + if (started_subq_mat) + writer->end_object(); if (started_cache) writer->end_object(); } @@ -2693,3 +2710,41 @@ void Explain_range_checked_fer::print_json(Json_writer *writer, writer->end_object(); } } + + +void Explain_subq_materialization::print_explain_json(Json_writer *writer, + bool is_analyze) +{ + writer->add_member("materialization").start_object(); + if (is_analyze) + tracker.print_json_members(writer); +} + + +void Subq_materialization_tracker::print_json_members(Json_writer *writer) const +{ + writer->add_member("r_strategy").add_str(get_exec_strategy()); + if (loops_count) + writer->add_member("r_loops").add_ull(loops_count); + + if (index_lookups_count) + writer->add_member("r_index_lookups").add_ull(index_lookups_count); + + if (partial_matches_count) + writer->add_member("r_partial_matches").add_ull(partial_matches_count); + + if (partial_match_buffer_size) + { + writer->add_member("r_partial_match_buffer_size"). + add_size(partial_match_buffer_size); + } + + if (partial_match_array_sizes.elements()) + { + writer->add_member("r_partial_match_array_sizes").start_array(); + for(size_t i= 0; i < partial_match_array_sizes.elements(); i++) + writer->add_ull(partial_match_array_sizes[i]); + writer->end_array(); + } +} + diff --git a/sql/sql_explain.h b/sql/sql_explain.h index e7b054ed75b..cf960f75da4 100644 --- a/sql/sql_explain.h +++ b/sql/sql_explain.h @@ -86,6 +86,7 @@ class Explain_node : public Sql_alloc public: Explain_node(MEM_ROOT *root) : cache_tracker(NULL), + subq_materialization(NULL), connection_type(EXPLAIN_NODE_OTHER), children(root) {} @@ -115,6 +116,12 @@ public: */ Expression_cache_tracker* cache_tracker; + /** + If not NULL, this node is a SELECT (or UNION) in a materialized + IN-subquery. + */ + Explain_subq_materialization* subq_materialization; + /* How this node is connected to its parent. (NOTE: EXPLAIN_NODE_NON_MERGED_SJ is set very late currently) @@ -143,6 +150,8 @@ public: void print_explain_json_for_children(Explain_query *query, Json_writer *writer, bool is_analyze); bool print_explain_json_cache(Json_writer *writer, bool is_analyze); + bool print_explain_json_subq_materialization(Json_writer *writer, + bool is_analyze); virtual ~Explain_node() = default; }; @@ -1003,4 +1012,26 @@ public: }; +/* + EXPLAIN data structure for subquery materialization. + + All decisions are made at execution time so here we just store the tracker + that has all the info. +*/ + +class Explain_subq_materialization : public Sql_alloc +{ +public: + Explain_subq_materialization(MEM_ROOT *mem_root) + : tracker(mem_root) + {} + + Subq_materialization_tracker *get_tracker() { return &tracker; } + + void print_explain_json(Json_writer *writer, bool is_analyze); + +private: + Subq_materialization_tracker tracker; +}; + #endif //SQL_EXPLAIN_INCLUDED diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 2ab1736891c..b86ffed8619 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1729,6 +1729,11 @@ bool JOIN::build_explain() curr_tab->tracker= tmp->get_using_temporary_read_tracker(); } } + if (is_in_subquery()) + { + Item_in_subselect *subq= unit->item->get_IN_subquery(); + subq->init_subq_materialization_tracker(thd); + } DBUG_RETURN(0); } From e8bcc4e4556ca3536559ffc76103c9f2dd890837 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Thu, 11 Jul 2024 17:35:13 +1000 Subject: [PATCH 14/60] MDEV-34568 rpl.rpl_mdev12179 - correct for Windows Simplify in an attempt to avoid: mysqltest: At line 275: File already exist: on the write_file lines. Using write_line as that's what a lot of other tests do for writing small bits to a expect file. Review thanks Valdislav Vaintroub --- mysql-test/suite/rpl/t/rpl_mdev12179.test | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/mysql-test/suite/rpl/t/rpl_mdev12179.test b/mysql-test/suite/rpl/t/rpl_mdev12179.test index 6d2dda1044f..fc3457252e1 100644 --- a/mysql-test/suite/rpl/t/rpl_mdev12179.test +++ b/mysql-test/suite/rpl/t/rpl_mdev12179.test @@ -55,9 +55,7 @@ SET sql_log_bin=1; # Restart the slave mysqld server, and verify that the GTID position is # read correctly from the new mysql.gtid_slave_pos_innodb table. ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -94,9 +92,7 @@ DROP TABLE mysql.gtid_slave_pos; RENAME TABLE mysql.gtid_slave_pos_innodb TO mysql.gtid_slave_pos; SET sql_log_bin=1; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -132,9 +128,7 @@ SET sql_log_bin=0; ALTER TABLE mysql.gtid_slave_pos ENGINE=Aria; SET sql_log_bin=1; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -176,9 +170,7 @@ INSERT INTO mysql.gtid_slave_pos SELECT * FROM mysql.gtid_slave_pos_InnoDB; DROP TABLE mysql.gtid_slave_pos_InnoDB; SET sql_log_bin=1; ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line "wait" $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --shutdown_server --source include/wait_until_disconnected.inc @@ -272,9 +264,7 @@ while (!$done) # MDEV-15373 engine gtid_slave_pos table name disobeys lower-case-table-names # This snippet verifies that engine gtid_slave_pos table is found, # its data are up-to-date. ---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect -wait -EOF +--write_line wait $MYSQLTEST_VARDIR/tmp/mysqld.2.expect --connection server_2 --shutdown_server --source include/wait_until_disconnected.inc From 3662f8ca8940663bf687e1b1fdf15fdc74025dcc Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Fri, 12 Jul 2024 12:45:11 +0530 Subject: [PATCH 15/60] MDEV-34543 Shutdown hangs while freeing the asynchronous i/o slots Problem: ======== - During shutdown, InnoDB tries to free the asynchronous I/O slots and hangs. The reason is that InnoDB disables asynchronous I/O before waiting for pending asynchronous I/O to finish. buf_load(): InnoDB aborts the buffer pool load due to user requested shutdown and doesn't wait for the asynchronous read to get completed. This could lead to debug assertion in buf_flush_buffer_pool() during shutdown Fix: === os_aio_free(): Should wait all read_slots and write_slots to finish before disabling the aio. buf_load(): Should wait for pending read request to complete even though it was aborted. --- storage/innobase/buf/buf0dump.cc | 4 +--- storage/innobase/os/os0file.cc | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc index 269ef448c31..d610463b8a3 100644 --- a/storage/innobase/buf/buf0dump.cc +++ b/storage/innobase/buf/buf0dump.cc @@ -643,9 +643,7 @@ buf_load() ut_free(dump); - if (i == dump_n) { - os_aio_wait_until_no_pending_reads(); - } + os_aio_wait_until_no_pending_reads(); ut_sprintf_timestamp(now); diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index ce4eafafcd5..beaf2c172d7 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -3752,11 +3752,11 @@ disable: void os_aio_free() { - srv_thread_pool->disable_aio(); delete read_slots; delete write_slots; read_slots= nullptr; write_slots= nullptr; + srv_thread_pool->disable_aio(); } /** Wait until there are no pending asynchronous writes. */ From 00d2c7f7f480c58c5e406c7c1a875f83bd3bb1fc Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 10 Jul 2024 19:34:53 +0530 Subject: [PATCH 16/60] MDEV-34542 Assertion `lock_trx_has_sys_table_locks(trx) == __null' failed in void row_mysql_unfreeze_data_dictionary(trx_t*) - During XA PREPARE, InnoDB releases the non-exclusive locks. But it fails to remove the non-exclusive table lock from the transaction table locks. In the mean time, main thread evicts the table from the LRU cache. While rollbacking the XA transaction, InnoDB iterates through the table locks to check whether it holds lock on any system tables and wrongly assumes the evicted table as system table since the table id is 0 Fix: === During XA PREPARE, remove the table locks of the transaction while releasing the non-exclusive locks. --- mysql-test/suite/innodb/r/lock_release.result | 23 +++ mysql-test/suite/innodb/t/lock_release.test | 26 +++ storage/innobase/lock/lock0lock.cc | 149 +++++++++--------- 3 files changed, 124 insertions(+), 74 deletions(-) create mode 100644 mysql-test/suite/innodb/r/lock_release.result create mode 100644 mysql-test/suite/innodb/t/lock_release.test diff --git a/mysql-test/suite/innodb/r/lock_release.result b/mysql-test/suite/innodb/r/lock_release.result new file mode 100644 index 00000000000..6bafe79a36c --- /dev/null +++ b/mysql-test/suite/innodb/r/lock_release.result @@ -0,0 +1,23 @@ +# +# MDEV-34542 Assertion `lock_trx_has_sys_table_locks(trx) == __null' +# failed in void row_mysql_unfreeze_data_dictionary(trx_t*) +# +# +CREATE TABLE t1 (c1 CHAR(1) ,c2 INT) ENGINE=INNODB +PARTITION BY LINEAR HASH ((c2)) PARTITIONS 512; +CREATE TABLE t2 (a INT) ENGINE=INNODB; +set @old_table_open_cache= @@table_open_cache; +XA START 'a'; +INSERT INTO mysql.innodb_index_stats SELECT * FROM mysql.innodb_index_stats WHERE table_name=''; +SET GLOBAL table_open_cache=10; +INSERT into t2 (a) VALUES (1); +SELECT * FROM t1; +c1 c2 +XA END 'a'; +XA PREPARE 'a'; +SELECT sleep(3); +sleep(3) +0 +XA ROLLBACK 'a'; +DROP TABLE t1, t2; +SET GLOBAL table_open_cache=@old_table_open_cache; diff --git a/mysql-test/suite/innodb/t/lock_release.test b/mysql-test/suite/innodb/t/lock_release.test new file mode 100644 index 00000000000..6620bf69d14 --- /dev/null +++ b/mysql-test/suite/innodb/t/lock_release.test @@ -0,0 +1,26 @@ +--source include/have_innodb.inc +--source include/have_partition.inc + +--echo # +--echo # MDEV-34542 Assertion `lock_trx_has_sys_table_locks(trx) == __null' +--echo # failed in void row_mysql_unfreeze_data_dictionary(trx_t*) +--echo # +--echo # +CREATE TABLE t1 (c1 CHAR(1) ,c2 INT) ENGINE=INNODB + PARTITION BY LINEAR HASH ((c2)) PARTITIONS 512; +CREATE TABLE t2 (a INT) ENGINE=INNODB; + +set @old_table_open_cache= @@table_open_cache; +XA START 'a'; +INSERT INTO mysql.innodb_index_stats SELECT * FROM mysql.innodb_index_stats WHERE table_name=''; +SET GLOBAL table_open_cache=10; +INSERT into t2 (a) VALUES (1); +SELECT * FROM t1; +XA END 'a'; +XA PREPARE 'a'; +# Added sleep to make sure that InnoDB main thread is to remove +# the innodb_index_stats from table cache +SELECT sleep(3); +XA ROLLBACK 'a'; +DROP TABLE t1, t2; +SET GLOBAL table_open_cache=@old_table_open_cache; diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index d0b4105d9c6..3dd4b5fa6f6 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -4382,80 +4382,6 @@ static void lock_rec_unlock_supremum(lock_t *lock) trx_mutex_exit(lock->trx); } -/** Release non-exclusive locks on XA PREPARE, -and release possible other transactions waiting because of these locks. */ -void lock_release_on_prepare(trx_t *trx) -{ - trx->set_skip_lock_inheritance(); - - ulint count= 0; - lock_mutex_enter(); - ut_ad(!trx_mutex_own(trx)); - - for (lock_t *lock= UT_LIST_GET_LAST(trx->lock.trx_locks); lock; ) - { - ut_ad(lock->trx == trx); - - if (lock_get_type_low(lock) == LOCK_REC) - { - ut_ad(!lock->index->table->is_temporary()); - if ((lock->type_mode & (LOCK_MODE_MASK | LOCK_GAP)) != LOCK_X) - lock_rec_dequeue_from_page(lock); - else if (lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM)) - lock_rec_unlock_supremum(lock); - else - { - ut_ad(trx->dict_operation || - lock->index->table->id >= DICT_HDR_FIRST_ID); - ut_ad(lock->trx->isolation_level > TRX_ISO_READ_COMMITTED || - /* Insert-intention lock is valid for supremum for isolation - level > TRX_ISO_READ_COMMITTED */ - lock_get_mode(lock) == LOCK_X || - !lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM)); -retain_lock: - lock= UT_LIST_GET_PREV(trx_locks, lock); - continue; - } - } - else - { - ut_ad(lock_get_type_low(lock) & LOCK_TABLE); - ut_d(dict_table_t *table= lock->un_member.tab_lock.table); - ut_ad(!table->is_temporary()); - - switch (lock_get_mode(lock)) { - case LOCK_IS: - case LOCK_S: - lock_table_dequeue(lock); - break; - case LOCK_IX: - case LOCK_X: - ut_ad(table->id >= DICT_HDR_FIRST_ID || trx->dict_operation); - /* fall through */ - default: - goto retain_lock; - } - } - - if (++count == LOCK_RELEASE_INTERVAL) - { - lock_mutex_exit(); - count= 0; - lock_mutex_enter(); - } - - lock= UT_LIST_GET_LAST(trx->lock.trx_locks); - } - - lock_mutex_exit(); - -} - -/* True if a lock mode is S or X */ -#define IS_LOCK_S_OR_X(lock) \ - (lock_get_mode(lock) == LOCK_S \ - || lock_get_mode(lock) == LOCK_X) - /*********************************************************************//** Removes table locks of the transaction on a table to be dropped. */ static @@ -4502,6 +4428,81 @@ lock_trx_table_locks_remove( ut_error; } +/** Release non-exclusive locks on XA PREPARE, +and release possible other transactions waiting because of these locks. */ +void lock_release_on_prepare(trx_t *trx) +{ + trx->set_skip_lock_inheritance(); + + ulint count= 0; + lock_mutex_enter(); + ut_ad(!trx_mutex_own(trx)); + + for (lock_t *lock= UT_LIST_GET_LAST(trx->lock.trx_locks); lock; ) + { + ut_ad(lock->trx == trx); + + if (lock_get_type_low(lock) == LOCK_REC) + { + ut_ad(!lock->index->table->is_temporary()); + if ((lock->type_mode & (LOCK_MODE_MASK | LOCK_GAP)) != LOCK_X) + lock_rec_dequeue_from_page(lock); + else if (lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM)) + lock_rec_unlock_supremum(lock); + else + { + ut_ad(trx->dict_operation || + lock->index->table->id >= DICT_HDR_FIRST_ID); + ut_ad(lock->trx->isolation_level > TRX_ISO_READ_COMMITTED || + /* Insert-intention lock is valid for supremum for isolation + level > TRX_ISO_READ_COMMITTED */ + lock_get_mode(lock) == LOCK_X || + !lock_rec_get_nth_bit(lock, PAGE_HEAP_NO_SUPREMUM)); +retain_lock: + lock= UT_LIST_GET_PREV(trx_locks, lock); + continue; + } + } + else + { + ut_ad(lock_get_type_low(lock) & LOCK_TABLE); + ut_d(dict_table_t *table= lock->un_member.tab_lock.table); + ut_ad(!table->is_temporary()); + + switch (lock_get_mode(lock)) { + case LOCK_IS: + case LOCK_S: + lock_table_dequeue(lock); + lock_trx_table_locks_remove(lock); + break; + case LOCK_IX: + case LOCK_X: + ut_ad(table->id >= DICT_HDR_FIRST_ID || trx->dict_operation); + /* fall through */ + default: + goto retain_lock; + } + } + + if (++count == LOCK_RELEASE_INTERVAL) + { + lock_mutex_exit(); + count= 0; + lock_mutex_enter(); + } + + lock= UT_LIST_GET_LAST(trx->lock.trx_locks); + } + + lock_mutex_exit(); + +} + +/* True if a lock mode is S or X */ +#define IS_LOCK_S_OR_X(lock) \ + (lock_get_mode(lock) == LOCK_S \ + || lock_get_mode(lock) == LOCK_X) + /*===================== VALIDATION AND DEBUGGING ====================*/ /** Print info of a table lock. From 0802e5a7eb86fca3e5e4128b8e77564b9bcdf6be Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Sat, 13 Jul 2024 04:38:10 +0200 Subject: [PATCH 17/60] MDEV-34505: galera.mariadb_tzinfo_to_sql fails deterministically on Ubuntu 24.04 Fixed a sorting order condition that in its previous form could lead to the formation of an incorrect pattern for comparing strings. --- .../main/mysql_tzinfo_to_sql_symlink.result | 20 +++++++++---------- sql/tztime.cc | 5 ++--- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result index 86ff8179b44..3777d86697e 100644 --- a/mysql-test/main/mysql_tzinfo_to_sql_symlink.result +++ b/mysql-test/main/mysql_tzinfo_to_sql_symlink.result @@ -8,7 +8,7 @@ CREATE TABLE time_zone_leap_second LIKE mysql.time_zone_leap_second; # # Verbose run set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -60,7 +60,7 @@ SET session alter_algorithm=@old_alter_alg; # # Run on zoneinfo directory set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -123,7 +123,7 @@ COUNT(*) # Run on zoneinfo directory --skip-write-binlog # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -198,7 +198,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing with explicit timezonefile # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -262,7 +262,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing with explicit timezonefile --skip-write-binlog # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -320,7 +320,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing --leap # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); @@ -383,7 +383,7 @@ TRUNCATE TABLE time_zone_leap_second; # Testing --skip-write-binlog --leap # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -435,7 +435,7 @@ COM_TRUNCATE 1 # Testing --skip-write-binlog # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -457,7 +457,7 @@ COMMIT; SET SESSION SQL_LOG_BIN=@save_sql_log_bin; execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0'); set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0'); SET @save_sql_log_bin=@@SQL_LOG_BIN; @@ -504,7 +504,7 @@ set sql_mode=default; # MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL # set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on'); -SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC; +SET STATEMENT SQL_MODE='' FOR SELECT concat('%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o; set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode'); execute immediate if(@wsrep_cannot_replicate_tz, 'select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME=''time_zone''', 'do 0'); execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0'); diff --git a/sql/tztime.cc b/sql/tztime.cc index d39a485b3fe..0e9dcbbe6de 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -2767,7 +2767,7 @@ main(int argc, char **argv) printf("set @wsrep_is_on=(%s);\n", wsrep_is_on); printf("SET STATEMENT SQL_MODE='' FOR " - "SELECT concat('%%', GROUP_CONCAT(OPTION), '%%') INTO @replicate_opt " + "SELECT concat('%%', GROUP_CONCAT(OPTION ORDER BY OPTION DESC), '%%') INTO @replicate_opt " " FROM" " (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION" " FROM information_schema.TABLES" @@ -2778,8 +2778,7 @@ main(int argc, char **argv) " 'time_zone_transition_type'," " 'time_zone_leap_second')" " AND ENGINE in ('MyISAM'," - " 'Aria')) AS o" - " ORDER BY OPTION DESC;\n"); + " 'Aria')) AS o;\n"); printf("set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (%s);\n", wsrep_cannot_replicate_tz); if (opt_skip_write_binlog) /* We turn off session wsrep if we cannot replicate using galera. From 3c508d4c71c8bf27c6ecceba53ab9d4325a1bd6c Mon Sep 17 00:00:00 2001 From: Ian Gilfillan Date: Fri, 12 Jul 2024 21:37:48 +0200 Subject: [PATCH 18/60] MDEV-34581: Fix flashback mode man pages --- man/mysqlbinlog.1 | 16 ++++++++++++++++ man/mysqldump.1 | 16 ---------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/man/mysqlbinlog.1 b/man/mysqlbinlog.1 index ca41a7b768a..f4de16856e6 100644 --- a/man/mysqlbinlog.1 +++ b/man/mysqlbinlog.1 @@ -573,6 +573,22 @@ privilege\&. .sp -1 .IP \(bu 2.3 .\} +.\" mysqlbinlog: flashback option +.\" flashback option: mysqlbinlog +\fB\-\-flashback\fR, +\fB\-B\fR +.sp +Support flashback mode\&. +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} .\" mysqlbinlog: force-if-open option .\" force-if-open option: mysqlbinlog \fB\-\-force\-if\-open\fR diff --git a/man/mysqldump.1 b/man/mysqldump.1 index f23c7e2491b..cf279599c31 100644 --- a/man/mysqldump.1 +++ b/man/mysqldump.1 @@ -894,22 +894,6 @@ instead\&. .sp -1 .IP \(bu 2.3 .\} -.\" mysqldump: flashback option -.\" flashback option: mysqldump -\fB\-\-flashback\fR, -\fB\-B\fR -.sp -Support flashback mode\&. -.RE -.sp -.RS 4 -.ie n \{\ -\h'-04'\(bu\h'+03'\c -.\} -.el \{\ -.sp -1 -.IP \(bu 2.3 -.\} .\" mysqldump: flush-logs option .\" flush-logs option: mysqldump \fB\-\-flush\-logs\fR, From 3b956f832996f2a133e07afba93d7ae324028b8c Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Wed, 3 Jul 2024 10:22:13 +0800 Subject: [PATCH 19/60] MDEV-34449 Default ha_spider::bulk_size to 0. This fixes a valgrind failure where the bulk_size is used before initialised in ha_spider::end_bulk_insert(). --- storage/spider/ha_spider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index def8ee169ed..54e14760bcf 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -151,7 +151,7 @@ public: #ifdef HANDLER_HAS_CAN_USE_FOR_AUTO_INC_INIT bool auto_inc_temporary; #endif - int bulk_size; + int bulk_size= 0; int direct_dup_insert; int store_error_num; uint dup_key_idx; From 46d95ae265bc08063d9636309901e7603b2a9229 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 15 Jul 2024 14:44:59 +0530 Subject: [PATCH 20/60] MDEV-34474 InnoDB: Failing assertion: stat_n_leaf_pages > 0 in ha_innobase::estimate_rows_upper_bound - Fixing the compilation issue. --- storage/innobase/dict/dict0stats.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc index 8ab8cec47e3..496a1a5e6f0 100644 --- a/storage/innobase/dict/dict0stats.cc +++ b/storage/innobase/dict/dict0stats.cc @@ -2670,7 +2670,8 @@ dict_stats_fetch_table_stats_step( ut_a(len == 8); table->stat_clustered_index_size - = std::max(mach_read_from_8(data), 1); + = std::max( + (ulint) mach_read_from_8(data), 1); break; } @@ -2688,7 +2689,7 @@ dict_stats_fetch_table_stats_step( } table->stat_sum_of_other_index_sizes = std::max( - mach_read_from_8(data), + (ulint) mach_read_from_8(data), UT_LIST_GET_LEN(table->indexes) - 1); break; @@ -2876,13 +2877,13 @@ dict_stats_fetch_index_stats_step( if (stat_name_len == 4 /* strlen("size") */ && strncasecmp("size", stat_name, stat_name_len) == 0) { index->stat_index_size - = std::max(stat_value, 1); + = std::max((ulint) stat_value, 1); arg->stats_were_modified = true; } else if (stat_name_len == 12 /* strlen("n_leaf_pages") */ && strncasecmp("n_leaf_pages", stat_name, stat_name_len) == 0) { index->stat_n_leaf_pages - = std::max(stat_value, 1); + = std::max((ulint) stat_value, 1); arg->stats_were_modified = true; } else if (stat_name_len == 12 /* strlen("n_page_split") */ && strncasecmp("n_page_split", stat_name, stat_name_len) From 405613ebb5f2f66e6c0d3f6ff4059b63170dfd11 Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Wed, 3 Jul 2024 15:42:21 +0700 Subject: [PATCH 21/60] MDEV-34490 get_copy() and build_clone() may return an instance of an ancestor class instead of a copy/clone The `Item` class methods `get_copy()`, `build_clone()`, and `clone_item()` face an issue where they may be defined in a descendant class (e.g., `Item_func`) but not in a further descendant (e.g., `Item_func_child`). This can lead to scenarios where `build_clone()`, when operating on an instance of `Item_func_child` with a pointer to the base class (`Item`), returns an instance of `Item_func` instead of `Item_func_child`. Since this limitation cannot be resolved at compile time, this commit introduces runtime type checks for the copy/clone operations. A debug assertion will now trigger in case of a type mismatch. `get_copy()`, `build_clone()`, and `clone_item()` are no more virtual, but virtual `do_get_copy()`, `do_build_clone()`, and `do_clone_item()` are added to the protected section of the class `Item`. Additionally, const qualifiers have been added to certain methods to enhance code reliability. Reviewer: Oleksandr Byelkin --- plugin/func_test/plugin.cc | 2 +- plugin/type_inet/item_inetfunc.h | 16 +- plugin/type_inet/sql_type_inet.cc | 11 +- sql/item.cc | 39 ++--- sql/item.h | 251 ++++++++++++++++++++++-------- sql/item_cmpfunc.cc | 9 +- sql/item_cmpfunc.h | 94 +++++------ sql/item_func.h | 173 ++++++++++---------- sql/item_geofunc.h | 86 +++++----- sql/item_jsonfunc.h | 50 +++--- sql/item_row.cc | 2 +- sql/item_row.h | 4 +- sql/item_strfunc.h | 162 +++++++++---------- sql/item_subselect.h | 4 +- sql/item_sum.h | 44 +++--- sql/item_timefunc.h | 96 ++++++------ sql/item_vers.h | 8 +- sql/item_windowfunc.h | 28 ++-- sql/item_xmlfunc.cc | 34 ++-- sql/item_xmlfunc.h | 4 +- sql/procedure.h | 6 +- sql/sql_list.h | 7 +- sql/sql_select.cc | 4 +- sql/sql_string.h | 2 +- 24 files changed, 632 insertions(+), 504 deletions(-) diff --git a/plugin/func_test/plugin.cc b/plugin/func_test/plugin.cc index 00fc0039de8..c120cfd6993 100644 --- a/plugin/func_test/plugin.cc +++ b/plugin/func_test/plugin.cc @@ -37,7 +37,7 @@ public: } const char *func_name() const override { return "sysconst_test"; } const char *fully_qualified_func_name() const override { return "sysconst_test()"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/plugin/type_inet/item_inetfunc.h b/plugin/type_inet/item_inetfunc.h index 813181b065a..dc783d0328d 100644 --- a/plugin/type_inet/item_inetfunc.h +++ b/plugin/type_inet/item_inetfunc.h @@ -41,7 +41,7 @@ public: unsigned_flag= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -64,7 +64,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -108,7 +108,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } String *val_str(String *to) override; @@ -143,7 +143,7 @@ public: return FALSE; } String *val_str_ascii(String *to) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -162,7 +162,7 @@ public: public: const char *func_name() const override { return "is_ipv4"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; @@ -182,7 +182,7 @@ public: const char *func_name() const override { return "is_ipv6"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; @@ -201,7 +201,7 @@ public: { } const char *func_name() const override { return "is_ipv4_compat"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; @@ -219,7 +219,7 @@ public: { } const char *func_name() const override { return "is_ipv4_mapped"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; diff --git a/plugin/type_inet/sql_type_inet.cc b/plugin/type_inet/sql_type_inet.cc index 880cf50c98a..b566e3c1f9d 100644 --- a/plugin/type_inet/sql_type_inet.cc +++ b/plugin/type_inet/sql_type_inet.cc @@ -1090,7 +1090,7 @@ public: Inet6_null tmp(args[0]); return null_value= tmp.is_null() || tmp.to_native(to); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1102,8 +1102,9 @@ public: Item_cache_inet6(THD *thd) :Item_cache(thd, &type_handler_inet6) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } bool cache_value() override { if (!example) @@ -1225,8 +1226,9 @@ public: str->append(tmp); str->append('\''); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } // Non-overriding methods void set_value(const Inet6 &value) @@ -1282,8 +1284,9 @@ public: { return Item::save_in_field(field, no_conversions); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; diff --git a/sql/item.cc b/sql/item.cc index e1ad7e7d13b..063003ee6bf 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2715,7 +2715,7 @@ bool Type_std_attributes::agg_item_set_converter(const DTCollation &coll, @retval 0 on a failure */ -Item* Item_func_or_sum::build_clone(THD *thd) +Item* Item_func_or_sum::do_build_clone(THD *thd) const { Item *copy_tmp_args[2]= {0,0}; Item **copy_args= copy_tmp_args; @@ -3035,7 +3035,7 @@ Item_sp::init_result_field(THD *thd, uint max_length, uint maybe_null, 0 if an error occurred */ -Item* Item_ref::build_clone(THD *thd) +Item* Item_ref::do_build_clone(THD *thd) const { Item_ref *copy= (Item_ref *) get_copy(thd); if (unlikely(!copy) || @@ -3847,7 +3847,7 @@ void Item_decimal::set_decimal_value(my_decimal *value_par) } -Item *Item_decimal::clone_item(THD *thd) +Item *Item_decimal::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_decimal(thd, name.str, &decimal_value, decimals, max_length); @@ -3868,7 +3868,7 @@ my_decimal *Item_float::val_decimal(my_decimal *decimal_value) } -Item *Item_float::clone_item(THD *thd) +Item *Item_float::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_float(thd, name.str, value, decimals, max_length); @@ -4032,7 +4032,7 @@ Item *Item_null::safe_charset_converter(THD *thd, CHARSET_INFO *tocs) return this; } -Item *Item_null::clone_item(THD *thd) +Item *Item_null::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_null(thd, name.str); } @@ -4837,7 +4837,7 @@ bool Item_param::basic_const_item() const } -Item *Item_param::value_clone_item(THD *thd) +Item *Item_param::value_clone_item(THD *thd) const { MEM_ROOT *mem_root= thd->mem_root; switch (value.type_handler()->cmp_type()) { @@ -4851,12 +4851,15 @@ Item *Item_param::value_clone_item(THD *thd) case DECIMAL_RESULT: return 0; // Should create Item_decimal. See MDEV-11361. case STRING_RESULT: + { + String value_copy = value.m_string; // to preserve constness of the func return new (mem_root) Item_string(thd, name, - Lex_cstring(value.m_string.c_ptr_quick(), - value.m_string.length()), - value.m_string.charset(), + Lex_cstring(value_copy.c_ptr_quick(), + value_copy.length()), + value_copy.charset(), collation.derivation, collation.repertoire); + } case TIME_RESULT: break; case ROW_RESULT: @@ -4870,7 +4873,7 @@ Item *Item_param::value_clone_item(THD *thd) /* see comments in the header file */ Item * -Item_param::clone_item(THD *thd) +Item_param::do_clone_const_item(THD *thd) const { // There's no "default". See comments in Item_param::save_in_field(). switch (state) { @@ -6950,7 +6953,7 @@ int Item_string::save_in_field(Field *field, bool no_conversions) } -Item *Item_string::clone_item(THD *thd) +Item *Item_string::do_clone_const_item(THD *thd) const { LEX_CSTRING val; str_value.get_value(&val); @@ -7014,7 +7017,7 @@ int Item_int::save_in_field(Field *field, bool no_conversions) } -Item *Item_int::clone_item(THD *thd) +Item *Item_int::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_int(thd, name.str, value, max_length, unsigned_flag); } @@ -7043,7 +7046,7 @@ int Item_decimal::save_in_field(Field *field, bool no_conversions) } -Item *Item_int_with_ref::clone_item(THD *thd) +Item *Item_int_with_ref::do_clone_const_item(THD *thd) const { DBUG_ASSERT(ref->const_item()); /* @@ -7139,7 +7142,7 @@ Item *Item_uint::neg(THD *thd) } -Item *Item_uint::clone_item(THD *thd) +Item *Item_uint::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_uint(thd, name.str, value, max_length); } @@ -7379,7 +7382,7 @@ void Item_date_literal::print(String *str, enum_query_type query_type) } -Item *Item_date_literal::clone_item(THD *thd) +Item *Item_date_literal::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_date_literal(thd, &cached_time); } @@ -7404,7 +7407,7 @@ void Item_datetime_literal::print(String *str, enum_query_type query_type) } -Item *Item_datetime_literal::clone_item(THD *thd) +Item *Item_datetime_literal::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_datetime_literal(thd, &cached_time, decimals); } @@ -7429,7 +7432,7 @@ void Item_time_literal::print(String *str, enum_query_type query_type) } -Item *Item_time_literal::clone_item(THD *thd) +Item *Item_time_literal::do_clone_const_item(THD *thd) const { return new (thd->mem_root) Item_time_literal(thd, &cached_time, decimals); } @@ -10388,7 +10391,7 @@ void Item_cache_temporal::store_packed(longlong val_arg, Item *example_arg) } -Item *Item_cache_temporal::clone_item(THD *thd) +Item *Item_cache_temporal::do_clone_const_item(THD *thd) const { Item_cache *tmp= type_handler()->Item_get_cache(thd, this); Item_cache_temporal *item= static_cast(tmp); diff --git a/sql/item.h b/sql/item.h index 6e8bcd347a4..19f95c5875f 100644 --- a/sql/item.h +++ b/sql/item.h @@ -30,6 +30,7 @@ #include "sql_time.h" #include "sql_schema.h" #include "mem_root_array.h" +#include C_MODE_START #include @@ -1658,10 +1659,61 @@ public: raise_error_not_evaluable(); return true; // Error } - /* cloning of constant items (0 if it is not const) */ - virtual Item *clone_item(THD *thd) { return 0; } - /* deep copy item */ - virtual Item* build_clone(THD *thd) { return get_copy(thd); } + + /* + Create a shallow copy of the item (usually invoking copy constructor). + For deep copying see build_clone(). + + Return value: + - pointer to a copy of the Item + - nullptr if the item is not copyable + */ + Item *get_copy(THD *thd) const + { + Item *copy= do_get_copy(thd); + if (copy) + { + // Make sure the copy is of same type as this item + DBUG_ASSERT(typeid(*copy) == typeid(*this)); + } + return copy; + } + + /* + Creates a clone of the item by deep copying. + + Return value: + - pointer to a clone of the Item + - nullptr if the item is not clonable + */ + Item* build_clone(THD *thd) const + { + Item *clone= do_build_clone(thd); + if (clone) + { + // Make sure the clone is of same type as this item + DBUG_ASSERT(typeid(*clone) == typeid(*this)); + } + return clone; + } + + /* + Clones the constant item + + Return value: + - pointer to a clone of the Item + - nullptr if the item is not clonable */ + Item *clone_const_item(THD *thd) const + { + Item *clone= do_clone_const_item(thd); + if (clone) + { + // Make sure the clone is of same type as this item + DBUG_ASSERT(typeid(*clone) == typeid(*this)); + } + return clone; + } + virtual cond_result eq_cmp_result() const { return COND_OK; } inline uint float_length(uint decimals_par) const { return decimals < FLOATING_POINT_DECIMALS ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;} @@ -2189,12 +2241,6 @@ public: */ virtual bool find_not_null_fields(table_map allowed) { return false; } - /* - Does not guarantee deep copy (depends on copy ctor). - See build_clone() for deep copy. - */ - virtual Item *get_copy(THD *thd)=0; - bool cache_const_expr_analyzer(uchar **arg); Item* cache_const_expr_transformer(THD *thd, uchar *arg); @@ -2527,12 +2573,33 @@ public: DBUG_ASSERT(is_fixed()); return false; } + +protected: + /* + Service function for public method get_copy(). See comments for get_copy() + above. Override this method in derived classes to create shallow copies of + the item + */ + virtual Item *do_get_copy(THD *thd) const = 0; + + /* + Service function for public method build_clone(). See comments for + build_clone() above. Override this method in derived classes to create + deep copies (clones) of the item where possible + */ + virtual Item* do_build_clone(THD *thd) const = 0; + + /* + Service function for public method clone_const_item(). See comments for + clone_const_item() above + */ + virtual Item *do_clone_const_item(THD *thd) const { return nullptr; } }; MEM_ROOT *get_thd_memroot(THD *thd); template -inline Item* get_item_copy (THD *thd, T* item) +inline Item* get_item_copy (THD *thd, const T* item) { Item *copy= new (get_thd_memroot(thd)) T(*item); if (likely(copy)) @@ -3040,7 +3107,8 @@ public: bool append_for_log(THD *thd, String *str) override; - Item *get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } /* Override the inherited create_field_for_create_select(), @@ -3085,6 +3153,9 @@ public: :Item_splocal(thd, rh, sp_var_name, sp_var_idx, &type_handler_null, pos_in_q, len_in_q) { } + + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -3117,6 +3188,9 @@ public: Item **this_item_addr(THD *thd, Item **) override; bool append_for_log(THD *thd, String *str) override; void print(String *str, enum_query_type query_type) override; + + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -3137,6 +3211,9 @@ public: { } bool fix_fields(THD *thd, Item **it) override; void print(String *str, enum_query_type query_type) override; + + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -3180,7 +3257,8 @@ public: purposes. */ void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } private: uint m_case_expr_id; @@ -3260,8 +3338,9 @@ public: { return mark_unsupported_function("name_const()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -3627,8 +3706,9 @@ public: bool cleanup_excluding_const_fields_processor(void *arg) override { return field && const_item() ? 0 : cleanup_processor(arg); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item* do_build_clone(THD *thd) const override { return get_copy(thd); } bool is_outer_field() const override { DBUG_ASSERT(fixed); @@ -3652,7 +3732,7 @@ public: :Item_field(thd, field), Item_args() { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } const Type_handler *type_handler() const override @@ -3740,7 +3820,7 @@ public: const Type_handler *type_handler() const override { return &type_handler_null; } bool basic_const_item() const override { return true; } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; bool const_is_null() const override { return true; } bool is_null() override { return true; } @@ -3754,8 +3834,9 @@ public: Item_basic_constant *make_string_literal_concat(THD *thd, const LEX_CSTRING *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; class Item_null_result :public Item_null @@ -3964,7 +4045,7 @@ class Item_param :public Item_basic_value, PValue value; const String *value_query_val_str(THD *thd, String* str) const; - Item *value_clone_item(THD *thd); + Item *value_clone_item(THD *thd) const; bool is_evaluable_expression() const override; bool can_return_value() const; @@ -4189,7 +4270,7 @@ public: basic_const_item returned TRUE. */ Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override; - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; void set_param_type_and_swap_value(Item_param *from); Rewritable_query_parameter *get_rewritable_query_parameter() override @@ -4199,7 +4280,8 @@ public: bool append_for_log(THD *thd, String *str) override; bool check_vcol_func_processor(void *) override { return false; } - Item *get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } bool add_as_clone(THD *thd); void sync_clones(); @@ -4287,13 +4369,14 @@ public: String *val_str(String*) override; int save_in_field(Field *field, bool no_conversions) override; bool is_order_clause_position() const override { return true; } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; void print(String *str, enum_query_type query_type) override; Item *neg(THD *thd) override; uint decimal_precision() const override { return (uint) (max_length - MY_TEST(value < 0)); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4321,6 +4404,9 @@ public: predicate at various condition optimization stages in sql_select. */ } + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4331,10 +4417,10 @@ public: Item_uint(THD *thd, ulonglong i): Item_int(thd, i, 10) {} Item_uint(THD *thd, const char *str_arg, longlong i, uint length); double val_real() override { return ulonglong2double((ulonglong)value); } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; Item *neg(THD *thd) override; uint decimal_precision() const override { return max_length; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -4382,7 +4468,7 @@ public: const my_decimal *const_ptr_my_decimal() const override { return &decimal_value; } int save_in_field(Field *field, bool no_conversions) override; - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; void print(String *str, enum_query_type query_type) override { decimal_value.to_string(&str_value); @@ -4391,8 +4477,9 @@ public: Item *neg(THD *thd) override; uint decimal_precision() const override { return decimal_value.precision(); } void set_decimal_value(my_decimal *value_par); - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4434,11 +4521,12 @@ public: } String *val_str(String*) override; my_decimal *val_decimal(my_decimal *) override; - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; Item *neg(THD *thd) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4556,7 +4644,7 @@ public: int save_in_field(Field *field, bool no_conversions) override; const Type_handler *type_handler() const override { return &type_handler_varchar; } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override { return const_charset_converter(thd, tocs, true); @@ -4600,8 +4688,9 @@ public: override; Item *make_odbc_literal(THD *thd, const LEX_CSTRING *typestr) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4621,6 +4710,9 @@ public: { return true; } + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4809,8 +4901,9 @@ public: return field->store_hex_hybrid(str_value.ptr(), str_value.length()); } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4848,8 +4941,9 @@ public: collation.collation); } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4905,8 +4999,9 @@ public: { m_value= value; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -4972,7 +5067,7 @@ public: { return cached_time.get_mysql_time(); } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; longlong val_int() override { return update_null() ? 0 : cached_time.to_longlong(); @@ -4994,8 +5089,9 @@ public: return update_null() ? 0 : cached_time.valid_date_to_packed(); } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5021,7 +5117,7 @@ public: { return cached_time.get_mysql_time(); } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; longlong val_int() override { return cached_time.to_longlong(); } double val_real() override { return cached_time.to_double(); } String *val_str(String *to) override @@ -5037,8 +5133,9 @@ public: { return Time(thd, this).to_native(to, decimals); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5071,7 +5168,7 @@ public: { return cached_time.get_mysql_time(); } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; longlong val_int() override { return update_null() ? 0 : cached_time.to_longlong(); @@ -5093,8 +5190,9 @@ public: return update_null() ? 0 : cached_time.valid_datetime_to_packed(); } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -5355,7 +5453,7 @@ public: virtual bool fix_length_and_dec()= 0; bool const_item() const override { return const_item_cache; } table_map used_tables() const override { return used_tables_cache; } - Item* build_clone(THD *thd) override; + Item* do_build_clone(THD *thd) const override; Sql_mode_dependency value_depends_on_sql_mode() const override { return Item_args::value_depends_on_sql_mode_bit_or().soft_to_hard(); @@ -5602,13 +5700,13 @@ public: return (*ref)->is_outer_field(); } - Item* build_clone(THD *thd) override; + Item *do_build_clone(THD *thd) const override; /** Checks if the item tree that ref points to contains a subquery. */ bool with_subquery() const override { return (*ref)->with_subquery(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool excl_dep_on_table(table_map tab_map) override { @@ -5691,7 +5789,7 @@ public: longlong val_datetime_packed(THD *) override; longlong val_time_packed(THD *) override; Ref_Type ref_type() override { return DIRECT_REF; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *remove_item_direct_ref() override { return (*ref)->remove_item_direct_ref(); } @@ -5859,9 +5957,9 @@ public: { return mark_unsupported_function("cache", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *) override { return nullptr; } + Item *do_build_clone(THD *) const override { return nullptr; } }; @@ -6073,7 +6171,7 @@ public: my_decimal *val_decimal_result(my_decimal *val) override; bool val_bool_result() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *field_transformer_for_having_pushdown(THD *, uchar *) override { return this; } @@ -6136,6 +6234,9 @@ public: table_map not_null_tables() const override { return 0; } Ref_Type ref_type() override { return OUTER_REF; } bool check_inner_refs_processor(void * arg) override; + Item *do_get_copy(THD *thd) const override + { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6172,7 +6273,7 @@ public: bool val_native(THD *thd, Native *to) override; void print(String *str, enum_query_type query_type) override; table_map used_tables() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -6198,7 +6299,7 @@ public: { return ref->save_in_field(field, no_conversions); } - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; Item *real_item() override { return ref; } }; @@ -6335,8 +6436,9 @@ public: { return get_date_from_string(thd, ltime, fuzzydate); } void copy() override; int save_in_field(Field *field, bool no_conversions) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6406,8 +6508,9 @@ public: DBUG_ASSERT(sane()); return null_value || m_value.to_native(to, decimals); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6687,8 +6790,9 @@ public: param->set_default(); return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -6721,8 +6825,9 @@ public: return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7064,8 +7169,9 @@ public: bool cache_value() override; int save_in_field(Field *field, bool no_conversions) override; Item *convert_to_basic_const_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7078,6 +7184,7 @@ public: { return type_handler_year.Item_get_date_with_warn(thd, this, to, mode); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7102,7 +7209,7 @@ public: is a constant and need not be optimized further. Important when storing packed datetime values. */ - Item *clone_item(THD *thd) override; + Item *do_clone_const_item(THD *thd) const override; Item *convert_to_basic_const_item(THD *thd) override; virtual Item *make_literal(THD *) =0; }; @@ -7114,7 +7221,7 @@ public: Item_cache_time(THD *thd) :Item_cache_temporal(thd, &type_handler_time2) { } bool cache_value() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *make_literal(THD *) override; longlong val_datetime_packed(THD *thd) override @@ -7154,7 +7261,7 @@ class Item_cache_datetime: public Item_cache_temporal public: Item_cache_datetime(THD *thd) :Item_cache_temporal(thd, &type_handler_datetime2) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *make_literal(THD *) override; longlong val_datetime_packed(THD *) override @@ -7189,7 +7296,7 @@ class Item_cache_date: public Item_cache_temporal public: Item_cache_date(THD *thd) :Item_cache_temporal(thd, &type_handler_newdate) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *make_literal(THD *) override; longlong val_datetime_packed(THD *) override @@ -7222,8 +7329,9 @@ class Item_cache_timestamp: public Item_cache public: Item_cache_timestamp(THD *thd) :Item_cache(thd, &type_handler_timestamp2) { } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } bool cache_value() override; String* val_str(String *to) override { @@ -7282,8 +7390,9 @@ public: :Item_cache_real(thd, &type_handler_double) { } String* val_str(String *str) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7294,8 +7403,9 @@ public: :Item_cache_real(thd, &type_handler_float) { } String* val_str(String *str) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7317,8 +7427,9 @@ public: } bool cache_value() override; Item *convert_to_basic_const_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7347,8 +7458,9 @@ public: int save_in_field(Field *field, bool no_conversions) override; bool cache_value() override; Item *convert_to_basic_const_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7372,8 +7484,9 @@ public: */ return Item::safe_charset_converter(thd, tocs); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7449,8 +7562,9 @@ public: } bool cache_value() override; void set_null() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -7531,7 +7645,8 @@ public: make_and_init_table_field(root, &name, Record_addr(maybe_null), *this, table); } - Item* get_copy(THD *) override { return nullptr; } + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -7686,7 +7801,7 @@ public: Item *safe_charset_converter(THD *thd, CHARSET_INFO *tocs) override; Item *get_tmp_table_item(THD *thd) override { return m_item->get_tmp_table_item(thd); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } COND *build_equal_items(THD *thd, COND_EQUAL *inherited, bool link_item_fields, @@ -7756,7 +7871,7 @@ public: { return m_item->excl_dep_on_grouping_fields(sel); } bool is_expensive() override { return m_item->is_expensive(); } void set_item(Item *item) { m_item= item; } - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { Item *clone_item= m_item->build_clone(thd); if (clone_item) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index c17a7d57545..2f9da57cdba 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -5465,17 +5465,16 @@ void Item_cond::neg_arguments(THD *thd) 0 if an error occurred */ -Item *Item_cond::build_clone(THD *thd) +Item *Item_cond::do_build_clone(THD *thd) const { - List_iterator_fast li(list); - Item *item; Item_cond *copy= (Item_cond *) get_copy(thd); if (!copy) return 0; copy->list.empty(); - while ((item= li++)) + + for (const Item &item : list) { - Item *arg_clone= item->build_clone(thd); + Item *arg_clone= item.build_clone(thd); if (!arg_clone) return 0; if (copy->list.push_back(arg_clone, thd->mem_root)) diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index e2e743fa075..d394d932adf 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -288,7 +288,7 @@ public: Item_func_istrue(THD *thd, Item *a): Item_func_truth(thd, a, true, true) {} ~Item_func_istrue() = default; const char* func_name() const override { return "istrue"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -305,7 +305,7 @@ public: ~Item_func_isnottrue() = default; const char* func_name() const override { return "isnottrue"; } bool find_not_null_fields(table_map allowed) override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool eval_not_null_tables(void *) override { not_null_tables_cache= 0; return false; } }; @@ -321,7 +321,7 @@ public: Item_func_isfalse(THD *thd, Item *a): Item_func_truth(thd, a, false, true) {} ~Item_func_isfalse() = default; const char* func_name() const override { return "isfalse"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -338,7 +338,7 @@ public: ~Item_func_isnotfalse() = default; const char* func_name() const override { return "isnotfalse"; } bool find_not_null_fields(table_map allowed) override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool eval_not_null_tables(void *) override { not_null_tables_cache= 0; return false; } }; @@ -408,7 +408,7 @@ public: void restore_first_argument(); Item* get_wrapped_in_subselect_item() { return args[1]; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } enum precedence precedence() const override { return args[1]->precedence(); } }; @@ -579,10 +579,10 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, false); } - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { Item_bool_rowready_func2 *clone= - (Item_bool_rowready_func2 *) Item_func::build_clone(thd); + (Item_bool_rowready_func2 *) Item_func::do_build_clone(thd); if (clone) { clone->cmp.comparators= 0; @@ -613,7 +613,7 @@ public: Item_args::propagate_equal_fields(thd, Context_boolean(), cond); return this; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -633,7 +633,7 @@ public: Item *neg_transformer(THD *thd) override; bool fix_fields(THD *, Item **) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -682,7 +682,7 @@ public: void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -722,7 +722,7 @@ public: longlong val_int() override; const char *func_name() const override { return ""; } Item *neg_transformer(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -763,7 +763,7 @@ public: uint in_equality_no; uint exists2in_reserved_items() override { return 1; }; friend class Arg_comparator; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -788,7 +788,7 @@ public: return add_key_fields_optimize_op(join, key_fields, and_level, usable_tables, sargables, true); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -804,7 +804,7 @@ public: cond_result eq_cmp_result() const override { return COND_TRUE; } const char *func_name() const override { return ">="; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -820,7 +820,7 @@ public: cond_result eq_cmp_result() const override { return COND_FALSE; } const char *func_name() const override { return ">"; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -836,7 +836,7 @@ public: cond_result eq_cmp_result() const override { return COND_TRUE; } const char *func_name() const override { return "<="; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -852,7 +852,7 @@ public: cond_result eq_cmp_result() const override { return COND_FALSE; } const char *func_name() const override { return "<"; } Item *negated_item(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -873,7 +873,7 @@ public: Item *negated_item(THD *thd) override; void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -968,7 +968,7 @@ public: cond); return this; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int_cmp_string(); @@ -1000,7 +1000,7 @@ public: fix_char_length(2); // returns "1" or "0" or "-1" return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1035,7 +1035,7 @@ public: str->append(func_name()); print_args(str, 0, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1063,7 +1063,7 @@ public: } const char *func_name() const override { return "coalesce"; } table_map not_null_tables() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1154,7 +1154,7 @@ public: const char *func_name() const override { return "ifnull"; } table_map not_null_tables() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1227,7 +1227,7 @@ public: const char *func_name() const override { return "if"; } bool eval_not_null_tables(void *opt_arg) override; void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: void cache_type_info(Item *source); @@ -1248,7 +1248,7 @@ public: { return fix_length_and_dec2_eliminate_null(args + 1); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1337,7 +1337,7 @@ public: cond, &args[2]); return this; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *derived_field_transformer_for_having(THD *thd, uchar *arg) override { reset_first_arg_if_needed(); return this; } @@ -2273,7 +2273,7 @@ public: return this; } Item *find_item() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2321,7 +2321,7 @@ public: bool fix_length_and_dec() override; Item *propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override; Item *find_item() override; - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { Item_func_case_simple *clone= (Item_func_case_simple *) Item_func_case::build_clone(thd); @@ -2330,7 +2330,7 @@ public: return NULL; return clone; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2346,7 +2346,7 @@ public: void print(String *str, enum_query_type query_type) override; bool fix_length_and_dec() override; Item *find_item() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2511,11 +2511,11 @@ public: bool find_not_null_fields(table_map allowed) override; void fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge) override; bool count_sargable_conds(void *arg) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *thd) override + Item *do_build_clone(THD *thd) const override { - Item_func_in *clone= (Item_func_in *) Item_func::build_clone(thd); + Item_func_in *clone= (Item_func_in *) Item_func::do_build_clone(thd); if (clone) { clone->array= 0; @@ -2655,7 +2655,7 @@ public: table_map not_null_tables() const override { return 0; } bool find_not_null_fields(table_map allowed) override; Item *neg_transformer(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2703,7 +2703,7 @@ public: Item *neg_transformer(THD *thd) override; void print(String *str, enum_query_type query_type) override; void top_level_item() override { abort_on_null=1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2856,7 +2856,7 @@ public: bool find_selective_predicates_list_processor(void *arg) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2949,7 +2949,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "regexp"; } enum precedence precedence() const override { return IN_PRECEDENCE; } - Item *get_copy(THD *) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } void print(String *str, enum_query_type query_type) override { print_op(str, query_type); @@ -2988,7 +2988,7 @@ public: longlong val_int() override; bool fix_length_and_dec() override; const char *func_name() const override { return "regexp_instr"; } - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } }; @@ -3084,7 +3084,7 @@ public: } bool eval_not_null_tables(void *opt_arg) override; bool find_not_null_fields(table_map allowed) override; - Item *build_clone(THD *thd) override; + Item *do_build_clone(THD *thd) const override; bool excl_dep_on_table(table_map tab_map) override; bool excl_dep_on_grouping_fields(st_select_lex *sel) override; @@ -3268,7 +3268,7 @@ public: void set_context_field(Item_field *ctx_field) { context_field= ctx_field; } void set_link_equal_fields(bool flag) { link_equal_fields= flag; } - Item* get_copy(THD *thd) override { return 0; } + Item* do_get_copy(THD *thd) const override { return 0; } /* This does not comply with the specification of the virtual method, but Item_equal items are processed distinguishly anyway @@ -3433,7 +3433,7 @@ public: void add_key_fields(JOIN *join, KEY_FIELD **key_fields, uint *and_level, table_map usable_tables, SARGABLE_PARAM **sargables) override; SEL_TREE *get_mm_tree(RANGE_OPT_PARAM *param, Item **cond_ptr) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3457,7 +3457,7 @@ public: table_map not_null_tables() const override { return and_tables_cache; } Item *copy_andor_structure(THD *thd) override; Item *neg_transformer(THD *thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3468,7 +3468,7 @@ public: longlong val_int() override; const char *func_name() const override { return "column_check"; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3480,7 +3480,7 @@ public: longlong val_int() override; const char *func_name() const override { return "column_exists"; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3509,7 +3509,7 @@ public: :Item_func_cursor_bool_attr(thd, name, offset) { } const char *func_name() const override { return "%ISOPEN"; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3521,7 +3521,7 @@ public: :Item_func_cursor_bool_attr(thd, name, offset) { maybe_null= true; } const char *func_name() const override { return "%FOUND"; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3533,7 +3533,7 @@ public: :Item_func_cursor_bool_attr(thd, name, offset) { maybe_null= true; } const char *func_name() const override { return "%NOTFOUND"; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_func.h b/sql/item_func.h index 015f6ca8106..9e6ab703dad 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1265,7 +1265,7 @@ public: longlong val_int() override; bool fix_length_and_dec() override; const Type_handler *type_handler() const override { return &type_handler_slong; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } const char *func_name() const override { return ""; } }; @@ -1277,7 +1277,7 @@ public: :Item_func_hash(thd, item) {} longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } const char *func_name() const override { return ""; } }; @@ -1332,7 +1332,7 @@ public: { return Cursor_ref::print_func(str, func_name()); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1352,7 +1352,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1419,7 +1419,7 @@ public: void print(String *str, enum_query_type query_type) override; uint decimal_precision() const override { return args[0]->decimal_precision(); } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1450,7 +1450,7 @@ public: } uint decimal_precision() const override { return max_length; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1486,7 +1486,7 @@ public: const char *func_name() const override { return "decimal_typecast"; } void print(String *str, enum_query_type query_type) override; bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1533,7 +1533,7 @@ public: nr.to_string(str, decimals); return str; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1551,7 +1551,7 @@ public: } const char *func_name() const override { return "double_typecast"; } double val_real() override { return val_real_with_truncate(DBL_MAX); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1577,7 +1577,7 @@ public: longlong int_op() override; double real_op() override; my_decimal *decimal_op(my_decimal *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1612,7 +1612,7 @@ public: Item_func_additive_op::fix_length_and_dec_int(); fix_unsigned_flag(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1631,7 +1631,7 @@ public: bool fix_length_and_dec() override; bool check_partition_func_processor(void *int_arg) override {return FALSE;} bool check_vcol_func_processor(void *arg) override { return FALSE;} - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1650,7 +1650,7 @@ public: void fix_length_and_dec_double(); void fix_length_and_dec_int(); void result_precision() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1674,7 +1674,7 @@ public: bool check_partition_func_processor(void *int_arg) override {return FALSE;} bool check_vcol_func_processor(void *arg) override { return FALSE;} bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1708,7 +1708,7 @@ public: } bool check_partition_func_processor(void *int_arg) override {return FALSE;} bool check_vcol_func_processor(void *arg) override { return FALSE;} - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1734,7 +1734,7 @@ public: bool fix_length_and_dec() override; uint decimal_precision() const override { return args[0]->decimal_precision(); } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1752,7 +1752,7 @@ public: void fix_length_and_dec_double(); void fix_length_and_dec_decimal(); bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1779,7 +1779,7 @@ public: Item_func_exp(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "exp"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1790,7 +1790,7 @@ public: Item_func_ln(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "ln"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1802,7 +1802,7 @@ public: Item_func_log(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {} double val_real() override; const char *func_name() const override { return "log"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1813,7 +1813,7 @@ public: Item_func_log2(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "log2"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1824,7 +1824,7 @@ public: Item_func_log10(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "log10"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1835,7 +1835,7 @@ public: Item_func_sqrt(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "sqrt"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1846,7 +1846,7 @@ public: Item_func_pow(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {} double val_real() override; const char *func_name() const override { return "pow"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1857,7 +1857,7 @@ public: Item_func_acos(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "acos"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1867,7 +1867,7 @@ public: Item_func_asin(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "asin"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1878,7 +1878,7 @@ public: Item_func_atan(THD *thd, Item *a, Item *b): Item_dec_func(thd, a, b) {} double val_real() override; const char *func_name() const override { return "atan"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1888,7 +1888,7 @@ public: Item_func_cos(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "cos"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1898,7 +1898,7 @@ public: Item_func_sin(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "sin"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1908,7 +1908,7 @@ public: Item_func_tan(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "tan"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1918,7 +1918,7 @@ public: Item_func_cot(THD *thd, Item *a): Item_dec_func(thd, a) {} double val_real() override; const char *func_name() const override { return "cot"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1960,7 +1960,7 @@ public: my_decimal *decimal_op(my_decimal *) override; bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; bool time_op(THD *thd, MYSQL_TIME *ltime) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1976,7 +1976,7 @@ public: my_decimal *decimal_op(my_decimal *) override; bool date_op(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; bool time_op(THD *thd, MYSQL_TIME *ltime) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2021,7 +2021,7 @@ public: */ return args[0]->real_type_handler()->Item_func_round_fix_length_and_dec(this); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2047,7 +2047,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2062,7 +2062,7 @@ public: uint decimal_precision() const override { return 1; } bool fix_length_and_dec() override { fix_char_length(2); return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2085,7 +2085,7 @@ public: max_length= float_length(decimals); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2187,7 +2187,7 @@ class Item_func_min :public Item_func_min_max public: Item_func_min(THD *thd, List &list): Item_func_min_max(thd, list, 1) {} const char *func_name() const override { return "least"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2196,7 +2196,7 @@ class Item_func_max :public Item_func_min_max public: Item_func_max(THD *thd, List &list): Item_func_min_max(thd, list, -1) {} const char *func_name() const override { return "greatest"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2230,7 +2230,7 @@ public: Type_std_attributes::set(*args[0]); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2252,7 +2252,7 @@ public: Item_func_octet_length(THD *thd, Item *a): Item_long_func_length(thd, a) {} longlong val_int() override; const char *func_name() const override { return "octet_length"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2268,7 +2268,7 @@ public: } longlong val_int() override; const char *func_name() const override { return "bit_length"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2279,7 +2279,7 @@ public: Item_func_char_length(THD *thd, Item *a): Item_long_func_length(thd, a) {} longlong val_int() override; const char *func_name() const override { return "char_length"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2304,7 +2304,7 @@ public: Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override { return this; } bool const_item() const override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2337,7 +2337,7 @@ public: return agg_arg_charsets_for_comparison(cmp_collation, args, 2); } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2352,7 +2352,7 @@ public: longlong val_int() override; const char *func_name() const override { return "field"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2367,7 +2367,7 @@ public: longlong val_int() override; const char *func_name() const override { return "ascii"; } bool fix_length_and_dec() override { max_length=3; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2381,7 +2381,7 @@ public: bool fix_length_and_dec() override { fix_char_length(7); return FALSE; } longlong val_int() override; const char *func_name() const override { return "ord"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2399,7 +2399,7 @@ public: longlong val_int() override; const char *func_name() const override { return "find_in_set"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2441,7 +2441,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "|"; } enum precedence precedence() const override { return BITOR_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2453,7 +2453,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "&"; } enum precedence precedence() const override { return BITAND_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2465,7 +2465,7 @@ public: Item_func_bit_count(THD *thd, Item *a): Item_handled_func(thd, a) {} const char *func_name() const override { return "bit_count"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2477,7 +2477,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "<<"; } enum precedence precedence() const override { return SHIFT_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2489,7 +2489,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return ">>"; } enum precedence precedence() const override { return SHIFT_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2505,7 +2505,7 @@ public: str->append(func_name()); args[0]->print_parenthesised(str, query_type, precedence()); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2531,7 +2531,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2555,7 +2555,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2582,7 +2582,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2733,7 +2733,7 @@ class Item_func_udf_float :public Item_udf_func String *val_str(String *str) override; const Type_handler *type_handler() const override { return &type_handler_double; } bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2760,7 +2760,7 @@ public: return &type_handler_slonglong; } bool fix_length_and_dec() override { decimals= 0; max_length= 21; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2787,7 +2787,7 @@ public: } const Type_handler *type_handler() const override { return &type_handler_newdecimal; } bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2826,7 +2826,7 @@ public: } const Type_handler *type_handler() const override { return string_type_handler(); } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2919,7 +2919,7 @@ class Item_func_get_lock final :public Item_func_lock longlong val_int() override final; const char *func_name() const override final { return "get_lock"; } bool fix_length_and_dec() override { max_length= 1; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -2931,7 +2931,7 @@ public: { unsigned_flag= 1; } longlong val_int() override final; const char *func_name() const override final { return "release_all_locks"; } - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -2946,7 +2946,7 @@ public: longlong val_int() override final; const char *func_name() const override { return "release_lock"; } bool fix_length_and_dec() override { max_length= 1; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -2978,7 +2978,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3003,7 +3003,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3119,7 +3119,7 @@ public: bool register_field_in_bitmap(void *arg) override; bool set_entry(THD *thd, bool create_if_not_exists); void cleanup() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool excl_dep_on_table(table_map tab_map) override { return false; } }; @@ -3148,7 +3148,7 @@ public: table_map used_tables() const override { return const_item() ? 0 : RAND_TABLE_BIT; } bool eq(const Item *item, bool binary_cmp) const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: bool set_value(THD *thd, sp_rcontext *ctx, Item **it) override; @@ -3230,8 +3230,9 @@ public: void set_null_value(CHARSET_INFO* cs); void set_value(const char *str, uint length, CHARSET_INFO* cs); const Type_handler *type_handler() const override { return &type_handler_double; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -3289,7 +3290,7 @@ public: void cleanup() override; bool check_vcol_func_processor(void *arg) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3348,9 +3349,9 @@ public: { return mark_unsupported_function("match ... against()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *thd) override { return 0; } + Item *do_build_clone(THD *thd) const override { return nullptr; } private: /** Check whether storage engine for given table, @@ -3396,7 +3397,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "^"; } enum precedence precedence() const override { return BITXOR_PRECEDENCE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3418,7 +3419,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3440,7 +3441,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3492,7 +3493,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3630,7 +3631,7 @@ public: { return TRUE; } - Item *get_copy(THD *) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } bool eval_not_null_tables(void *opt_arg) override { not_null_tables_cache= 0; @@ -3656,7 +3657,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3675,7 +3676,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3700,7 +3701,7 @@ public: max_length= 11; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3721,7 +3722,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3757,7 +3758,7 @@ public: Item_func::update_used_tables(); maybe_null= last_value->maybe_null; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3798,7 +3799,7 @@ public: } } bool const_item() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void print(String *str, enum_query_type query_type) override; bool check_vcol_func_processor(void *arg) override @@ -3817,7 +3818,7 @@ public: Item_func_nextval(thd, table_list_arg) {} longlong val_int() override; const char *func_name() const override { return "lastval"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -3838,7 +3839,7 @@ public: longlong val_int() override; const char *func_name() const override { return "setval"; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h index 6c57ac52563..2eed5dba629 100644 --- a/sql/item_geofunc.h +++ b/sql/item_geofunc.h @@ -214,7 +214,7 @@ public: Item_geometry_func(thd, a, srid) {} const char *func_name() const override { return "st_geometryfromtext"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -232,7 +232,7 @@ public: Item_geometry_func(thd, a, srid) {} const char *func_name() const override { return "st_geometryfromwkb"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -254,7 +254,7 @@ public: Item_geometry_func(thd, js, opt, srid) {} const char *func_name() const override { return "st_geomfromgeojson"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -267,7 +267,7 @@ public: const char *func_name() const override { return "st_astext"; } String *val_str_ascii(String *) override; bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -287,7 +287,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -310,7 +310,7 @@ public: const char *func_name() const override { return "st_asgeojson"; } bool fix_length_and_dec() override; String *val_str_ascii(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -329,7 +329,7 @@ public: maybe_null= 1; return FALSE; }; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -364,7 +364,7 @@ public: {} const char *func_name() const override { return "st_convexhull"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -380,7 +380,7 @@ public: { return &type_handler_point; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -395,7 +395,7 @@ public: { return &type_handler_polygon; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -429,7 +429,7 @@ public: :Item_geometry_func_args_geometry(thd, a) {} const char *func_name() const override { return "st_boundary"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -448,7 +448,7 @@ public: { return &type_handler_point; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -474,7 +474,7 @@ public: } } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -507,7 +507,7 @@ public: } } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -563,7 +563,7 @@ public: return &type_handler_geometrycollection; } const char *func_name() const override { return "geometrycollection"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -578,7 +578,7 @@ public: { } const Type_handler *type_handler() const override { return &type_handler_linestring; } const char *func_name() const override { return "linestring"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -593,7 +593,7 @@ public: { } const Type_handler *type_handler() const override { return &type_handler_polygon; } const char *func_name() const override { return "polygon"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -611,7 +611,7 @@ public: return &type_handler_multilinestring; } const char *func_name() const override { return "multilinestring"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -629,7 +629,7 @@ public: return &type_handler_multipoint; } const char *func_name() const override { return "multipoint"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -647,7 +647,7 @@ public: return &type_handler_multipolygon; } const char *func_name() const override { return "multipolygon"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -699,7 +699,7 @@ public: usable_tables, sargables, false); } bool need_parentheses_in_default() override { return false; } - Item *build_clone(THD *thd) override { return 0; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -711,7 +711,7 @@ public: { } longlong val_int() override; const char *func_name() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -727,7 +727,7 @@ public: { } longlong val_int() override; const char *func_name() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -750,7 +750,7 @@ public: longlong val_int() override; const char *func_name() const override { return "st_relate"; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -787,7 +787,7 @@ public: { Item_func::print(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -844,7 +844,7 @@ public: :Item_geometry_func_args_geometry(thd, obj, distance) {} const char *func_name() const override { return "st_buffer"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -858,7 +858,7 @@ public: const char *func_name() const override { return "st_isempty"; } bool fix_length_and_dec() override { maybe_null= 1; return FALSE; } bool need_parentheses_in_default() override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -875,7 +875,7 @@ public: const char *func_name() const override { return "st_issimple"; } bool fix_length_and_dec() override { decimals=0; max_length=2; return FALSE; } uint decimal_precision() const override { return 1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -888,7 +888,7 @@ public: const char *func_name() const override { return "st_isclosed"; } bool fix_length_and_dec() override { decimals=0; max_length=2; return FALSE; } uint decimal_precision() const override { return 1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -898,7 +898,7 @@ public: Item_func_isring(THD *thd, Item *a): Item_func_issimple(thd, a) {} longlong val_int() override; const char *func_name() const override { return "st_isring"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -910,7 +910,7 @@ public: longlong val_int() override; const char *func_name() const override { return "st_dimension"; } bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -928,7 +928,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -946,7 +946,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -959,7 +959,7 @@ public: longlong val_int() override; const char *func_name() const override { return "st_numgeometries"; } bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -972,7 +972,7 @@ public: longlong val_int() override; const char *func_name() const override { return "st_numinteriorrings"; } bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -985,7 +985,7 @@ public: longlong val_int() override; const char *func_name() const override { return "st_numpoints"; } bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1003,7 +1003,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1023,7 +1023,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1036,7 +1036,7 @@ public: longlong val_int() override; const char *func_name() const override { return "srid"; } bool fix_length_and_dec() override { max_length= 10; maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1053,7 +1053,7 @@ public: :Item_real_func_args_geometry_geometry(thd, a, b) {} double val_real() override; const char *func_name() const override { return "st_distance"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1067,7 +1067,7 @@ public: Item_real_func(thd, list) {} double val_real() override; const char *func_name() const override { return "st_distance_sphere"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1087,7 +1087,7 @@ public: { return &type_handler_point; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1105,7 +1105,7 @@ class Item_func_gis_debug: public Item_long_func { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #endif diff --git a/sql/item_jsonfunc.h b/sql/item_jsonfunc.h index b96189b3c8f..ba1f31b1ab7 100644 --- a/sql/item_jsonfunc.h +++ b/sql/item_jsonfunc.h @@ -89,7 +89,7 @@ public: static const Lex_cstring fmt(STRING_WITH_LEN("json")); return to->set_format_name(fmt); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } enum Functype functype() const override { return JSON_VALID_FUNC; } }; @@ -106,7 +106,7 @@ public: Item_bool_func(thd, js, i_path) {} const char *func_name() const override { return "json_exists"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } longlong val_int() override; }; @@ -150,7 +150,7 @@ public: { return je->check_and_get_value_scalar(res, error); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -174,7 +174,7 @@ public: { return je->check_and_get_value_complex(res, error); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -189,7 +189,7 @@ public: const char *func_name() const override { return "json_quote"; } bool fix_length_and_dec() override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -204,7 +204,7 @@ public: const char *func_name() const override { return "json_unquote"; } bool fix_length_and_dec() override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -255,7 +255,7 @@ public: double val_real() override; my_decimal *val_decimal(my_decimal *) override; uint get_n_paths() const override { return arg_count - 1; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -274,7 +274,7 @@ public: const char *func_name() const override { return "json_contains"; } bool fix_length_and_dec() override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -297,7 +297,7 @@ public: bool fix_fields(THD *thd, Item **ref) override; bool fix_length_and_dec() override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -315,7 +315,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "json_array"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -332,7 +332,7 @@ public: String *val_str(String *) override; uint get_n_paths() const override { return arg_count/2; } const char *func_name() const override { return "json_array_append"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -344,7 +344,7 @@ public: Item_func_json_array_append(thd, list) {} String *val_str(String *) override; const char *func_name() const override { return "json_array_insert"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -358,7 +358,7 @@ public: Item_func_json_array(thd, list) {} String *val_str(String *) override; const char *func_name() const override { return "json_object"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -372,7 +372,7 @@ public: Item_func_json_array(thd, list) {} String *val_str(String *) override; const char *func_name() const override { return "json_merge_preserve"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -383,7 +383,7 @@ public: Item_func_json_merge(thd, list) {} const char *func_name() const override { return "json_merge_patch"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -410,7 +410,7 @@ public: const char *func_name() const override { return "json_length"; } bool fix_length_and_dec() override; longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -426,7 +426,7 @@ public: const char *func_name() const override { return "json_depth"; } bool fix_length_and_dec() override { max_length= 10; return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -440,7 +440,7 @@ public: const char *func_name() const override { return "json_type"; } bool fix_length_and_dec() override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -463,7 +463,7 @@ public: return mode_insert ? (mode_replace ? "json_set" : "json_insert") : "json_replace"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -479,7 +479,7 @@ public: String *val_str(String *) override; uint get_n_paths() const override { return arg_count - 1; } const char *func_name() const override { return "json_remove"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -496,7 +496,7 @@ public: const char *func_name() const override { return "json_keys"; } bool fix_length_and_dec() override; String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -521,7 +521,7 @@ public: bool fix_length_and_dec() override; String *val_str(String *) override; uint get_n_paths() const override { return arg_count > 4 ? arg_count - 4 : 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -549,7 +549,7 @@ public: bool fix_length_and_dec() override; String *val_str(String *str) override; String *val_json(String *str) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -591,7 +591,7 @@ public: String* val_str(String *str) override; Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -636,7 +636,7 @@ public: String* val_str(String* str) override; Item *copy_or_same(THD* thd) override; void no_rows_in_result() override {} - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_row.cc b/sql/item_row.cc index 767787497ce..2a5c3a09ce5 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -183,7 +183,7 @@ void Item_row::bring_value() } -Item* Item_row::build_clone(THD *thd) +Item* Item_row::do_build_clone(THD *thd) const { Item **copy_args= static_cast (alloc_root(thd->mem_root, sizeof(Item*) * arg_count)); diff --git a/sql/item_row.h b/sql/item_row.h index 3c004e96341..9740da8e4a5 100644 --- a/sql/item_row.h +++ b/sql/item_row.h @@ -152,9 +152,9 @@ public: } bool check_vcol_func_processor(void *arg) override {return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } - Item *build_clone(THD *thd) override; + Item *do_build_clone(THD *thd) const override; }; #endif /* ITEM_ROW_INCLUDED */ diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 42a41242e01..c713534e42d 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -150,7 +150,7 @@ public: return FALSE; } const char *func_name() const override { return "md5"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -162,7 +162,7 @@ public: String *val_str_ascii(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "sha"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -174,7 +174,7 @@ public: String *val_str_ascii(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "sha2"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -187,7 +187,7 @@ public: String *val_str_ascii(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "to_base64"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -200,7 +200,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "from_base64"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -227,7 +227,7 @@ public: :Item_aes_crypt(thd, a, b) {} bool fix_length_and_dec() override; const char *func_name() const override { return "aes_encrypt"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -238,7 +238,7 @@ public: Item_aes_crypt(thd, a, b) {} bool fix_length_and_dec() override; const char *func_name() const override { return "aes_decrypt"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -268,7 +268,7 @@ public: print_args_parenthesized(str, query_type); } const char *func_name() const override { return "concat"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -299,7 +299,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } @@ -320,7 +320,7 @@ public: return FALSE; } const char *func_name() const override { return "decode_histogram"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -333,7 +333,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "concat_ws"; } table_map not_null_tables() const override { return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -345,7 +345,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "reverse"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -367,7 +367,7 @@ public: print_args_parenthesized(str, query_type); } const char *func_name() const override { return "replace"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -391,7 +391,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -427,7 +427,7 @@ public: } bool fix_length_and_dec() override; const char *func_name() const override { return "regexp_replace"; } - Item *get_copy(THD *thd) override { return 0;} + Item *do_get_copy(THD *thd) const override { return 0;} }; @@ -468,7 +468,7 @@ public: String *val_str(String *str) override; bool fix_length_and_dec() override; const char *func_name() const override { return "regexp_substr"; } - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } }; @@ -482,7 +482,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "insert"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -505,7 +505,7 @@ public: Item_func_lcase(THD *thd, Item *item): Item_str_conv(thd, item) {} const char *func_name() const override { return "lcase"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -515,7 +515,7 @@ public: Item_func_ucase(THD *thd, Item *item): Item_str_conv(thd, item) {} const char *func_name() const override { return "ucase"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -529,7 +529,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "left"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -542,7 +542,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "right"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -567,7 +567,7 @@ public: print_args_parenthesized(str, query_type); } const char *func_name() const override { return "substr"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -603,7 +603,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -616,7 +616,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "substring_index"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -655,7 +655,7 @@ public: const char *func_name() const override { return "trim"; } void print(String *str, enum_query_type query_type) override; virtual const char *mode_name() const { return "both"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -676,7 +676,7 @@ public: maybe_null= true; return res; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -694,7 +694,7 @@ public: const Schema *schema() const override { return &mariadb_schema; } const char *func_name() const override { return "ltrim"; } const char *mode_name() const override { return "leading"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -715,7 +715,7 @@ public: maybe_null= true; return res; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -729,7 +729,7 @@ public: const Schema *schema() const override { return &mariadb_schema; } const char *func_name() const override { return "rtrim"; } const char *mode_name() const override { return "trailing"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -750,7 +750,7 @@ public: maybe_null= true; return res; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -789,7 +789,7 @@ public: "password" : "old_password"); } static char *alloc(THD *thd, const char *password, size_t pass_len, enum PW_Alg al); - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -812,7 +812,7 @@ public: return FALSE; } const char *func_name() const override { return "des_encrypt"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -835,7 +835,7 @@ public: return FALSE; } const char *func_name() const override { return "des_decrypt"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -871,7 +871,7 @@ public: { return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -891,7 +891,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "encode"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } protected: virtual void crypto_transform(String *); @@ -912,7 +912,7 @@ public: print_args_parenthesized(str, query_type); } const char *func_name() const override { return "decode"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } protected: void crypto_transform(String *) override; @@ -953,7 +953,7 @@ public: } const char *func_name() const override { return "database"; } const char *fully_qualified_func_name() const override { return "database()"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -975,7 +975,7 @@ public: null_value= maybe_null= false; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1008,7 +1008,7 @@ public: { return save_str_value_in_field(field, &str_value); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1061,7 +1061,7 @@ public: return mark_unsupported_function(fully_qualified_func_name(), arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1074,7 +1074,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "soundex"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1088,7 +1088,7 @@ public: String *val_str(String *str) override; bool fix_length_and_dec() override; const char *func_name() const override { return "elt"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1102,7 +1102,7 @@ public: String *val_str(String *str) override; bool fix_length_and_dec() override; const char *func_name() const override { return "make_set"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1119,7 +1119,7 @@ public: String *val_str_ascii(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "format"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1144,7 +1144,7 @@ public: } const char *func_name() const override { return "char"; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1160,7 +1160,7 @@ public: return FALSE; } const char *func_name() const override { return "chr"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1173,7 +1173,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "repeat"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1185,7 +1185,7 @@ public: String *val_str(String *) override; bool fix_length_and_dec() override; const char *func_name() const override { return "space"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1202,7 +1202,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1240,7 +1240,7 @@ public: } const char *func_name() const override { return "rpad"; } Sql_mode_dependency value_depends_on_sql_mode() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1274,7 +1274,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1296,7 +1296,7 @@ public: print_args_parenthesized(str, query_type); } const char *func_name() const override { return "lpad"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1330,7 +1330,7 @@ public: print_sql_mode_qualified_name(str, query_type); print_args_parenthesized(str, query_type); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1349,7 +1349,7 @@ public: maybe_null= 1; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1395,7 +1395,7 @@ public: fix_char_length(char_length); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1417,7 +1417,7 @@ public: max_length=(1+args[0]->max_length)/2; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1450,7 +1450,7 @@ public: Item_func_like_range_min(THD *thd, Item *a, Item *b): Item_func_like_range(thd, a, b, true) { } const char *func_name() const override { return "like_range_min"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1461,7 +1461,7 @@ public: Item_func_like_range_max(THD *thd, Item *a, Item *b): Item_func_like_range(thd, a, b, false) { } const char *func_name() const override { return "like_range_max"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #endif @@ -1489,7 +1489,7 @@ public: void print(String *str, enum_query_type query_type) override; const char *func_name() const override { return "cast_as_binary"; } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1512,7 +1512,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_IMPOSSIBLE); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1529,7 +1529,7 @@ class Item_func_export_set: public Item_str_func String *val_str(String *str) override; bool fix_length_and_dec() override; const char *func_name() const override { return "export_set"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1552,7 +1552,7 @@ public: max_length= (uint32) MY_MIN(max_result_length, MAX_BLOB_WIDTH); return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1644,7 +1644,7 @@ public: bool fix_length_and_dec() override; const char *func_name() const override { return "convert"; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1667,7 +1667,7 @@ public: return args[0]->field_for_view_update(); } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1697,7 +1697,7 @@ public: :Item_func_expr_str_metadata(thd, a) { } String *val_str(String *) override; const char *func_name() const override { return "charset"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1709,7 +1709,7 @@ public: :Item_func_expr_str_metadata(thd, a) {} String *val_str(String *) override; const char *func_name() const override { return "collation"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1744,7 +1744,7 @@ public: Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override { return this; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1759,7 +1759,7 @@ public: const char *func_name() const override { return "crc32"; } bool fix_length_and_dec() override { max_length=10; return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1772,7 +1772,7 @@ public: const char *func_name() const override{return "uncompressed_length";} bool fix_length_and_dec() override { max_length=10; maybe_null= true; return FALSE; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1795,7 +1795,7 @@ public: } const char *func_name() const override{return "compress";} String *val_str(String *) override ZLIB_DEPENDED_FUNCTION - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1812,7 +1812,7 @@ public: } const char *func_name() const override{return "uncompress";} String *val_str(String *) override ZLIB_DEPENDED_FUNCTION - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1835,7 +1835,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1858,7 +1858,7 @@ public: String *val_str(String *) override; void print(String *str, enum_query_type query_type) override; enum Functype functype() const override { return DYNCOL_FUNC; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1872,7 +1872,7 @@ public: const char *func_name() const override{ return "column_add"; } String *val_str(String *) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1890,7 +1890,7 @@ public: decimals= 0; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1932,7 +1932,7 @@ public: bool get_dyn_value(THD *thd, DYNAMIC_COLUMN_VALUE *val, String *tmp); bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1946,7 +1946,7 @@ public: { maybe_null= 1; max_length= MAX_BLOB_WIDTH; return FALSE; }; const char *func_name() const override{ return "column_list"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1967,7 +1967,7 @@ public: enum Functype functype() const override { return TEMPTABLE_ROWID; } const char *func_name() const override { return ""; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #ifdef WITH_WSREP @@ -1987,7 +1987,7 @@ public: maybe_null= true; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2004,7 +2004,7 @@ public: maybe_null= true; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2017,7 +2017,7 @@ public: const Type_handler *type_handler() const override { return &type_handler_string; } const char *func_name() const override { return "wsrep_sync_wait_upto_gtid"; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; #endif /* WITH_WSREP */ diff --git a/sql/item_subselect.h b/sql/item_subselect.h index f976d905951..e971a57d850 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -281,8 +281,8 @@ public: void register_as_with_rec_ref(With_element *with_elem); void init_expr_cache_tracker(THD *thd); - Item* build_clone(THD *thd) override { return 0; } - Item* get_copy(THD *thd) override { return 0; } + Item* do_build_clone(THD *thd) const override { return nullptr; } + Item *do_get_copy(THD *thd) const override { return 0; } st_select_lex *wrap_tvc_into_select(THD *thd, st_select_lex *tvc_sl); diff --git a/sql/item_sum.h b/sql/item_sum.h index d46c0561c91..d7feb622aa8 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -855,7 +855,7 @@ public: } Item *copy_or_same(THD* thd) override; void remove() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool supports_removal() const override @@ -927,7 +927,7 @@ public: return has_with_distinct() ? "count(distinct " : "count("; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool supports_removal() const override @@ -983,7 +983,7 @@ public: count= 0; Item_sum_sum::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool supports_removal() const override @@ -1068,7 +1068,7 @@ public: m_stddev= Stddev(); Item_sum_double::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1090,7 +1090,7 @@ class Item_sum_std final :public Item_sum_variance const char *func_name() const override final { return sample ? "stddev_samp(" : "std("; } Item *copy_or_same(THD* thd) override final; - Item *get_copy(THD *thd) override final + Item *do_get_copy(THD *thd) const override final { return get_item_copy(thd, this); } }; @@ -1187,7 +1187,7 @@ public: bool add() override; const char *func_name() const override { return "min("; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1202,7 +1202,7 @@ public: bool add() override; const char *func_name() const override { return "max("; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1289,7 +1289,7 @@ public: bool add() override; const char *func_name() const override { return "bit_or("; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -1306,7 +1306,7 @@ public: bool add() override; const char *func_name() const override { return "bit_and("; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -1321,7 +1321,7 @@ public: bool add() override; const char *func_name() const override { return "bit_xor("; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -1465,7 +1465,7 @@ public: { return sp_result_field; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } Item *copy_or_same(THD *thd) override; }; @@ -1528,8 +1528,9 @@ public: my_decimal *val_decimal(my_decimal *dec) override { return val_decimal_from_real(dec); } String *val_str(String *str) override { return val_string_from_real(str); } double val_real() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1557,8 +1558,9 @@ public: return VDec(this).to_string_round(str, decimals); } my_decimal *val_decimal(my_decimal *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1578,8 +1580,9 @@ public: { return val_decimal_from_real(dec_buf); } bool is_null() override { update_null_value(); return null_value; } const Type_handler *type_handler() const override { return &type_handler_double; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1591,8 +1594,9 @@ public: { } enum Type type() const override { return FIELD_STD_ITEM; } double val_real() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + Item *do_build_clone(THD *thd) const override { return get_copy(thd); } }; @@ -1684,7 +1688,7 @@ class Item_sum_udf_float :public Item_udf_sum const Type_handler *type_handler() const override { return &type_handler_double; } bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1711,7 +1715,7 @@ public: } bool fix_length_and_dec() override { decimals=0; max_length=21; return FALSE; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1752,7 +1756,7 @@ public: const Type_handler *type_handler() const override { return string_type_handler(); } bool fix_length_and_dec() override; Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1782,7 +1786,7 @@ public: const Type_handler *type_handler() const override { return &type_handler_newdecimal; } bool fix_length_and_dec() override { fix_num_length_and_dec(); return FALSE; } Item *copy_or_same(THD* thd) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -2037,7 +2041,7 @@ public: void print(String *str, enum_query_type query_type) override; bool change_context_processor(void *cntx) override { context= (Name_resolution_context *)cntx; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } qsort_cmp2 get_comparator_function_for_distinct(); qsort_cmp2 get_comparator_function_for_order_by(); diff --git a/sql/item_timefunc.h b/sql/item_timefunc.h index 6ef2d02238e..443648b9a1b 100644 --- a/sql/item_timefunc.h +++ b/sql/item_timefunc.h @@ -63,7 +63,7 @@ public: max_length=6*MY_CHARSET_BIN_MB_MAXLEN; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -82,7 +82,7 @@ public: max_length=6*MY_CHARSET_BIN_MB_MAXLEN; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -108,7 +108,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -137,7 +137,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -161,7 +161,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -186,7 +186,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -208,7 +208,7 @@ public: { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -232,7 +232,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -256,7 +256,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -280,7 +280,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -304,7 +304,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -328,7 +328,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -362,7 +362,7 @@ public: { return arg_count == 2; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -391,7 +391,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -417,7 +417,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -450,7 +450,7 @@ public: { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -472,7 +472,7 @@ class Item_func_dayname :public Item_str_func { return !has_date_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -537,7 +537,7 @@ public: } longlong int_op() override; my_decimal *decimal_op(my_decimal* buf) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -561,7 +561,7 @@ public: } longlong int_op() override; my_decimal *decimal_op(my_decimal* buf) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -653,7 +653,7 @@ public: Item_func_curtime_local(THD *thd, uint dec): Item_func_curtime(thd, dec) {} const char *func_name() const override { return "curtime"; } void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -664,7 +664,7 @@ public: Item_func_curtime_utc(THD *thd, uint dec): Item_func_curtime(thd, dec) {} const char *func_name() const override { return "utc_time"; } void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -692,7 +692,7 @@ public: Item_func_curdate_local(THD *thd): Item_func_curdate(thd) {} const char *func_name() const override { return "curdate"; } void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -703,7 +703,7 @@ public: Item_func_curdate_utc(THD *thd): Item_func_curdate(thd) {} const char *func_name() const override { return "utc_date"; } void store_now_in_TIME(THD* thd, MYSQL_TIME *now_time) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -742,7 +742,7 @@ public: int save_in_field(Field *field, bool no_conversions) override; void store_now_in_TIME(THD *thd, MYSQL_TIME *now_time) override; enum Functype functype() const override { return NOW_FUNC; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -759,7 +759,7 @@ public: return mark_unsupported_function(func_name(), "()", arg, VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -783,7 +783,7 @@ public: VCOL_TIME_FUNC | VCOL_NON_DETERMINISTIC); } enum Functype functype() const override { return SYSDATE_FUNC; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -802,7 +802,7 @@ public: { return has_date_args() || has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -835,7 +835,7 @@ public: return false; return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -846,7 +846,7 @@ public: Item_func_date_format(thd, a, b) { is_time_format= true; } const char *func_name() const override { return "time_format"; } bool check_vcol_func_processor(void *arg) override { return false; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -865,7 +865,7 @@ class Item_func_from_unixtime :public Item_datetimefunc { return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -911,7 +911,7 @@ class Item_func_convert_tz :public Item_datetimefunc } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; void cleanup() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -930,7 +930,7 @@ public: return FALSE; } const char *func_name() const override { return "sec_to_time"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -950,7 +950,7 @@ public: void print(String *str, enum_query_type query_type) override; enum precedence precedence() const override { return INTERVAL_PRECEDENCE; } bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1058,7 +1058,7 @@ class Item_extract :public Item_int_func, } return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1101,7 +1101,7 @@ public: } void print(String *str, enum_query_type query_type) override; bool need_parentheses_in_default() override { return true; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1138,7 +1138,7 @@ public: { return args[0]->type_handler()->Item_date_typecast_fix_length_and_dec(this); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1160,7 +1160,7 @@ public: Item_time_typecast_fix_length_and_dec(this); } Sql_mode_dependency value_depends_on_sql_mode() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1182,7 +1182,7 @@ public: Item_datetime_typecast_fix_length_and_dec(this); } Sql_mode_dependency value_depends_on_sql_mode() const override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1196,7 +1196,7 @@ public: Item_datefunc(thd, a, b) {} const char *func_name() const override { return "makedate"; } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1233,7 +1233,7 @@ public: return (null_value= Sec6_add(dt.get_mysql_time(), it.get_mysql_time(), 1). to_datetime(ltime)); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1260,7 +1260,7 @@ public: { } bool fix_length_and_dec() override; const char *func_name() const override { return sign > 0 ? "addtime" : "subtime"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1282,7 +1282,7 @@ public: return FALSE; } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1305,7 +1305,7 @@ public: } const char *func_name() const override { return "maketime"; } bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1329,7 +1329,7 @@ public: { return !has_time_args(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1354,7 +1354,7 @@ public: return FALSE; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1381,7 +1381,7 @@ public: return FALSE; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1401,7 +1401,7 @@ public: timestamp_type); const char *func_name() const override { return "str_to_date"; } bool fix_length_and_dec() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -1414,7 +1414,7 @@ public: Item_func_last_day(THD *thd, Item *a): Item_datefunc(thd, a) {} const char *func_name() const override { return "last_day"; } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_vers.h b/sql/item_vers.h index cff0133ffb3..0ea791f0422 100644 --- a/sql/item_vers.h +++ b/sql/item_vers.h @@ -48,7 +48,7 @@ public: } const char* func_name() const override { return "is_history"; } void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -66,7 +66,7 @@ public: return "trt_commit_ts"; } bool get_date(THD *thd, MYSQL_TIME *res, date_mode_t fuzzydate) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } bool fix_length_and_dec() override { fix_attributes_datetime(decimals); return FALSE; } @@ -108,7 +108,7 @@ public: } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -124,7 +124,7 @@ public: return "trt_trx_sees"; } longlong val_int() override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h index 336ff037fad..4d213582c8b 100644 --- a/sql/item_windowfunc.h +++ b/sql/item_windowfunc.h @@ -148,7 +148,7 @@ public: return "row_number"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -221,7 +221,7 @@ public: } Item_sum_int::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -292,7 +292,7 @@ class Item_sum_dense_rank: public Item_sum_int } Item_sum_int::cleanup(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -355,7 +355,7 @@ class Item_sum_first_value : public Item_sum_hybrid_simple return "first_value"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -381,7 +381,7 @@ class Item_sum_last_value : public Item_sum_hybrid_simple return "last_value"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -401,7 +401,7 @@ class Item_sum_nth_value : public Item_sum_hybrid_simple return "nth_value"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -421,7 +421,7 @@ class Item_sum_lead : public Item_sum_hybrid_simple return "lead"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -441,7 +441,7 @@ class Item_sum_lag : public Item_sum_hybrid_simple return "lag"; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -554,7 +554,7 @@ class Item_sum_percent_rank: public Item_sum_double, Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -640,7 +640,7 @@ class Item_sum_cume_dist: public Item_sum_double, Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -715,7 +715,7 @@ class Item_sum_ntile : public Item_sum_int, Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } private: @@ -878,7 +878,7 @@ public: Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void setup_window_func(THD *thd, Window_spec *window_spec) override; void setup_hybrid(THD *thd, Item *item); @@ -1014,7 +1014,7 @@ public: Partition_row_count::set_partition_row_count(count); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } void setup_window_func(THD *thd, Window_spec *window_spec) override; void setup_hybrid(THD *thd, Item *item); @@ -1365,7 +1365,7 @@ public: void print(String *str, enum_query_type query_type) override; - Item *get_copy(THD *thd) override { return 0; } + Item *do_get_copy(THD *thd) const override { return 0; } }; diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 78429e2fe5a..8a270b5d1aa 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -215,7 +215,7 @@ public: Item_nodeset_func(thd, pxml) {} const char *func_name() const override { return "xpath_rootelement"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -228,7 +228,7 @@ public: Item_nodeset_func(thd, a, b, pxml) {} const char *func_name() const override { return "xpath_union"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -262,7 +262,7 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const override { return "xpath_selfbyname"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -276,7 +276,7 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const override { return "xpath_childbyname"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -292,7 +292,7 @@ public: need_self(need_self_arg) {} const char *func_name() const override { return "xpath_descendantbyname"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -308,7 +308,7 @@ public: need_self(need_self_arg) {} const char *func_name() const override { return "xpath_ancestorbyname"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -322,7 +322,7 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const override { return "xpath_parentbyname"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -336,7 +336,7 @@ public: Item_nodeset_func_axisbyname(thd, a, n_arg, l_arg, pxml) {} const char *func_name() const override { return "xpath_attributebyname"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -353,7 +353,7 @@ public: Item_nodeset_func(thd, a, b, pxml) {} const char *func_name() const override { return "xpath_predicate"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -366,7 +366,7 @@ public: Item_nodeset_func(thd, a, b, pxml) { } const char *func_name() const override { return "xpath_elementbyindex"; } bool val_native(THD *thd, Native *nodeset) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -394,7 +394,7 @@ public: } return args[0]->val_real() ? 1 : 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -408,7 +408,7 @@ public: Item_xpath_cast_number(THD *thd, Item *a): Item_real_func(thd, a) {} const char *func_name() const override { return "xpath_cast_number"; } double val_real() override { return args[0]->val_real(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -427,7 +427,7 @@ public: return nodeset->copy(*native_cache); } bool fix_length_and_dec() override { max_length= MAX_BLOB_WIDTH;; return FALSE; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -448,7 +448,7 @@ public: return tmp_native_value.element(0).pos + 1; return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -471,7 +471,7 @@ public: return predicate_supplied_context_size; return tmp_native_value.elements(); } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -516,7 +516,7 @@ public: } return sum; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -598,7 +598,7 @@ public: } return 0; } - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/item_xmlfunc.h b/sql/item_xmlfunc.h index 992d09b9c74..dc52395321d 100644 --- a/sql/item_xmlfunc.h +++ b/sql/item_xmlfunc.h @@ -133,7 +133,7 @@ public: Item_xml_str_func(thd, a, b) {} const char *func_name() const override { return "extractvalue"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; @@ -150,7 +150,7 @@ public: Item_xml_str_func(thd, a, b, c) {} const char *func_name() const override { return "updatexml"; } String *val_str(String *) override; - Item *get_copy(THD *thd) override + Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } }; diff --git a/sql/procedure.h b/sql/procedure.h index 3a390c62ae1..2153a70c6d0 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -70,7 +70,7 @@ public: { return type_handler()->Item_get_date_with_warn(thd, this, ltime, fuzzydate); } - Item* get_copy(THD *thd) override { return 0; } + Item* do_get_copy(THD *thd) const override { return 0; } }; class Item_proc_real :public Item_proc @@ -123,6 +123,8 @@ public: String *val_str(String *s) override { s->set(value, default_charset()); return s; } my_decimal *val_decimal(my_decimal *) override; unsigned int size_of() { return sizeof(*this);} + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; @@ -156,6 +158,8 @@ public: } my_decimal *val_decimal(my_decimal *) override; unsigned int size_of() { return sizeof(*this);} + Item *do_get_copy(THD *thd) const override { return nullptr; } + Item *do_build_clone(THD *thd) const override { return nullptr; } }; /* The procedure class definitions */ diff --git a/sql/sql_list.h b/sql/sql_list.h index a9ab5415d5a..277d5bc3808 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -537,10 +537,9 @@ public: class Iterator; using value_type= T; using iterator= Iterator; - using const_iterator= const Iterator; - Iterator begin() const { return Iterator(first); } - Iterator end() const { return Iterator(); } + iterator begin() const { return iterator(first); } + iterator end() const { return iterator(); } class Iterator { @@ -561,7 +560,7 @@ public: return *this; } - T operator++(int) + Iterator operator++(int) { Iterator tmp(*this); operator++(); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index b86ffed8619..92f0a8fa578 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -16632,7 +16632,7 @@ change_cond_ref_to_const(THD *thd, I_List *save_list, if (can_change_cond_ref_to_const(func, right_item, left_item, field_value_owner, field, value)) { - Item *tmp=value->clone_item(thd); + Item *tmp=value->clone_const_item(thd); if (tmp) { tmp->collation.set(right_item->collation); @@ -16662,7 +16662,7 @@ change_cond_ref_to_const(THD *thd, I_List *save_list, else if (can_change_cond_ref_to_const(func, left_item, right_item, field_value_owner, field, value)) { - Item *tmp= value->clone_item(thd); + Item *tmp= value->clone_const_item(thd); if (tmp) { tmp->collation.set(left_item->collation); diff --git a/sql/sql_string.h b/sql/sql_string.h index 0475b2d1f6e..c618990e84e 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -577,7 +577,7 @@ public: LEX_CSTRING tmp= {Ptr, str_length}; return tmp; } - inline LEX_CSTRING *get_value(LEX_CSTRING *res) + inline LEX_CSTRING *get_value(LEX_CSTRING *res) const { res->str= Ptr; res->length= str_length; From 6264950c4fef27c08e4b9fe63cddf4ab136636e8 Mon Sep 17 00:00:00 2001 From: Anel Husakovic Date: Wed, 6 Mar 2024 14:55:44 +0100 Subject: [PATCH 22/60] Small cleanup of replication code (log.cc) - Remove single/trivial call of function MYSQL_BIN_LOG::init() and remove function - Remove single jump to label end2 and use code instead - Remove label end2 --- sql/log.cc | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index 425ec9421d4..21187d5b835 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3574,16 +3574,6 @@ void MYSQL_BIN_LOG::cleanup() } -/* Init binlog-specific vars */ -void MYSQL_BIN_LOG::init(ulong max_size_arg) -{ - DBUG_ENTER("MYSQL_BIN_LOG::init"); - max_size= max_size_arg; - DBUG_PRINT("info",("max_size: %lu", max_size)); - DBUG_VOID_RETURN; -} - - void MYSQL_BIN_LOG::init_pthread_objects() { MYSQL_LOG::init_pthread_objects(); @@ -3775,7 +3765,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, DBUG_RETURN(1); /* all warnings issued */ } - init(max_size_arg); + max_size= max_size_arg; open_count++; @@ -5409,10 +5399,8 @@ int MYSQL_BIN_LOG::new_file_impl() */ if (unlikely((error= generate_new_name(new_name, name, 0)))) { -#ifdef ENABLE_AND_FIX_HANG - close_on_error= TRUE; -#endif - goto end2; + mysql_mutex_unlock(&LOCK_index); + DBUG_RETURN(error); } new_name_ptr=new_name; @@ -5520,7 +5508,6 @@ end: last_used_log_number--; } -end2: if (delay_close) { clear_inuse_flag_when_closing(old_file); From cf1c381bb899186c936614d93faa31d85e917499 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Fri, 5 Jul 2024 14:26:13 +1000 Subject: [PATCH 23/60] MDEV-34099: AddressSanitizer running out of memory regardless of stack_thread size Address Sanitizer's know how to detect stack overrun, so there's no point in us doing it. As evidenced by perfschema tests where signficant test failures because this function failed under ASAN (MDEV-33210). Also, so since clang-16, we cannot assume much about how local variables are allocated on the stack (MDEV-31605). Disabling check idea thanks to Sanja. --- sql/sql_parse.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index e0180b035d4..8a218290114 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7614,6 +7614,7 @@ __attribute__((optimize("-O0"))) #endif check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused))) { +#ifndef __SANITIZE_ADDRESS__ long stack_used; DBUG_ASSERT(thd == current_thd); if ((stack_used= available_stack_size(thd->thread_stack, &stack_used)) >= @@ -7636,6 +7637,7 @@ check_stack_overrun(THD *thd, long margin, uchar *buf __attribute__((unused))) #ifndef DBUG_OFF max_stack_used= MY_MAX(max_stack_used, stack_used); #endif +#endif /* __SANITIZE_ADDRESS__ */ return 0; } From 3a38a7a4acaaf4984eb538c59ac9c332bd468a42 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Mon, 15 Jul 2024 19:11:39 +0200 Subject: [PATCH 24/60] New wolfssl v5.7.2-stable --- extra/wolfssl/wolfssl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl index 8970ff4c340..00e42151ca0 160000 --- a/extra/wolfssl/wolfssl +++ b/extra/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit 8970ff4c34034dbb3594943d11f8c9d4c5512bd5 +Subproject commit 00e42151ca061463ba6a95adb2290f678cbca472 From 26192a4665f12e88f55858364b2c7ec372c280f0 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 16 Jul 2024 09:30:20 +0200 Subject: [PATCH 25/60] MDEV-33265 mariadb-secure-installation fails with --defaults-group-suffix Reason for the error is that --defaults-group-suffix is passed twice to the command line client, and option parser is not prepared for this. Double occurence of comes from 2 invocations of parse_arguments(), which appends unparsed arguments each time it is called. Fixed by treating --defaults-group-suffix like other "--defaults-" (--defaults-file/--defaults-extra-file). it will be parsed, and thus passed only once to the command line client. --- scripts/mysql_secure_installation.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index b2a9edf4953..7a0611070cc 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -27,6 +27,7 @@ echo_c= basedir= defaults_file= defaults_extra_file= +defaults_group_suffix= no_defaults= parse_arg() @@ -52,6 +53,7 @@ parse_arguments() --basedir=*) basedir=`parse_arg "$arg"` ;; --defaults-file=*) defaults_file="$arg" ;; --defaults-extra-file=*) defaults_extra_file="$arg" ;; + --defaults-group-suffix=*) defaults_group_suffix="$arg" ;; --no-defaults) no_defaults="$arg" ;; *) if test -n "$pick_args" @@ -184,7 +186,7 @@ fi # Now we can get arguments from the group [client] and [client-server] # in the my.cfg file, then re-run to merge with command line arguments. -parse_arguments `$print_defaults $defaults_file $defaults_extra_file $no_defaults client client-server client-mariadb` +parse_arguments `$print_defaults $defaults_file $defaults_extra_file $defaults_group_suffix $no_defaults client client-server client-mariadb` parse_arguments PICK-ARGS-FROM-ARGV "$@" set_echo_compat() { From 653050ac8495180bd18599756fc652471c155cfe Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 1 Jul 2024 17:41:23 +0800 Subject: [PATCH 26/60] MDEV-32492 MDEV-29676 Spider: some code documentation and cleanup Some documentations come from commit for MDEV-29676, and the rest are mainly related to SPIDER_TRX_HA. Removed SPIDER_TRX_HA::trx as it is unused. --- storage/spider/ha_spider.h | 4 +++- storage/spider/spd_conn.cc | 31 ++++++++++++++++++++++++++ storage/spider/spd_include.h | 43 ++++++++++++++++++++++++++++++++---- storage/spider/spd_trx.cc | 8 ++++++- 4 files changed, 80 insertions(+), 6 deletions(-) diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index 54e14760bcf..cfd51d7280d 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -67,8 +67,10 @@ public: char *conn_keys_first_ptr; char **conn_keys; SPIDER_CONN **conns; - /* for active-standby mode */ + /* array of indexes of active servers */ uint *conn_link_idx; + /* A bitmap indicating whether each active server have some higher + numbered server in the same "group" left to try (can fail over) */ uchar *conn_can_fo; void **quick_targets; int *need_mons; diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index 1ac0c8f9b73..453e0aaf709 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -3958,6 +3958,24 @@ void *spider_bg_mon_action( } #endif +/** + Returns a random (active) server with a maximum required link status + + Calculate the sum of balances of all servers whose link status is at + most the specified status ("eligible"), generate a random number + less than this balance, then find the first server cumulatively + exceeding this balance + + @param thd Connection used for generating a random number + @param link_statuses The link statuses of servers + @param access_balances The access balances of servers + @param conn_link_idx Array of indexes to servers + @param link_count Number of servers + @param link_status The maximum required link status + @retval Index to the found server + @retval -1 if no eligible servers + @retval -2 if out of memory +*/ int spider_conn_first_link_idx( THD *thd, long *link_statuses, @@ -4053,6 +4071,17 @@ int spider_conn_next_link_idx( DBUG_RETURN(tmp_link_idx); } +/** + Finds the next active server with a maximum required link status + + @param link_statuses The statuses of servers + @param conn_link_idx The array of active servers + @param link_idx The index of the current active server + @param link_count The number of active servers + @param link_status The required maximum link status + @return The next active server whose link status is + at most the required one. +*/ int spider_conn_link_idx_next( long *link_statuses, uint *conn_link_idx, @@ -4065,6 +4094,8 @@ int spider_conn_link_idx_next( link_idx++; if (link_idx >= link_count) break; + /* Asserts that the `link_idx`th active server is in the correct + "group" */ DBUG_ASSERT((conn_link_idx[link_idx] - link_idx) % link_count == 0); } while (link_statuses[conn_link_idx[link_idx]] > link_status); DBUG_PRINT("info",("spider link_idx=%d", link_idx)); diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h index 09482b276e8..6b9e2998144 100644 --- a/storage/spider/spd_include.h +++ b/storage/spider/spd_include.h @@ -1023,15 +1023,24 @@ typedef struct st_spider_share char *table_name; uint table_name_length; uint use_count; + /** + Probably equals `active_link_count`. See also commit ddff602 of + https://github.com/nayuta-yanagisawa/spider-history + + FIXME: consider removing it and using `active_link_count` instead. + */ uint link_count; + /* Number of all links, i.e. all remote servers for the spider + table. */ uint all_link_count; + /* + The bitmap size of ha_spider::conn_can_fo, where the ha_spider + is the one `this' associates with (i.e. spider->share == this) + */ uint link_bitmap_size; pthread_mutex_t mutex; pthread_mutex_t sts_mutex; pthread_mutex_t crd_mutex; -/* - pthread_mutex_t auto_increment_mutex; -*/ TABLE_SHARE *table_share; SPIDER_LGTM_TBLHND_SHARE *lgtm_tblhnd_share; #ifdef SPIDER_HAS_HASH_VALUE_TYPE @@ -1574,16 +1583,42 @@ public: ulong sort; }; +/* + A SPIDER_TRX_HA contains the HA information of a spider table or + partition. + + Each SPIDER_TRX_HA is stored in a hash belonging to a SPIDER_TRX + i.e. its trx_ha_hash field. + + It thus may have a different lifespan from the ha_spider or + SPIDER_SHARE associated with the same spider table/partition. +*/ typedef struct st_spider_trx_ha { + /* + A fully qualified table name, used as the key in + SPIDER_TRX::trx_ha_hash + */ char *table_name; uint table_name_length; - SPIDER_TRX *trx; + /* + The associated SPIDER_SHARE. Will be used to check against a + given SPIDER_SHARE + */ SPIDER_SHARE *share; + /* + link_count and link_bitmap_size are read from and checked against + the corresponding fields of the associated SPIDER_SHARE. + */ uint link_count; uint link_bitmap_size; + /* + conn_link_idx and conn_can_fo are read from and written to the + corresponding fields of the associated ha_spider. + */ uint *conn_link_idx; uchar *conn_can_fo; + /* TODO: document */ bool wait_for_reusing; } SPIDER_TRX_HA; diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc index 65bd6fc2120..56b22abdbf5 100644 --- a/storage/spider/spd_trx.cc +++ b/storage/spider/spd_trx.cc @@ -3767,6 +3767,13 @@ void spider_free_tmp_thd( DBUG_VOID_RETURN; } +/* + Check the info of a given SPIDER_TRX_HA with spider->share. If it + does not match or if the given SPIDER_TRX_HA is NULL, then create a + new one from spider and spider->share, and add the new SPIDER_TRX_HA + to trx->trx_ha_hash. On mismatch and non-NULL trx_ha, then it will + be removed from the hash and freed before the creation of a new one. +*/ int spider_create_trx_ha( SPIDER_TRX *trx, ha_spider *spider, @@ -3817,7 +3824,6 @@ int spider_create_trx_ha( memcpy(trx_ha->table_name, share->table_name, share->table_name_length); trx_ha->table_name[share->table_name_length] = '\0'; trx_ha->table_name_length = share->table_name_length; - trx_ha->trx = trx; trx_ha->share = share; trx_ha->link_count = share->link_count; trx_ha->link_bitmap_size = share->link_bitmap_size; From 14c40509923c156cab5ee7ebc457a943b485f03f Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 11 Jul 2024 13:48:48 +0800 Subject: [PATCH 27/60] MDEV-32492 Delete and remove trx_ha on spider share mismatch A SPIDER_TRX_HA associated with a SPIDER_TRX could have longer lifetime than its associated SPIDER_SHARE. And it is identified with the associated table name. When the SPIDER_SHARE no longer valid, e.g. when the associated spider table has been dropped and recreated, the SPIDER_TRX_HA should be reset too. Since spider could create a new SPIDER_SHARE with the exact same address of a freed SPIDER_SHARE, we try to mark all SPIDER_TRX_HAs associated with a SPIDER_SHARE invalid when the SPIDER_SHARE is about to be freed. --- storage/spider/ha_spider.cc | 20 ++++++ .../spider/bugfix/r/mdev_32492.result | 67 +++++++++++++++++++ .../spider/bugfix/t/mdev_32492.test | 62 +++++++++++++++++ storage/spider/spd_trx.cc | 25 +++++-- 4 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 485b98eec84..d3ffe43ca52 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -584,6 +584,25 @@ error_wide_handler_alloc: DBUG_RETURN(error_num); } +/* + Given a SPIDER_SHARE that will be freed, update all SPIDER_TRX_HAs + of spider_current_trx to point to a NULL share, which will cause the + removal of the SPIDER_TRX_HA in spider_check_trx_ha(). +*/ +static void spider_update_current_trx_ha_with_freed_share(SPIDER_SHARE *share) +{ + SPIDER_TRX *trx= spider_current_trx; + if (trx) + { + for (uint i = 0; i < trx->trx_ha_hash.records; i++) + { + SPIDER_TRX_HA *trx_ha = (SPIDER_TRX_HA *) my_hash_element(&trx->trx_ha_hash, i); + if (trx_ha->share == share) + trx_ha->share= NULL; + } + } +} + int ha_spider::close() { int error_num = 0, roop_count, error_num2; @@ -711,6 +730,7 @@ int ha_spider::close() result_list.tmp_sqls = NULL; } + spider_update_current_trx_ha_with_freed_share(share); spider_free_share(share); is_clone = FALSE; pt_clone_source_handler = NULL; diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result new file mode 100644 index 00000000000..6cf0e4ad0a8 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_32492.result @@ -0,0 +1,67 @@ +# +# MDEV-32492 SIGSEGV in spider_conn_first_link_idx on DELETE +# +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t (c INT, PRIMARY KEY(c)) ENGINE=Spider; +SHOW CREATE TABLE t; +Table Create Table +t CREATE TABLE `t` ( + `c` int(11) NOT NULL, + PRIMARY KEY (`c`) +) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +DROP TABLE t; +CREATE TABLE t (c INT) ENGINE=Spider COMMENT='port "1 1"'; +DELETE FROM t; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +CREATE TABLE t1 (a INT,b VARCHAR(255),PRIMARY KEY(a)) ENGINE=Spider comment="srv 'srv', table 't1', read_only_mode '1'"; +INSERT INTO t1 VALUES (1,'aaa'),(2,'bbb'),(3,'ccc'),(4,'ddd'); +ERROR HY000: Table 'test.t1' is read only +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) NOT NULL, + `b` varchar(255) DEFAULT NULL, + PRIMARY KEY (`a`) +) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='srv ''srv'', table ''t1'', read_only_mode ''1''' +Warnings: +Error 12719 An infinite loop is detected when opening table test.t1 +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment="port '123 456'"; +INSERT IGNORE INTO t1 VALUES (42),(42); +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t1; +CREATE TABLE t1 (c INT, KEY(c)) ENGINE=Spider COMMENT='WRAPPER "mysql", SRV "srv",TABLE "t2", PK_NAME "f"'; +SET GLOBAL general_log=1; +INSERT INTO t1 VALUES (1, "aaa"),(2, "bbb"),(3, "ccc"),(4, "ddd"); +ERROR 21S01: Column count doesn't match value count at row 1 +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c` int(11) DEFAULT NULL, + KEY `c` (`c`) +) ENGINE=SPIDER DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci COMMENT='WRAPPER "mysql", SRV "srv",TABLE "t2", PK_NAME "f"' +Warnings: +Error 12702 Remote table 'test.t2' is not found +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment='port "123 456"'; +SELECT * FROM t1; +ERROR HY000: Unable to connect to foreign data source: localhost +INSERT IGNORE INTO t1 VALUES (42),(42); +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t1; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_32492 +# diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test new file mode 100644 index 00000000000..13fc4fe64f8 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_32492.test @@ -0,0 +1,62 @@ +--echo # +--echo # MDEV-32492 SIGSEGV in spider_conn_first_link_idx on DELETE +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +CREATE TABLE t (c INT, PRIMARY KEY(c)) ENGINE=Spider; +--disable_ps_protocol +SHOW CREATE TABLE t; +--enable_ps_protocol +DROP TABLE t; +CREATE TABLE t (c INT) ENGINE=Spider COMMENT='port "1 1"'; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +DELETE FROM t; +drop table t; + +CREATE TABLE t1 (a INT,b VARCHAR(255),PRIMARY KEY(a)) ENGINE=Spider comment="srv 'srv', table 't1', read_only_mode '1'"; +--error 12518 +INSERT INTO t1 VALUES (1,'aaa'),(2,'bbb'),(3,'ccc'),(4,'ddd'); +--disable_ps_protocol +SHOW CREATE TABLE t1; +--enable_ps_protocol +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment="port '123 456'"; +# bug crash site +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +INSERT IGNORE INTO t1 VALUES (42),(42); +drop table t1; + +CREATE TABLE t1 (c INT, KEY(c)) ENGINE=Spider COMMENT='WRAPPER "mysql", SRV "srv",TABLE "t2", PK_NAME "f"'; +SET GLOBAL general_log=1; +--error ER_WRONG_VALUE_COUNT_ON_ROW +INSERT INTO t1 VALUES (1, "aaa"),(2, "bbb"),(3, "ccc"),(4, "ddd"); +--disable_ps_protocol +SHOW CREATE TABLE t1; +--enable_ps_protocol +DROP TABLE t1; +CREATE TABLE t1 (a INT) ENGINE=Spider comment='port "123 456"'; +# bug crash site +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t1; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +INSERT IGNORE INTO t1 VALUES (42),(42); +drop table t1; + +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_32492 +--echo # diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc index 56b22abdbf5..a97f476c53d 100644 --- a/storage/spider/spd_trx.cc +++ b/storage/spider/spd_trx.cc @@ -1092,6 +1092,7 @@ int spider_free_trx_alloc( DBUG_RETURN(0); } +/* Get or create a trx associated with the given THD. */ SPIDER_TRX *spider_get_trx( THD *thd, bool regist_allocated_thds, @@ -3863,6 +3864,11 @@ SPIDER_TRX_HA *spider_check_trx_ha( SPIDER_TRX_HA *trx_ha; SPIDER_SHARE *share = spider->share; DBUG_ENTER("spider_check_trx_ha"); + /* + Check for mismatch in trx_ha->share, link_count and + link_bitmap_size, which is an indication of a share that has been + freed. Delete the trx_ha and return NULL on mismatch. + */ #ifdef SPIDER_HAS_HASH_VALUE_TYPE if ((trx_ha = (SPIDER_TRX_HA *) my_hash_search_using_hash_value( &trx->trx_ha_hash, share->table_name_hash_value, @@ -3872,11 +3878,20 @@ SPIDER_TRX_HA *spider_check_trx_ha( (uchar*) share->table_name, share->table_name_length))) #endif { - memcpy(spider->conn_link_idx, trx_ha->conn_link_idx, - sizeof(uint) * share->link_count); - memcpy(spider->conn_can_fo, trx_ha->conn_can_fo, - sizeof(uint) * share->link_bitmap_size); - DBUG_RETURN(trx_ha); + if (trx_ha->share == share && trx_ha->link_count == share->link_count && + trx_ha->link_bitmap_size == share->link_bitmap_size) + { + memcpy(spider->conn_link_idx, trx_ha->conn_link_idx, + sizeof(uint) * share->link_count); + memcpy(spider->conn_can_fo, trx_ha->conn_can_fo, + sizeof(uint) * share->link_bitmap_size); + DBUG_RETURN(trx_ha); + } + else + { + my_hash_delete(&trx->trx_ha_hash, (uchar*) trx_ha); + spider_free(trx, trx_ha, MYF(0)); + } } DBUG_RETURN(NULL); } From 85a36958e35bc2d30edefc93638c1f7c62c69b40 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 8 Jul 2024 16:07:53 +0800 Subject: [PATCH 28/60] MDEV-27902 Some Spider code documentation regarding first_link_idx and remote HANDLER commands --- storage/spider/ha_spider.cc | 19 +++++++++++++++++++ storage/spider/ha_spider.h | 6 ++++++ storage/spider/spd_db_include.h | 1 + storage/spider/spd_trx.cc | 9 +++++++++ 4 files changed, 35 insertions(+) diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index d3ffe43ca52..3e90ae827a6 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -12918,6 +12918,15 @@ void ha_spider::sync_from_clone_source_base( DBUG_VOID_RETURN; } +/* + Set the initial values for each dbton_handler's first_link_idx and + strict_group_by. + + First, reset first_link_idx to -1. + Then, for each active remote server, if the corresponding + dbton_handler has not been set yet (first_link_idx == -1), set its + first_link_idx to be the index of the connection. +*/ void ha_spider::set_first_link_idx() { int roop_count, all_link_idx; @@ -12957,6 +12966,16 @@ void ha_spider::set_first_link_idx() DBUG_VOID_RETURN; } +/* + Reset the initial values for each dbton_handler's first_link_idx to + -1. + + Also, set the search_link_idx'th active server's first_link_idx to + search_link_idx. + + search_link_idx is commonly randomly set using + spider_conn_first_link_idx - see the commentary of that function. +*/ void ha_spider::reset_first_link_idx() { int all_link_idx; diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h index cfd51d7280d..1bde115de6c 100644 --- a/storage/spider/ha_spider.h +++ b/storage/spider/ha_spider.h @@ -167,7 +167,13 @@ public: ulonglong *db_request_id; uchar *db_request_phase; uchar *m_handler_opened; + /* ids for use in HANDLER command */ uint *m_handler_id; + /* + aliases for use in HANDLER command, in the format of t%5u on + m_handler_id. So for example, if m_handler_id is 3, then the + corresponding m_handler_cid is t00003 + */ char **m_handler_cid; #ifdef HANDLER_HAS_DIRECT_UPDATE_ROWS bool do_direct_update; diff --git a/storage/spider/spd_db_include.h b/storage/spider/spd_db_include.h index 0632a816995..32cefbaa258 100644 --- a/storage/spider/spd_db_include.h +++ b/storage/spider/spd_db_include.h @@ -1135,6 +1135,7 @@ public: uint dbton_id; ha_spider *spider; spider_db_share *db_share; + /* Index of active server, used in query construction. */ int first_link_idx; bool strict_group_by= false; bool no_where_cond= false; diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc index a97f476c53d..dabec76f4dd 100644 --- a/storage/spider/spd_trx.cc +++ b/storage/spider/spd_trx.cc @@ -3933,6 +3933,15 @@ void spider_reuse_trx_ha( DBUG_VOID_RETURN; } +/** + Sets link indices for load balancing read connections + + Assuming `spider->share->link_count` is the number of active servers + to use, this function updates `spider->conn_link_idx` with the first + server in the same "modulus group" whose link status is not + `SPIDER_LINK_STATUS_NG`, or if one cannot be found, use the + `link_idx`th server +*/ void spider_trx_set_link_idx_for_all( ha_spider *spider ) { From 696c2497fccc320b1f306758cdf6b24c97669509 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 8 Jul 2024 16:22:50 +0800 Subject: [PATCH 29/60] MDEV-27902 Spider check trx and get conn in rnd_next() This allows creation of SPIDER_CONN on demand, if the previous one was freed. Also, the first_link_idx's are reset during spider_check_trx_and_get_conn(), which in the case of remote HANDLER commands, might not match the link to use correct first_link_idx for remote HANDLER statement that was later set in ha_spider::rnd_handler_init() (causing testing regressions in the spider/handler suite). Therefore we fix the first_link_idx there. --- storage/spider/ha_spider.cc | 5 ++ .../spider/bugfix/r/mdev_27902.result | 55 ++++++++++++++++++ .../spider/bugfix/t/mdev_27902.test | 56 +++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index 3e90ae827a6..b578226ae3d 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -7182,6 +7182,8 @@ int ha_spider::rnd_next( DBUG_RETURN(error_num); use_pre_call = FALSE; } + if ((error_num= spider_check_trx_and_get_conn(ha_thd(), this, FALSE))) + DBUG_RETURN(error_num); DBUG_RETURN(rnd_next_internal(buf)); } @@ -12553,6 +12555,9 @@ int ha_spider::rnd_handler_init() DBUG_RETURN(error_num); } set_handler_opened(roop_count); + spider_db_handler *dbton_hdl= + dbton_handler[share->sql_dbton_ids[conn_link_idx[roop_count]]]; + dbton_hdl->first_link_idx= roop_count; } } if (sql_kinds & SPIDER_SQL_KIND_HANDLER) diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result new file mode 100644 index 00000000000..9b051274363 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_27902.result @@ -0,0 +1,55 @@ +# +# MDEV-27902 Crashes, asserts, hangs and corruptions in Spider when using HANDLER +# +for master_1 +for child2 +for child3 +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +HANDLER t READ next; +ERROR HY000: Unable to connect to foreign data source: localhost +dummy; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'dummy' at line 1 +HANDLER t READ next; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +HANDLER t READ FIRST; +ERROR HY000: Unable to connect to foreign data source: localhost +HANDLER t READ NEXT; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +Warnings: +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +Error 1429 Unable to connect to foreign data source: localhost +HANDLER t READ NEXT; +ERROR HY000: Unable to connect to foreign data source: localhost +SELECT * FROM t; +ERROR HY000: Unable to connect to foreign data source: localhost +HANDLER t READ NEXT; +ERROR HY000: Unable to connect to foreign data source: localhost +drop table t; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_27902 +# diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test new file mode 100644 index 00000000000..2b46250ec33 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_27902.test @@ -0,0 +1,56 @@ +--echo # +--echo # MDEV-27902 Crashes, asserts, hangs and corruptions in Spider when using HANDLER +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +# original case +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ next; +--error ER_PARSE_ERROR +dummy; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ next; + +drop table t; + +# case by nayuta +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ FIRST; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ NEXT; + +drop table t; + +# Another case by Roel +CREATE TABLE t (c INT) ENGINE=Spider; +HANDLER t OPEN; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ NEXT; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t; +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +HANDLER t READ NEXT; + +drop table t; + +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_27902 +--echo # From 0bb9862888567a5304aec18e85bf6dd002fc25d3 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 5 Jul 2024 16:32:54 +0800 Subject: [PATCH 30/60] MDEV-29962 Spider: creates connections if needed before lock_tables() Same cause as MDEV-31996. This prevents reuse of conns freed previously, e.g. during the commit of previous statement. It does not occur in 10.4 because of the commit for MDEV-19002 removed the call to spider_check_trx_and_get_conn(). --- storage/spider/ha_spider.cc | 2 ++ .../spider/bugfix/r/mdev_29962.result | 23 ++++++++++++++ .../spider/bugfix/t/mdev_29962.test | 30 +++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc index b578226ae3d..afa3732c577 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc @@ -1130,6 +1130,8 @@ int ha_spider::external_lock( } } + if ((error_num= spider_check_trx_and_get_conn(thd, this, FALSE))) + DBUG_RETURN(error_num); if (!partition_handler || !partition_handler->handlers) { DBUG_RETURN(lock_tables()); /* Non-partitioned table */ diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result new file mode 100644 index 00000000000..0767df7d988 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_29962.result @@ -0,0 +1,23 @@ +# +# MDEV-29962 SIGSEGV in ha_spider::lock_tables on BEGIN after table lock +# +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t (c INT) ENGINE=InnoDB; +CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"'; +SELECT * FROM t1; +c +LOCK TABLES t1 WRITE CONCURRENT,t1 AS t2 READ; +BEGIN; +drop table t, t1; +drop server srv; +for master_1 +for child2 +for child3 +# +# end of test mdev_29962 +# diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test new file mode 100644 index 00000000000..65735d43e7d --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_29962.test @@ -0,0 +1,30 @@ +--echo # +--echo # MDEV-29962 SIGSEGV in ha_spider::lock_tables on BEGIN after table lock +--echo # +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +CREATE TABLE t (c INT) ENGINE=InnoDB; +CREATE TABLE t1 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",srv "srv",TABLE "t"'; +SELECT * FROM t1; +LOCK TABLES t1 WRITE CONCURRENT,t1 AS t2 READ; +BEGIN; + +drop table t, t1; +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log +--echo # +--echo # end of test mdev_29962 +--echo # From 132270d3de73163f0198c72e8352a388c69a1be5 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Thu, 11 Jul 2024 11:16:46 +0800 Subject: [PATCH 31/60] MDEV-34541 Clean up spider self reference check SPIDER_CONN::loop_check_meraged_first is useless, because all SPIDER_CONN_LOOP_CHECKs are in SPIDER_CONN::loop_check_queue, which in spider_db_conn::fin_loop_check() is iterated over. This fixes the use-after-free issue when there are three spider tables sharing the same remote, and their corresponding SPIDER_CONN_LOOP_CHECKs getting merged in spider_conn_queue_and_merge_loop_check() This also fixes MDEV-34555 --- .../spider/bugfix/r/mdev_34541.result | 35 +++++ .../spider/bugfix/r/mdev_34555.result | 32 +++++ .../spider/bugfix/t/mdev_34541.test | 48 +++++++ .../spider/bugfix/t/mdev_34555.test | 33 +++++ storage/spider/spd_conn.cc | 127 ++++++++++-------- storage/spider/spd_conn.h | 44 +++++- storage/spider/spd_db_include.cc | 16 +-- storage/spider/spd_db_mysql.cc | 16 +++ storage/spider/spd_include.h | 11 +- 9 files changed, 288 insertions(+), 74 deletions(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result new file mode 100644 index 00000000000..acc1528efc4 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34541.result @@ -0,0 +1,35 @@ +for master_1 +for child2 +for child3 +SET SESSION spider_same_server_link=1; +SET sql_mode=''; +set @old_table_open_cache=@@global.table_open_cache; +set global table_open_cache=10; +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +CREATE TABLE t1 (c INT) ENGINE=InnoDB; +CREATE TABLE t2 (c INT) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE TABLE ta (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t5 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t6 (c INT KEY) ENGINE=InnoDB PARTITION BY RANGE (c) (PARTITION p VALUES LESS THAN (5)); +CREATE TABLE t7 (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t8 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +SELECT * FROM t8; +ERROR HY000: Remote table 'test.t' is not found +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB SELECT * FROM t7; +ERROR HY000: Remote table 'test.t' is not found +CALL foo; +ERROR 42000: PROCEDURE test.foo does not exist +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB; +SELECT * FROM t7 JOIN t6 ON tc=t0.c; +ERROR 42S22: Unknown column 'tc' in 'on clause' +SHOW TABLE STATUS; +drop table ta, t8, t7, t6, t5, t3, t2, t1; +drop table t7; +drop server srv; +set global table_open_cache=@old_table_open_cache; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result new file mode 100644 index 00000000000..5e464ea77bb --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34555.result @@ -0,0 +1,32 @@ +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE '',user 'Spider', password 'foo'); +CREATE TABLE tSpider (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t2 (c INT,c2 CHAR(1)) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +XA START 'a'; +SELECT * FROM information_schema.table_constraints; +SELECT SLEEP (1); +SLEEP (1) +0 +SELECT * FROM t2; +ERROR HY000: Unable to connect to foreign data source: srv +SELECT SLEEP (1); +SLEEP (1) +0 +SELECT * FROM t2; +ERROR HY000: Unable to connect to foreign data source: srv +SELECT SLEEP (1); +SLEEP (1) +0 +SELECT * FROM t2; +ERROR HY000: Unable to connect to foreign data source: srv +xa end 'a'; +xa rollback 'a'; +drop table tSpider, t2; +drop server srv; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test new file mode 100644 index 00000000000..8a36eb58f10 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34541.test @@ -0,0 +1,48 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +SET SESSION spider_same_server_link=1; +SET sql_mode=''; + +set @old_table_open_cache=@@global.table_open_cache; +set global table_open_cache=10; + +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +CREATE TABLE t1 (c INT) ENGINE=InnoDB; +CREATE TABLE t2 (c INT) ENGINE=InnoDB; +CREATE TABLE t3 (c INT) ENGINE=InnoDB; +CREATE TABLE ta (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t5 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t6 (c INT KEY) ENGINE=InnoDB PARTITION BY RANGE (c) (PARTITION p VALUES LESS THAN (5)); +CREATE TABLE t7 (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t8 (c INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +--error 12702 +SELECT * FROM t8; +--error 12702 +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB SELECT * FROM t7; +--error ER_SP_DOES_NOT_EXIST +CALL foo; +CREATE TEMPORARY TABLE t7 (c INT) ENGINE=InnoDB; +--error ER_BAD_FIELD_ERROR +SELECT * FROM t7 JOIN t6 ON tc=t0.c; +--disable_result_log +SHOW TABLE STATUS; +--enable_result_log + +# we need to drop t7 twice +drop table ta, t8, t7, t6, t5, t3, t2, t1; +drop table t7; +drop server srv; +set global table_open_cache=@old_table_open_cache; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test new file mode 100644 index 00000000000..3a1cf604140 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34555.test @@ -0,0 +1,33 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE '',user 'Spider', password 'foo'); +CREATE TABLE tSpider (a INT) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +CREATE TABLE t2 (c INT,c2 CHAR(1)) ENGINE=Spider COMMENT='WRAPPER "mysql",SRV "srv",TABLE "t"'; +XA START 'a'; +--disable_result_log +--error 0,ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM information_schema.table_constraints; +--enable_result_log +SELECT SLEEP (1); +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t2; +SELECT SLEEP (1); +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t2; +SELECT SLEEP (1); +--error ER_CONNECT_TO_FOREIGN_DATA_SOURCE +SELECT * FROM t2; +xa end 'a'; +xa rollback 'a'; +drop table tSpider, t2; +drop server srv; +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index 453e0aaf709..0ebd6d7d0cd 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -1151,27 +1151,41 @@ void spider_conn_queue_UTC_time_zone( DBUG_VOID_RETURN; } +/* + Construct merged values and insert into the loop check queue + + Search the loop_check_queue for the data node table, and if one does + not exist, construct the merged value in the same format as the + right hand side. Otherwise, merge the right hand side of the + existing SPIDER_CONN_LOOP_CHECK with the right hand side of lcptr + into one right hand side. In either case, add the + SPIDER_CONN_LOOP_CHECK to the loop check queue +*/ int spider_conn_queue_and_merge_loop_check( SPIDER_CONN *conn, SPIDER_CONN_LOOP_CHECK *lcptr ) { int error_num = HA_ERR_OUT_OF_MEM; - char *tmp_name, *from_name, *cur_name, *to_name, *full_name, *from_value, + char *tmp_name, *cur_name, *to_name, *full_name, *from_value, *merged_value; SPIDER_CONN_LOOP_CHECK *lcqptr, *lcrptr; DBUG_ENTER("spider_conn_queue_and_merge_loop_check"); DBUG_PRINT("info", ("spider conn=%p", conn)); #ifdef SPIDER_HAS_HASH_VALUE_TYPE - if (unlikely(!(lcqptr = (SPIDER_CONN_LOOP_CHECK *) + if (!(lcqptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search_using_hash_value(&conn->loop_check_queue, lcptr->hash_value_to, - (uchar *) lcptr->to_name.str, lcptr->to_name.length)))) + (uchar *) lcptr->to_name.str, lcptr->to_name.length))) #else if (unlikely(!(lcqptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search( &conn->loop_check_queue, (uchar *) lcptr->to_name.str, lcptr->to_name.length)))) #endif { + /* + Construct the right hand side: + ---- + */ DBUG_PRINT("info", ("spider create merged_value and insert")); lcptr->merged_value.length = spider_unique_id.length + lcptr->cur_name.length + lcptr->from_value.length + 1; @@ -1194,10 +1208,10 @@ int spider_conn_queue_and_merge_loop_check( } lcptr->flag |= SPIDER_LOP_CHK_QUEUED; } else { + /* Merge lcptr and lcqptr into a newly created lcrptr. */ DBUG_PRINT("info", ("spider append merged_value and replace")); if (unlikely(!spider_bulk_malloc(spider_current_trx, 271, MYF(MY_WME), &lcrptr, (uint) (sizeof(SPIDER_CONN_LOOP_CHECK)), - &from_name, (uint) (lcqptr->from_name.length + 1), &cur_name, (uint) (lcqptr->cur_name.length + 1), &to_name, (uint) (lcqptr->to_name.length + 1), &full_name, (uint) (lcqptr->full_name.length + 1), @@ -1209,13 +1223,13 @@ int spider_conn_queue_and_merge_loop_check( )) { goto error_alloc_loop_check_replace; } + /* + TODO: the new lcrptr has the same cur_name, to_name, full_name + and from_value as lcqptr, but they do not seem to be relevant. + */ #ifdef SPIDER_HAS_HASH_VALUE_TYPE lcrptr->hash_value_to = lcqptr->hash_value_to; - lcrptr->hash_value_full = lcqptr->hash_value_full; #endif - lcrptr->from_name.str = from_name; - lcrptr->from_name.length = lcqptr->from_name.length; - memcpy(from_name, lcqptr->from_name.str, lcqptr->from_name.length + 1); lcrptr->cur_name.str = cur_name; lcrptr->cur_name.length = lcqptr->cur_name.length; memcpy(cur_name, lcqptr->cur_name.str, lcqptr->cur_name.length + 1); @@ -1228,8 +1242,14 @@ int spider_conn_queue_and_merge_loop_check( lcrptr->from_value.str = from_value; lcrptr->from_value.length = lcqptr->from_value.length; memcpy(from_value, lcqptr->from_value.str, lcqptr->from_value.length + 1); + /* + The merged_value of lcrptr is a concatenation of that of lcqptr + and constructed merged_value from lcptr. + */ lcrptr->merged_value.str = merged_value; - lcrptr->merged_value.length = lcqptr->merged_value.length; + lcrptr->merged_value.length = + lcqptr->merged_value.length + spider_unique_id.length + + lcptr->cur_name.length + 1 + lcptr->from_value.length; memcpy(merged_value, lcqptr->merged_value.str, lcqptr->merged_value.length); merged_value += lcqptr->merged_value.length; @@ -1273,9 +1293,6 @@ int spider_conn_queue_and_merge_loop_check( goto error_hash_insert_queue; } lcptr->flag = SPIDER_LOP_CHK_MERAGED; - lcptr->next = NULL; - if (!conn->loop_check_meraged_first) - conn->loop_check_meraged_first = lcptr; } DBUG_RETURN(0); @@ -1296,7 +1313,6 @@ error_hash_insert: int spider_conn_reset_queue_loop_check( SPIDER_CONN *conn ) { - int error_num; SPIDER_CONN_LOOP_CHECK *lcptr; DBUG_ENTER("spider_conn_reset_queue_loop_check"); uint l = 0; @@ -1318,30 +1334,8 @@ int spider_conn_reset_queue_loop_check( ++l; } - lcptr = conn->loop_check_ignored_first; - while (lcptr) - { - lcptr->flag = 0; - if ((error_num = spider_conn_queue_and_merge_loop_check(conn, lcptr))) - { - goto error_queue_and_merge; - } - lcptr = lcptr->next; - } - conn->loop_check_meraged_first = NULL; pthread_mutex_unlock(&conn->loop_check_mutex); DBUG_RETURN(0); - -error_queue_and_merge: - lcptr = lcptr->next; - while (lcptr) - { - lcptr->flag = 0; - lcptr = lcptr->next; - } - conn->loop_check_meraged_first = NULL; - pthread_mutex_unlock(&conn->loop_check_mutex); - DBUG_RETURN(error_num); } int spider_conn_queue_loop_check( @@ -1352,7 +1346,7 @@ int spider_conn_queue_loop_check( int error_num = HA_ERR_OUT_OF_MEM; uint conn_link_idx = spider->conn_link_idx[link_idx], buf_sz; char path[FN_REFLEN + 1]; - char *tmp_name, *from_name, *cur_name, *to_name, *full_name, *from_value, + char *tmp_name, *cur_name, *to_name, *full_name, *from_value, *merged_value; user_var_entry *loop_check; char *loop_check_buf; @@ -1363,6 +1357,17 @@ int spider_conn_queue_loop_check( LEX_CSTRING lex_str, from_str, to_str; DBUG_ENTER("spider_conn_queue_loop_check"); DBUG_PRINT("info", ("spider conn=%p", conn)); + /* + construct loop check user var name (left hand side) into + lex_str. It is of the format + + spider_lc_ + + So if the spider table name is ./test/t1, then the constructed + user var name is: + + spider_lc_./test/t1 + */ lex_str.length = top_share->path.length + SPIDER_SQL_LOP_CHK_PRM_PRF_LEN; buf_sz = lex_str.length + 2; loop_check_buf = (char *) my_alloca(buf_sz); @@ -1388,6 +1393,16 @@ int spider_conn_queue_loop_check( } else { lex_str.str = loop_check->value; lex_str.length = loop_check->length; + /* + Validate that there are at least four dashes in the user var + value: ---- + + Note: if the value is merged from multiple values, such as + + "------------" + + then only the first component is put into from_str + */ DBUG_PRINT("info", ("spider from_str=%s", lex_str.str)); if (unlikely(!(tmp_name = strchr(loop_check->value, '-')))) { @@ -1415,12 +1430,23 @@ int spider_conn_queue_loop_check( } else { + /* + Validation passed. Put the first component of rhs in from_str + */ from_str.str = lex_str.str; from_str.length = tmp_name - lex_str.str + 1; } } my_afree(loop_check_buf); + /* + construct loop_check_buf as -- e.g. + "---./test/t0--./test/t1-./test/t2", later used as + full_name + from_str is the first component in the user var value (RHS) or + empty if user var value is empty, cur is the spider table, to_str + is the remote data node table + */ to_str.length = build_table_filename(path, FN_REFLEN, share->tgt_dbs[conn_link_idx] ? share->tgt_dbs[conn_link_idx] : "", share->tgt_table_names[conn_link_idx], "", 0); @@ -1457,7 +1483,7 @@ int spider_conn_queue_loop_check( lcptr = (SPIDER_CONN_LOOP_CHECK *) my_hash_search( &conn->loop_checked, (uchar *) loop_check_buf, buf_sz - 1); #endif - if (unlikely( + if ( !lcptr || ( !lcptr->flag && @@ -1466,7 +1492,7 @@ int spider_conn_queue_loop_check( memcmp(lcptr->from_value.str, lex_str.str, lex_str.length) ) ) - )) + ) { if (unlikely(lcptr)) { @@ -1482,7 +1508,6 @@ int spider_conn_queue_loop_check( DBUG_PRINT("info", ("spider alloc_lcptr")); if (unlikely(!spider_bulk_malloc(spider_current_trx, 272, MYF(MY_WME), &lcptr, (uint) (sizeof(SPIDER_CONN_LOOP_CHECK)), - &from_name, (uint) (from_str.length + 1), &cur_name, (uint) (top_share->path.length + 1), &to_name, (uint) (to_str.length + 1), &full_name, (uint) (buf_sz), @@ -1495,9 +1520,6 @@ int spider_conn_queue_loop_check( goto error_alloc_loop_check; } lcptr->flag = 0; - lcptr->from_name.str = from_name; - lcptr->from_name.length = from_str.length; - memcpy(from_name, from_str.str, from_str.length + 1); lcptr->cur_name.str = cur_name; lcptr->cur_name.length = top_share->path.length; memcpy(cur_name, top_share->path.str, top_share->path.length + 1); @@ -1510,12 +1532,19 @@ int spider_conn_queue_loop_check( lcptr->from_value.str = from_value; lcptr->from_value.length = lex_str.length; memcpy(from_value, lex_str.str, lex_str.length + 1); + /* + merged_value will only be populated later, in + spider_conn_queue_and_merge_loop_check() + */ lcptr->merged_value.str = merged_value; #ifdef SPIDER_HAS_HASH_VALUE_TYPE - lcptr->hash_value_to = my_calc_hash(&conn->loop_checked, + lcptr->hash_value_to = my_calc_hash(&conn->loop_check_queue, (uchar *) to_str.str, to_str.length); - lcptr->hash_value_full = hash_value; #endif + /* + Mark as checked. It will be added to loop_check_queue in + spider_conn_queue_and_merge_loop_check() below for checking + */ #ifdef HASH_UPDATE_WITH_HASH_VALUE if (unlikely(my_hash_insert_with_hash_value(&conn->loop_checked, lcptr->hash_value_full, (uchar *) lcptr))) @@ -1527,19 +1556,11 @@ int spider_conn_queue_loop_check( goto error_hash_insert; } } else { + /* Already marked as checked, ignore and return. */ if (!lcptr->flag) { DBUG_PRINT("info", ("spider add to ignored list")); lcptr->flag |= SPIDER_LOP_CHK_IGNORED; - lcptr->next = NULL; - if (!conn->loop_check_ignored_first) - { - conn->loop_check_ignored_first = lcptr; - conn->loop_check_ignored_last = lcptr; - } else { - conn->loop_check_ignored_last->next = lcptr; - conn->loop_check_ignored_last = lcptr; - } } pthread_mutex_unlock(&conn->loop_check_mutex); my_afree(loop_check_buf); diff --git a/storage/spider/spd_conn.h b/storage/spider/spd_conn.h index 92da278eecc..c9eeb9d66d4 100644 --- a/storage/spider/spd_conn.h +++ b/storage/spider/spd_conn.h @@ -26,24 +26,62 @@ #define SPIDER_SIMPLE_CHECKSUM_TABLE 4 #endif +/* + The SPIDER_CONN_LOOP_CHECK has been added to the loop_check queue to + check for self-reference. +*/ #define SPIDER_LOP_CHK_QUEUED (1 << 0) +/* + The SPIDER_CONN_LOOP_CHECK is a merge of multiple + SPIDER_CONN_LOOP_CHECKs with the same data node table +*/ #define SPIDER_LOP_CHK_MERAGED (1 << 1) +/* + The SPIDER_CONN_LOOP_CHECK has been ignored because it has already + been marked as checked +*/ #define SPIDER_LOP_CHK_IGNORED (1 << 2) +/* Used for self-reference check. */ typedef struct st_spider_conn_loop_check { + /* + Could be 0, SPIDER_LOP_CHK_QUEUED, SPIDER_LOP_CHK_MERAGED, or + SPIDER_LOP_CHK_IGNORED + */ uint flag; #ifdef SPIDER_HAS_HASH_VALUE_TYPE + /* hash value of to_name, used for the hash conn->loop_checked */ my_hash_value_type hash_value_to; - my_hash_value_type hash_value_full; #endif - LEX_CSTRING from_name; + /* + The fully qualified name of the current spider table, which will + also be used to construct the user var name to set in the data + node + */ LEX_CSTRING cur_name; + /* + The fully qualified data node table name, also used as key in + conn->loop_check_queue + */ LEX_CSTRING to_name; + /* + A concatenation of from_value, cur_name and to_name, used as key + in hash conn->loop_checked + */ LEX_CSTRING full_name; + /* + The first component of the uservar value on the current server, + consisting of information of a table that uses the current spider + table as a data node + */ LEX_CSTRING from_value; + /* + The uservar value to set in the data node, a concatenation of info + of tables, mac addresses and process ids of tables that use the + current spider table as the data node + */ LEX_CSTRING merged_value; - st_spider_conn_loop_check *next; } SPIDER_CONN_LOOP_CHECK; uchar *spider_conn_get_key( diff --git a/storage/spider/spd_db_include.cc b/storage/spider/spd_db_include.cc index e8ee365ba5d..4a422e0e1f2 100644 --- a/storage/spider/spd_db_include.cc +++ b/storage/spider/spd_db_include.cc @@ -66,7 +66,7 @@ spider_db_conn::spider_db_conn( DBUG_VOID_RETURN; } -int spider_db_conn::fin_loop_check() +int spider_db_conn::fin_loop_check() /* reset flags of all relevant SPIDER_CONN_LOOP_CHECKs */ { st_spider_conn_loop_check *lcptr; DBUG_ENTER("spider_db_conn::fin_loop_check"); @@ -82,20 +82,6 @@ int spider_db_conn::fin_loop_check() } my_hash_reset(&conn->loop_check_queue); } - lcptr = conn->loop_check_ignored_first; - while (lcptr) - { - lcptr->flag = 0; - lcptr = lcptr->next; - } - conn->loop_check_ignored_first = NULL; - lcptr = conn->loop_check_meraged_first; - while (lcptr) - { - lcptr->flag = 0; - lcptr = lcptr->next; - } - conn->loop_check_meraged_first = NULL; DBUG_RETURN(0); } diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc index 232a2b02c25..7ea91073cf2 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc @@ -5283,6 +5283,22 @@ int spider_db_mbase_util::append_time_zone( DBUG_RETURN(0); } +/* + iterate over loop_check_queue and build queries for loop check + + The query is in the form of + + set @`spider_lc_.` = + '--------...' + + where from_table1, from_table2 etc. are spider tables whose direct + or indirect remote data nodes contain to_table. + + e.g. if t0->t1->t2, then the query could be: + + set @`spider_lc_./test/t2` = + '-234567890abc-def012-./test/t1--1234567890ab-cdef01-./test/t0-' + */ int spider_db_mbase_util::append_loop_check( spider_string *str, SPIDER_CONN *conn diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h index 6b9e2998144..1d190ec2348 100644 --- a/storage/spider/spd_include.h +++ b/storage/spider/spd_include.h @@ -793,19 +793,24 @@ typedef struct st_spider_conn SPIDER_IP_PORT_CONN *ip_port_conn; pthread_mutex_t loop_check_mutex; + /* + A hash of SPIDER_CONN_LOOP_CHECK, indexed by + SPIDER_CONN_LOOP_CHECK::full_name + */ HASH loop_checked; uint loop_checked_id; const char *loop_checked_func_name; const char *loop_checked_file_name; ulong loop_checked_line_no; + /* + A hash of SPIDER_CONN_LOOP_CHECK, indexed by + SPIDER_CONN_LOOP_CHECK::to_name + */ HASH loop_check_queue; uint loop_check_queue_id; const char *loop_check_queue_func_name; const char *loop_check_queue_file_name; ulong loop_check_queue_line_no; - SPIDER_CONN_LOOP_CHECK *loop_check_ignored_first; - SPIDER_CONN_LOOP_CHECK *loop_check_ignored_last; - SPIDER_CONN_LOOP_CHECK *loop_check_meraged_first; } SPIDER_CONN; typedef struct st_spider_lgtm_tblhnd_share From 384ec03e4884fcd224d5b12a8ccd53a7766280b2 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Fri, 21 Jun 2024 19:27:22 +0800 Subject: [PATCH 32/60] MDEV-34421 Check the SQL command when resolving storage engine ENGINE_SUBSTITUTION only applies to CREATE TABLE and ALTER TABLE, and Storage_engine_name::resolve_storage_engine_with_error() could be called when executing any sql command. --- sql/handler.cc | 4 +++- .../mysql-test/spider/bugfix/r/mdev_34421.result | 13 +++++++++++++ .../mysql-test/spider/bugfix/t/mdev_34421.test | 10 ++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test diff --git a/sql/handler.cc b/sql/handler.cc index 66c85f07574..e881d4d1677 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -311,7 +311,9 @@ Storage_engine_name::resolve_storage_engine_with_error(THD *thd, } *ha= NULL; - if (thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) + if ((thd_sql_command(thd) != SQLCOM_CREATE_TABLE && + thd_sql_command(thd) != SQLCOM_ALTER_TABLE) || + thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION) { my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), m_storage_engine_name.str); return true; diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result new file mode 100644 index 00000000000..d42f09a8f1c --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_34421.result @@ -0,0 +1,13 @@ +SET sql_mode=''; +INSTALL SONAME 'ha_spider'; +CREATE TABLE t (c INT) ENGINE=Spider PARTITION BY KEY(c) (PARTITION p); +UNINSTALL SONAME IF EXISTS 'ha_spider'; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown +INSERT INTO t SELECT 1; +ERROR 42000: Unknown storage engine 'SPIDER' +drop table t; +Warnings: +Warning 1620 Plugin is busy and will be uninstalled on shutdown +Note 1305 PLUGIN SPIDER_ALLOC_MEM does not exist +Note 1305 PLUGIN SPIDER_WRAPPER_PROTOCOLS does not exist diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test new file mode 100644 index 00000000000..a63993446e9 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_34421.test @@ -0,0 +1,10 @@ +--source include/have_partition.inc +SET sql_mode=''; +INSTALL SONAME 'ha_spider'; +CREATE TABLE t (c INT) ENGINE=Spider PARTITION BY KEY(c) (PARTITION p); +UNINSTALL SONAME IF EXISTS 'ha_spider'; +--error ER_UNKNOWN_STORAGE_ENGINE +INSERT INTO t SELECT 1; +drop table t; +--disable_query_log +--source ../../include/clean_up_spider.inc From 972879f413a1aa8aa2d52b731fe65315f9be208b Mon Sep 17 00:00:00 2001 From: Oleg Smirnov Date: Mon, 1 Apr 2024 14:03:46 +0700 Subject: [PATCH 33/60] MDEV-33010 Crash when pushing condition with CHARSET()/COERCIBILITY() into derived table Based on the current logic, objects of classes Item_func_charset and Item_func_coercibility (responsible for CHARSET() and COERCIBILITY() functions) are always considered constant. However, SQL syntax allows their use in a non-constant manner, such as CHARSET(t1.a), COERCIBILITY(t1.a). In these cases, the `used_tables()` parameter corresponds to table names in the function parameters, creating an inconsistency: the item is marked as constant but accesses tables. This leads to crashes when conditions with CHARSET()/COERCIBILITY() are pushed into derived tables. This commit addresses the issue by setting `used_tables()` to 0 for `Item_func_charset` and `Item_func_coercibility`. Additionally, the items now store the return values during the preparation phase and return them during the execution phase. This ensures that the items do not call its arguments methods during the execution and are truly constant. Reviewer: Alexander Barkov --- .../main/derived_cond_pushdown_innodb.result | 39 +++++++++++++++++++ .../main/derived_cond_pushdown_innodb.test | 31 +++++++++++++++ mysql-test/main/olap.result | 8 +--- mysql-test/main/olap.test | 7 ---- sql/item_func.cc | 18 ++++++++- sql/item_func.h | 5 ++- sql/item_strfunc.cc | 3 +- sql/item_strfunc.h | 19 +++++++++ 8 files changed, 112 insertions(+), 18 deletions(-) create mode 100644 mysql-test/main/derived_cond_pushdown_innodb.result create mode 100644 mysql-test/main/derived_cond_pushdown_innodb.test diff --git a/mysql-test/main/derived_cond_pushdown_innodb.result b/mysql-test/main/derived_cond_pushdown_innodb.result new file mode 100644 index 00000000000..d01ce8cdd20 --- /dev/null +++ b/mysql-test/main/derived_cond_pushdown_innodb.result @@ -0,0 +1,39 @@ +# +# MDEV-33010: Crash when pushing condition with CHARSET()/COERCIBILITY() +# into derived table +# +CREATE TABLE t1 (c1 BIGINT, KEY (c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (c2 DOUBLE UNSIGNED); +INSERT INTO t2 VALUES (1); +SET optimizer_switch='derived_merge=off'; +EXPLAIN EXTENDED +SELECT dt1_c1 FROM +(SELECT c1 AS dt1_c1 FROM t1) AS dt1 +JOIN +(SELECT 1 AS dt2_c2 FROM t2) AS dt2 +ON CHARSET(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY system NULL NULL NULL NULL 1 100.00 +1 PRIMARY ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED t2 system NULL NULL NULL NULL 1 100.00 +2 DERIVED t1 ref c1 c1 9 const 1 100.00 Using where; Using index +Warnings: +Warning 1292 Truncated incorrect DECIMAL value: 'binary' +Note 1003 /* select#1 */ select `dt1`.`dt1_c1` AS `dt1_c1` from (/* select#2 */ select `test`.`t1`.`c1` AS `dt1_c1` from `test`.`t1` where (charset(1)) between `test`.`t1`.`c1` and `test`.`t1`.`c1`) `dt1` where (charset(1)) between `dt1`.`dt1_c1` and `dt1`.`dt1_c1` +EXPLAIN EXTENDED +SELECT dt1_c1 FROM +(SELECT c1 AS dt1_c1 FROM t1) AS dt1 +JOIN +(SELECT 1 AS dt2_c2 FROM t2) AS dt2 +ON COERCIBILITY(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 PRIMARY system NULL NULL NULL NULL 1 100.00 +1 PRIMARY ALL NULL NULL NULL NULL 2 100.00 Using where +3 DERIVED t2 system NULL NULL NULL NULL 1 100.00 +2 DERIVED t1 ref c1 c1 9 const 1 100.00 Using where; Using index +Warnings: +Note 1003 /* select#1 */ select `dt1`.`dt1_c1` AS `dt1_c1` from (/* select#2 */ select `test`.`t1`.`c1` AS `dt1_c1` from `test`.`t1` where (coercibility(1)) between `test`.`t1`.`c1` and `test`.`t1`.`c1`) `dt1` where (coercibility(1)) between `dt1`.`dt1_c1` and `dt1`.`dt1_c1` +SET optimizer_switch=DEFAULT; +DROP TABLE t1, t2; +# End of 10.4 tests diff --git a/mysql-test/main/derived_cond_pushdown_innodb.test b/mysql-test/main/derived_cond_pushdown_innodb.test new file mode 100644 index 00000000000..2904e638db3 --- /dev/null +++ b/mysql-test/main/derived_cond_pushdown_innodb.test @@ -0,0 +1,31 @@ +--source include/have_innodb.inc + +--echo # +--echo # MDEV-33010: Crash when pushing condition with CHARSET()/COERCIBILITY() +--echo # into derived table +--echo # +CREATE TABLE t1 (c1 BIGINT, KEY (c1)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +CREATE TABLE t2 (c2 DOUBLE UNSIGNED); +INSERT INTO t2 VALUES (1); + +SET optimizer_switch='derived_merge=off'; + +EXPLAIN EXTENDED + SELECT dt1_c1 FROM + (SELECT c1 AS dt1_c1 FROM t1) AS dt1 + JOIN + (SELECT 1 AS dt2_c2 FROM t2) AS dt2 + ON CHARSET(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; + +EXPLAIN EXTENDED + SELECT dt1_c1 FROM + (SELECT c1 AS dt1_c1 FROM t1) AS dt1 + JOIN + (SELECT 1 AS dt2_c2 FROM t2) AS dt2 + ON COERCIBILITY(dt2_c2) BETWEEN dt1_c1 AND dt1_c1; + +SET optimizer_switch=DEFAULT; +DROP TABLE t1, t2; + +--echo # End of 10.4 tests diff --git a/mysql-test/main/olap.result b/mysql-test/main/olap.result index b837aeaf1db..22186ee085c 100644 --- a/mysql-test/main/olap.result +++ b/mysql-test/main/olap.result @@ -787,18 +787,12 @@ DROP TABLE t1; # # MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP # -# Note, different MariaDB versions can return different results -# in the two rows (such as "latin1" vs "binary"). This is wrong. -# Both lines should return equal values. -# The point in this test is to make sure it does not crash. -# As this is a minor issue, bad result will be fixed -# in a later version, presumably in 10.4. CREATE TABLE t (d DATE) ENGINE=MyISAM; INSERT INTO t VALUES ('2018-12-12'); SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP; f binary -latin1 +binary DROP TABLE t; # # MDEV-14041 Server crashes in String::length on queries with functions and ROLLUP diff --git a/mysql-test/main/olap.test b/mysql-test/main/olap.test index 0a3d8e55858..51aa35b757a 100644 --- a/mysql-test/main/olap.test +++ b/mysql-test/main/olap.test @@ -433,13 +433,6 @@ DROP TABLE t1; --echo # MDEV-17830 Server crashes in Item_null_result::field_type upon SELECT with CHARSET(date) and ROLLUP --echo # ---echo # Note, different MariaDB versions can return different results ---echo # in the two rows (such as "latin1" vs "binary"). This is wrong. ---echo # Both lines should return equal values. ---echo # The point in this test is to make sure it does not crash. ---echo # As this is a minor issue, bad result will be fixed ---echo # in a later version, presumably in 10.4. - CREATE TABLE t (d DATE) ENGINE=MyISAM; INSERT INTO t VALUES ('2018-12-12'); SELECT CHARSET(d) AS f FROM t GROUP BY d WITH ROLLUP; diff --git a/sql/item_func.cc b/sql/item_func.cc index 4e835243f02..553a044eb83 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3143,11 +3143,27 @@ longlong Item_func_char_length::val_int() } +bool Item_func_coercibility::fix_length_and_dec() +{ + max_length=10; + maybe_null= 0; + /* + Since this is a const item which doesn't use tables (see used_tables()), + we don't want to access the function arguments during execution. + That's why we store the derivation here during the preparation phase + and only return it later at the execution phase + */ + DBUG_ASSERT(args[0]->is_fixed()); + m_cached_collation_derivation= (longlong) args[0]->collation.derivation; + return false; +} + + longlong Item_func_coercibility::val_int() { DBUG_ASSERT(fixed == 1); null_value= 0; - return (longlong) args[0]->collation.derivation; + return m_cached_collation_derivation; } diff --git a/sql/item_func.h b/sql/item_func.h index 9e6ab703dad..1ac6045ee61 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -2285,13 +2285,15 @@ public: class Item_func_coercibility :public Item_long_func { + longlong m_cached_collation_derivation; + bool check_arguments() const override { return args[0]->check_type_can_return_str(func_name()); } public: Item_func_coercibility(THD *thd, Item *a): Item_long_func(thd, a) {} longlong val_int() override; const char *func_name() const override { return "coercibility"; } - bool fix_length_and_dec() override { max_length=10; maybe_null= 0; return FALSE; } + bool fix_length_and_dec() override; bool eval_not_null_tables(void *) override { not_null_tables_cache= 0; @@ -2306,6 +2308,7 @@ public: bool const_item() const override { return true; } Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + table_map used_tables() const override { return 0; } }; diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 8c8bb04edef..4a54cf06b92 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -3625,9 +3625,8 @@ String *Item_func_charset::val_str(String *str) DBUG_ASSERT(fixed == 1); uint dummy_errors; - CHARSET_INFO *cs= args[0]->charset_for_protocol(); null_value= 0; - str->copy(cs->csname, (uint) strlen(cs->csname), + str->copy(m_cached_charset_info.str, m_cached_charset_info.length, &my_charset_latin1, collation.collation, &dummy_errors); return str; } diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index c713534e42d..e40eed1adf2 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -1692,6 +1692,8 @@ public: class Item_func_charset :public Item_func_expr_str_metadata { + LEX_CSTRING m_cached_charset_info; + public: Item_func_charset(THD *thd, Item *a) :Item_func_expr_str_metadata(thd, a) { } @@ -1699,6 +1701,23 @@ public: const char *func_name() const override { return "charset"; } Item *do_get_copy(THD *thd) const override { return get_item_copy(thd, this); } + table_map used_tables() const override { return 0; } + bool fix_length_and_dec() override + { + if (Item_func_expr_str_metadata::fix_length_and_dec()) + return true; + /* + Since this is a const item which doesn't use tables (see used_tables()), + we don't want to access the function arguments during execution. + That's why we store the charset here during the preparation phase + and only return it later at the execution phase + */ + DBUG_ASSERT(args[0]->is_fixed()); + m_cached_charset_info.str= args[0]->charset_for_protocol()->csname; + m_cached_charset_info.length= + strlen(args[0]->charset_for_protocol()->csname); + return false; + } }; From e644e130b0f8236826b372d81f7fb214ba0a3e5f Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Tue, 16 Jul 2024 12:43:53 +0300 Subject: [PATCH 34/60] MDEV-30623: Fix the testcase - Fix view-protocol: long expressions in SELECT list should have "expr AS column_name". - Also, moved the test from subselect*test to suite/json/t/json_table.test. --- mysql-test/main/subselect.result | 26 ------------------- mysql-test/main/subselect.test | 22 ---------------- .../main/subselect_no_exists_to_in.result | 26 ------------------- mysql-test/main/subselect_no_mat.result | 26 ------------------- mysql-test/main/subselect_no_opts.result | 26 ------------------- mysql-test/main/subselect_no_scache.result | 26 ------------------- mysql-test/main/subselect_no_semijoin.result | 26 ------------------- mysql-test/suite/json/r/json_table.result | 25 ++++++++++++++++++ mysql-test/suite/json/t/json_table.test | 22 ++++++++++++++++ 9 files changed, 47 insertions(+), 178 deletions(-) diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result index 3b5954754d2..9fbf36e3d6e 100644 --- a/mysql-test/main/subselect.result +++ b/mysql-test/main/subselect.result @@ -7559,31 +7559,5 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # -# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated -# update_correlated_cache() fails to take JSON_TABLE functions in -# subqueries into account. -# -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), -('[{"x":"10"},{"x":"20"}]'), -('[{"x":"100"},{"x":"200"}]'); -select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -[{"x":"1"},{"x":"2"}] 3 -[{"x":"10"},{"x":"20"}] 30 -[{"x":"100"},{"x":"200"}] 300 -explain select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 -2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table -drop table t1; -# # End of 10.6 tests # diff --git a/mysql-test/main/subselect.test b/mysql-test/main/subselect.test index eca5af78eb7..badf55ca958 100644 --- a/mysql-test/main/subselect.test +++ b/mysql-test/main/subselect.test @@ -6434,28 +6434,6 @@ insert into t2 select (('e','e') IN (SELECT v1.id, v1.id FROM v1 JOIN t3)); drop view v1; drop table t1, t2, t3; ---echo # ---echo # MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated ---echo # update_correlated_cache() fails to take JSON_TABLE functions in ---echo # subqueries into account. ---echo # - -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), - ('[{"x":"10"},{"x":"20"}]'), - ('[{"x":"100"},{"x":"200"}]'); -select c, - (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) - AS jt) - from t1; - -explain select c, - (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) - AS jt) - from t1; - -drop table t1; - --echo # --echo # End of 10.6 tests --echo # diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result index 806e2f67c63..0fdd573b339 100644 --- a/mysql-test/main/subselect_no_exists_to_in.result +++ b/mysql-test/main/subselect_no_exists_to_in.result @@ -7559,32 +7559,6 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # -# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated -# update_correlated_cache() fails to take JSON_TABLE functions in -# subqueries into account. -# -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), -('[{"x":"10"},{"x":"20"}]'), -('[{"x":"100"},{"x":"200"}]'); -select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -[{"x":"1"},{"x":"2"}] 3 -[{"x":"10"},{"x":"20"}] 30 -[{"x":"100"},{"x":"200"}] 300 -explain select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 -2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table -drop table t1; -# # End of 10.6 tests # set optimizer_switch=default; diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result index cef26709fd3..5183d50cd49 100644 --- a/mysql-test/main/subselect_no_mat.result +++ b/mysql-test/main/subselect_no_mat.result @@ -7552,32 +7552,6 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # -# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated -# update_correlated_cache() fails to take JSON_TABLE functions in -# subqueries into account. -# -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), -('[{"x":"10"},{"x":"20"}]'), -('[{"x":"100"},{"x":"200"}]'); -select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -[{"x":"1"},{"x":"2"}] 3 -[{"x":"10"},{"x":"20"}] 30 -[{"x":"100"},{"x":"200"}] 300 -explain select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 -2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table -drop table t1; -# # End of 10.6 tests # set optimizer_switch=default; diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result index 7ef17b14791..603958d2815 100644 --- a/mysql-test/main/subselect_no_opts.result +++ b/mysql-test/main/subselect_no_opts.result @@ -7550,32 +7550,6 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # -# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated -# update_correlated_cache() fails to take JSON_TABLE functions in -# subqueries into account. -# -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), -('[{"x":"10"},{"x":"20"}]'), -('[{"x":"100"},{"x":"200"}]'); -select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -[{"x":"1"},{"x":"2"}] 3 -[{"x":"10"},{"x":"20"}] 30 -[{"x":"100"},{"x":"200"}] 300 -explain select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 -2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table -drop table t1; -# # End of 10.6 tests # set @optimizer_switch_for_subselect_test=null; diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result index 9bbaf51fe33..67d738a8a78 100644 --- a/mysql-test/main/subselect_no_scache.result +++ b/mysql-test/main/subselect_no_scache.result @@ -7565,32 +7565,6 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # -# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated -# update_correlated_cache() fails to take JSON_TABLE functions in -# subqueries into account. -# -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), -('[{"x":"10"},{"x":"20"}]'), -('[{"x":"100"},{"x":"200"}]'); -select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -[{"x":"1"},{"x":"2"}] 3 -[{"x":"10"},{"x":"20"}] 30 -[{"x":"100"},{"x":"200"}] 300 -explain select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 -2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table -drop table t1; -# # End of 10.6 tests # set optimizer_switch=default; diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result index 7269ad94df7..0ec32e0fbf8 100644 --- a/mysql-test/main/subselect_no_semijoin.result +++ b/mysql-test/main/subselect_no_semijoin.result @@ -7550,32 +7550,6 @@ Warning 1292 Truncated incorrect DECIMAL value: 'e' drop view v1; drop table t1, t2, t3; # -# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated -# update_correlated_cache() fails to take JSON_TABLE functions in -# subqueries into account. -# -create table t1(c json); -insert into t1 values ('[{"x":"1"},{"x":"2"}]'), -('[{"x":"10"},{"x":"20"}]'), -('[{"x":"100"},{"x":"200"}]'); -select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -c (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -[{"x":"1"},{"x":"2"}] 3 -[{"x":"10"},{"x":"20"}] 30 -[{"x":"100"},{"x":"200"}] 300 -explain select c, -(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) -AS jt) -from t1; -id select_type table type possible_keys key key_len ref rows Extra -1 PRIMARY t1 ALL NULL NULL NULL NULL 3 -2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table -drop table t1; -# # End of 10.6 tests # # diff --git a/mysql-test/suite/json/r/json_table.result b/mysql-test/suite/json/r/json_table.result index b9cc09fdd97..20e1a4b1225 100644 --- a/mysql-test/suite/json/r/json_table.result +++ b/mysql-test/suite/json/r/json_table.result @@ -1011,5 +1011,30 @@ Jeans SELECT 1 FROM JSON_TABLE (row(1,2), '$' COLUMNS (o FOR ORDINALITY)) AS j; ERROR 21000: Operand should contain 1 column(s) # +# MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +# update_correlated_cache() fails to take JSON_TABLE functions in +# subqueries into account. +# +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), +('[{"x":"10"},{"x":"20"}]'), +('[{"x":"100"},{"x":"200"}]'); +select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) as SUBQ +from t1; +c SUBQ +[{"x":"1"},{"x":"2"}] 3 +[{"x":"10"},{"x":"20"}] 30 +[{"x":"100"},{"x":"200"}] 300 +explain select c, +(SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) +AS jt) as SUBQ +from t1; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY t1 ALL NULL NULL NULL NULL 3 +2 DEPENDENT SUBQUERY jt ALL NULL NULL NULL NULL 40 Table function: json_table +drop table t1; +# # End of 10.6 tests # diff --git a/mysql-test/suite/json/t/json_table.test b/mysql-test/suite/json/t/json_table.test index ec330046f25..580a8507c8f 100644 --- a/mysql-test/suite/json/t/json_table.test +++ b/mysql-test/suite/json/t/json_table.test @@ -871,6 +871,28 @@ SELECT * FROM json_table('[{"name":"Jeans"}]', '$[*]' --error ER_OPERAND_COLUMNS SELECT 1 FROM JSON_TABLE (row(1,2), '$' COLUMNS (o FOR ORDINALITY)) AS j; +--echo # +--echo # MDEV-30623 JSON_TABLE in subquery not correctly marked as correlated +--echo # update_correlated_cache() fails to take JSON_TABLE functions in +--echo # subqueries into account. +--echo # + +create table t1(c json); +insert into t1 values ('[{"x":"1"},{"x":"2"}]'), + ('[{"x":"10"},{"x":"20"}]'), + ('[{"x":"100"},{"x":"200"}]'); +select c, + (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) + AS jt) as SUBQ + from t1; + +explain select c, + (SELECT sum(x) FROM json_table(c, "$[*]" columns( x int path "$.x")) + AS jt) as SUBQ + from t1; + +drop table t1; + --echo # --echo # End of 10.6 tests --echo # From 62dfd0c09dc2f138075047e726f2cab592807edb Mon Sep 17 00:00:00 2001 From: Tuukka Pasanen Date: Fri, 14 Jun 2024 09:51:44 +0300 Subject: [PATCH 35/60] MDEV-33837: Workaround chown warnings Blindly recursive chown is not way to do it. This Workaround is not much better than just chown -R but there is small adjustment just chown MariaDB statedir and logdir then with find only chown those files that are not correctly owned. Fixes lintian warnings: * W: mariadb-server: recursive-privilege-change "chown -R" [postinst:*] * W: mariadb-server: recursive-privilege-change "chown -R" [postinst:*] --- debian/mariadb-server-10.5.postinst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/mariadb-server-10.5.postinst b/debian/mariadb-server-10.5.postinst index d6017f32169..0d84d943258 100644 --- a/debian/mariadb-server-10.5.postinst +++ b/debian/mariadb-server-10.5.postinst @@ -128,10 +128,12 @@ EOF # The mysql_statedir must not be writable by the mysql user under any # circumstances as it contains scripts that are executed by root. set +e - chown -R 0:0 $mysql_statedir - find $mysql_datadir ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql - chown -R mysql:adm $mysql_logdir - chmod 2750 $mysql_logdir + chown 0:0 "$mysql_statedir" + find "$mysql_statedir" ! -uid 0 -print0 | xargs -0 -r chown 0:0 + find "$mysql_datadir" ! -uid "$(id -u mysql)" -print0 | xargs -0 -r chown mysql + chown mysql:adm "$mysql_logdir" + find "$mysql_logdir" -print0 | xargs -0 -r chown mysql:adm + chmod 2750 "$mysql_logdir" set -e ## Set the correct filesystem ownership for the PAM v2 plugin From 6f3baec4f5bf32392532b5142e92ea2010a34815 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 11 Jun 2024 16:30:00 +1000 Subject: [PATCH 36/60] MDEV-32627 Spider: add tests for connection param overriding When connection parameters are specified in COMMENT, CONNECTION and SERVER, they are overriden in the following order: COMMENT > CONNECTION > SERVER --- .../spider/r/connection_override.result | 44 +++++++++++++++++++ .../spider/t/connection_override.cnf | 2 + .../spider/t/connection_override.test | 43 ++++++++++++++++++ 3 files changed, 89 insertions(+) create mode 100644 storage/spider/mysql-test/spider/r/connection_override.result create mode 100644 storage/spider/mysql-test/spider/t/connection_override.cnf create mode 100644 storage/spider/mysql-test/spider/t/connection_override.test diff --git a/storage/spider/mysql-test/spider/r/connection_override.result b/storage/spider/mysql-test/spider/r/connection_override.result new file mode 100644 index 00000000000..8ecc0139212 --- /dev/null +++ b/storage/spider/mysql-test/spider/r/connection_override.result @@ -0,0 +1,44 @@ +for master_1 +for child2 +for child3 +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +c +1 +2 +3 +drop table t1, t2; +drop server srv; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +CONNECTION='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +c +1 +2 +3 +drop table t1, t2; +drop server srv; +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +CONNECTION='user "root", database "invalid"' +COMMENT='WRAPPER "mysql", SOCKET "$MASTER_1_MYSOCK",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +c +1 +2 +3 +drop table t1, t2; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/t/connection_override.cnf b/storage/spider/mysql-test/spider/t/connection_override.cnf new file mode 100644 index 00000000000..b0853e32654 --- /dev/null +++ b/storage/spider/mysql-test/spider/t/connection_override.cnf @@ -0,0 +1,2 @@ +!include include/default_mysqld.cnf +!include ../my_1_1.cnf diff --git a/storage/spider/mysql-test/spider/t/connection_override.test b/storage/spider/mysql-test/spider/t/connection_override.test new file mode 100644 index 00000000000..1672b27decb --- /dev/null +++ b/storage/spider/mysql-test/spider/t/connection_override.test @@ -0,0 +1,43 @@ +--disable_query_log +--disable_result_log +--source test_init.inc +--enable_result_log +--enable_query_log +set spider_same_server_link= 1; + +# COMMENT overrides SERVER +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +drop table t1, t2; +drop server srv; + +# CONNECTION overrides SERVER +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'invalid',user 'root'); +create table t2 (c int); +create table t1 (c int) ENGINE=Spider +CONNECTION='WRAPPER "mysql", srv "srv",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +drop table t1, t2; +drop server srv; + +# COMMENT overrides CONNECTION +create table t2 (c int); +evalp create table t1 (c int) ENGINE=Spider +CONNECTION='user "root", database "invalid"' +COMMENT='WRAPPER "mysql", SOCKET "$MASTER_1_MYSOCK",TABLE "t2", database "test"'; +insert into t1 values (1), (2), (3); +select * from t1; +drop table t1, t2; + +--disable_query_log +--disable_result_log +--source test_deinit.inc +--enable_result_log +--enable_query_log From 20d99f3f86abb5f37cec698f3ff3fa35f5d3a35c Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Tue, 4 Jun 2024 14:51:25 +1000 Subject: [PATCH 37/60] MDEV-32627 Distinguish between absence of a keyword and empty value for the keyword Distinguish them in two place: when constructing connection key in create_conn_key and spider_create_conn for both ordinary queries and spider_direct_sql For spider_create_conn and spider_udf_direct_sql_create_conn, the created conn gets assigned a field from the source object if and only if source->field is non-null. For spider_create_conn_keys and spider_udf_direct_sql_create_conn_key, we update the encoding so that absence of keyword and keyword with an empty value result in different keys. More specifically, if the i-th keyword has a value, the corresponding part in the conn key begins with the char \i, followed by the possibly empty value and ends with a \0. If the i-th keyword is not specified, then it does not get a mention in the conn key. As part of this change, we also update table param / option parsing to recognise a singleton empty string when creating an string list, instead of writing it off as NULL. --- storage/spider/spd_conn.cc | 163 ++++++++++++------------------ storage/spider/spd_direct_sql.cc | 161 ++++++++++-------------------- storage/spider/spd_table.cc | 166 ++++++++++--------------------- storage/spider/spd_table.h | 2 + 4 files changed, 169 insertions(+), 323 deletions(-) diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc index 0ebd6d7d0cd..5549b30caa4 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc @@ -397,6 +397,19 @@ void spider_free_conn_from_trx( DBUG_VOID_RETURN; } +static inline void spider_memcpy_or_null(char **dest, char *alloced, + char *src, uint *dest_len, + uint tgt_len) +{ + *dest_len= tgt_len; + if (src) + { + *dest= alloced; + memcpy(*dest, src, tgt_len); + } else + *dest= NULL; +} + SPIDER_CONN *spider_create_conn( SPIDER_SHARE *share, ha_spider *spider, @@ -474,106 +487,62 @@ SPIDER_CONN *spider_create_conn( #ifdef SPIDER_HAS_HASH_VALUE_TYPE conn->conn_key_hash_value = share->conn_keys_hash_value[link_idx]; #endif - conn->tgt_host_length = share->tgt_hosts_lengths[link_idx]; - conn->tgt_host = tmp_host; - memcpy(conn->tgt_host, share->tgt_hosts[link_idx], - share->tgt_hosts_lengths[link_idx]); - - conn->tgt_username_length = share->tgt_usernames_lengths[link_idx]; - conn->tgt_username = tmp_username; - if (conn->tgt_username_length) - memcpy(conn->tgt_username, share->tgt_usernames[link_idx], - share->tgt_usernames_lengths[link_idx]); - - conn->tgt_password_length = share->tgt_passwords_lengths[link_idx]; - conn->tgt_password = tmp_password; - if (conn->tgt_password_length) - memcpy(conn->tgt_password, share->tgt_passwords[link_idx], - share->tgt_passwords_lengths[link_idx]); - - conn->tgt_socket_length = share->tgt_sockets_lengths[link_idx]; - conn->tgt_socket = tmp_socket; - if (conn->tgt_socket_length) - memcpy(conn->tgt_socket, share->tgt_sockets[link_idx], - share->tgt_sockets_lengths[link_idx]); - - conn->tgt_wrapper_length = share->tgt_wrappers_lengths[link_idx]; - conn->tgt_wrapper = tmp_wrapper; - memcpy(conn->tgt_wrapper, share->tgt_wrappers[link_idx], - share->tgt_wrappers_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_host, tmp_host, + share->tgt_hosts[link_idx], &conn->tgt_host_length, + share->tgt_hosts_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_username, tmp_username, + share->tgt_usernames[link_idx], + &conn->tgt_username_length, + share->tgt_usernames_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_password, tmp_password, + share->tgt_passwords[link_idx], + &conn->tgt_password_length, + share->tgt_passwords_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_socket, tmp_socket, + share->tgt_sockets[link_idx], + &conn->tgt_socket_length, + share->tgt_sockets_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_wrapper, tmp_wrapper, + share->tgt_wrappers[link_idx], + &conn->tgt_wrapper_length, + share->tgt_wrappers_lengths[link_idx]); if (!tables_on_different_db_are_joinable) { - conn->tgt_db_length = share->tgt_dbs_lengths[link_idx]; - conn->tgt_db = tmp_db; - memcpy(conn->tgt_db, share->tgt_dbs[link_idx], - share->tgt_dbs_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_db, tmp_db, share->tgt_dbs[link_idx], + &conn->tgt_db_length, + share->tgt_dbs_lengths[link_idx]); } - conn->tgt_ssl_ca_length = share->tgt_ssl_cas_lengths[link_idx]; - if (conn->tgt_ssl_ca_length) - { - conn->tgt_ssl_ca = tmp_ssl_ca; - memcpy(conn->tgt_ssl_ca, share->tgt_ssl_cas[link_idx], - share->tgt_ssl_cas_lengths[link_idx]); - } else - conn->tgt_ssl_ca = NULL; - conn->tgt_ssl_capath_length = share->tgt_ssl_capaths_lengths[link_idx]; - if (conn->tgt_ssl_capath_length) - { - conn->tgt_ssl_capath = tmp_ssl_capath; - memcpy(conn->tgt_ssl_capath, share->tgt_ssl_capaths[link_idx], - share->tgt_ssl_capaths_lengths[link_idx]); - } else - conn->tgt_ssl_capath = NULL; - conn->tgt_ssl_cert_length = share->tgt_ssl_certs_lengths[link_idx]; - if (conn->tgt_ssl_cert_length) - { - conn->tgt_ssl_cert = tmp_ssl_cert; - memcpy(conn->tgt_ssl_cert, share->tgt_ssl_certs[link_idx], - share->tgt_ssl_certs_lengths[link_idx]); - } else - conn->tgt_ssl_cert = NULL; - conn->tgt_ssl_cipher_length = share->tgt_ssl_ciphers_lengths[link_idx]; - if (conn->tgt_ssl_cipher_length) - { - conn->tgt_ssl_cipher = tmp_ssl_cipher; - memcpy(conn->tgt_ssl_cipher, share->tgt_ssl_ciphers[link_idx], - share->tgt_ssl_ciphers_lengths[link_idx]); - } else - conn->tgt_ssl_cipher = NULL; - conn->tgt_ssl_key_length = share->tgt_ssl_keys_lengths[link_idx]; - if (conn->tgt_ssl_key_length) - { - conn->tgt_ssl_key = tmp_ssl_key; - memcpy(conn->tgt_ssl_key, share->tgt_ssl_keys[link_idx], - share->tgt_ssl_keys_lengths[link_idx]); - } else - conn->tgt_ssl_key = NULL; - conn->tgt_default_file_length = share->tgt_default_files_lengths[link_idx]; - if (conn->tgt_default_file_length) - { - conn->tgt_default_file = tmp_default_file; - memcpy(conn->tgt_default_file, share->tgt_default_files[link_idx], - share->tgt_default_files_lengths[link_idx]); - } else - conn->tgt_default_file = NULL; - conn->tgt_default_group_length = - share->tgt_default_groups_lengths[link_idx]; - if (conn->tgt_default_group_length) - { - conn->tgt_default_group = tmp_default_group; - memcpy(conn->tgt_default_group, share->tgt_default_groups[link_idx], - share->tgt_default_groups_lengths[link_idx]); - } else - conn->tgt_default_group = NULL; - conn->tgt_dsn_length = - share->tgt_dsns_lengths[link_idx]; - if (conn->tgt_dsn_length) - { - conn->tgt_dsn = tmp_dsn; - memcpy(conn->tgt_dsn, share->tgt_dsns[link_idx], - share->tgt_dsns_lengths[link_idx]); - } else - conn->tgt_dsn = NULL; + spider_memcpy_or_null(&conn->tgt_ssl_ca, tmp_ssl_ca, + share->tgt_ssl_cas[link_idx], + &conn->tgt_ssl_ca_length, + share->tgt_ssl_cas_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_capath, tmp_ssl_capath, + share->tgt_ssl_capaths[link_idx], + &conn->tgt_ssl_capath_length, + share->tgt_ssl_capaths_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_cert, tmp_ssl_cert, + share->tgt_ssl_certs[link_idx], + &conn->tgt_ssl_cert_length, + share->tgt_ssl_certs_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_cipher, tmp_ssl_cipher, + share->tgt_ssl_ciphers[link_idx], + &conn->tgt_ssl_cipher_length, + share->tgt_ssl_ciphers_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_ssl_key, tmp_ssl_key, + share->tgt_ssl_keys[link_idx], + &conn->tgt_ssl_key_length, + share->tgt_ssl_keys_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_default_file, tmp_default_file, + share->tgt_default_files[link_idx], + &conn->tgt_default_file_length, + share->tgt_default_files_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_default_group, tmp_default_group, + share->tgt_default_groups[link_idx], + &conn->tgt_default_group_length, + share->tgt_default_groups_lengths[link_idx]); + spider_memcpy_or_null(&conn->tgt_dsn, tmp_dsn, share->tgt_dsns[link_idx], + &conn->tgt_dsn_length, + share->tgt_dsns_lengths[link_idx]); conn->tgt_port = share->tgt_ports[link_idx]; conn->tgt_ssl_vsc = share->tgt_ssl_vscs[link_idx]; conn->dbton_id = share->sql_dbton_ids[link_idx]; diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc index 462d83f3a84..0a242787e8f 100644 --- a/storage/spider/spd_direct_sql.cc +++ b/storage/spider/spd_direct_sql.cc @@ -219,23 +219,23 @@ int spider_udf_direct_sql_create_conn_key( tables_on_different_db_are_joinable(); direct_sql->conn_key_length = 1 - + direct_sql->tgt_wrapper_length + 1 - + direct_sql->tgt_host_length + 1 - + 5 + 1 - + direct_sql->tgt_socket_length + 1 - + (tables_on_different_db_are_joinable ? - 0 : direct_sql->tgt_default_db_name_length + 1) - + direct_sql->tgt_username_length + 1 - + direct_sql->tgt_password_length + 1 - + direct_sql->tgt_ssl_ca_length + 1 - + direct_sql->tgt_ssl_capath_length + 1 - + direct_sql->tgt_ssl_cert_length + 1 - + direct_sql->tgt_ssl_cipher_length + 1 - + direct_sql->tgt_ssl_key_length + 1 - + 1 + 1 - + direct_sql->tgt_default_file_length + 1 - + direct_sql->tgt_default_group_length + 1 - + direct_sql->tgt_dsn_length; + + (direct_sql->tgt_wrapper ? direct_sql->tgt_wrapper_length + 2 : 0) + + (direct_sql->tgt_host ? direct_sql->tgt_host_length + 2 : 0) + + 5 + 2 + + (direct_sql->tgt_socket ? direct_sql->tgt_socket_length + 2 : 0) + + (!tables_on_different_db_are_joinable && direct_sql->tgt_default_db_name ? + direct_sql->tgt_default_db_name_length + 2 : 0) + + (direct_sql->tgt_username ? direct_sql->tgt_username_length + 2 : 0) + + (direct_sql->tgt_password ? direct_sql->tgt_password_length + 2 : 0) + + (direct_sql->tgt_ssl_ca ? direct_sql->tgt_ssl_ca_length + 2 : 0) + + (direct_sql->tgt_ssl_capath ? direct_sql->tgt_ssl_capath_length + 2 : 0) + + (direct_sql->tgt_ssl_cert ? direct_sql->tgt_ssl_cert_length + 2 : 0) + + (direct_sql->tgt_ssl_cipher ? direct_sql->tgt_ssl_cipher_length + 2 : 0) + + (direct_sql->tgt_ssl_key ? direct_sql->tgt_ssl_key_length + 2 : 0) + + 1 + 2 + + (direct_sql->tgt_default_file ? direct_sql->tgt_default_file_length + 2 : 0) + + (direct_sql->tgt_default_group ? direct_sql->tgt_default_group_length + 2 : 0) + + (direct_sql->tgt_dsn ? direct_sql->tgt_dsn_length + 2 : 0); if (!(direct_sql->conn_key = (char *) spider_malloc(spider_current_trx, SPD_MID_UDF_DIRECT_SQL_CREATE_CONN_KEY_1, direct_sql->conn_key_length + 1, MYF(MY_WME | MY_ZEROFILL))) @@ -245,96 +245,36 @@ int spider_udf_direct_sql_create_conn_key( *direct_sql->conn_key = '0' + 48 - direct_sql->connection_channel; else *direct_sql->conn_key = '0' + direct_sql->connection_channel; - DBUG_PRINT("info",("spider tgt_wrapper=%s", direct_sql->tgt_wrapper)); - tmp_name = strmov(direct_sql->conn_key + 1, direct_sql->tgt_wrapper); - DBUG_PRINT("info",("spider tgt_host=%s", direct_sql->tgt_host)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_host); + int counter= 0; + tmp_name= direct_sql->conn_key + 1; + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_wrapper); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_host); my_sprintf(port_str, (port_str, "%05ld", direct_sql->tgt_port)); - DBUG_PRINT("info",("spider port_str=%s", port_str)); - tmp_name = strmov(tmp_name + 1, port_str); - if (direct_sql->tgt_socket) + spider_create_conn_key_add_one(&counter, &tmp_name, port_str); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_socket); + counter++; + if (!tables_on_different_db_are_joinable && direct_sql->tgt_default_db_name) { - DBUG_PRINT("info",("spider tgt_socket=%s", direct_sql->tgt_socket)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_socket); - } else + *tmp_name= (char) counter; + tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_db_name); tmp_name++; - if (!tables_on_different_db_are_joinable) - { - if (direct_sql->tgt_default_db_name) - { - DBUG_PRINT("info",("spider tgt_default_db_name=%s", - direct_sql->tgt_default_db_name)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_db_name); - } else - tmp_name++; } - if (direct_sql->tgt_username) - { - DBUG_PRINT("info",("spider tgt_username=%s", direct_sql->tgt_username)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_username); - } else - tmp_name++; - if (direct_sql->tgt_password) - { - DBUG_PRINT("info",("spider tgt_password=%s", direct_sql->tgt_password)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_password); - } else - tmp_name++; - if (direct_sql->tgt_ssl_ca) - { - DBUG_PRINT("info",("spider tgt_ssl_ca=%s", direct_sql->tgt_ssl_ca)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_ca); - } else - tmp_name++; - if (direct_sql->tgt_ssl_capath) - { - DBUG_PRINT("info",("spider tgt_ssl_capath=%s", - direct_sql->tgt_ssl_capath)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_capath); - } else - tmp_name++; - if (direct_sql->tgt_ssl_cert) - { - DBUG_PRINT("info",("spider tgt_ssl_cert=%s", direct_sql->tgt_ssl_cert)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_cert); - } else - tmp_name++; - if (direct_sql->tgt_ssl_cipher) - { - DBUG_PRINT("info",("spider tgt_ssl_cipher=%s", - direct_sql->tgt_ssl_cipher)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_cipher); - } else - tmp_name++; - if (direct_sql->tgt_ssl_key) - { - DBUG_PRINT("info",("spider tgt_ssl_key=%s", direct_sql->tgt_ssl_key)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_ssl_key); - } else - tmp_name++; - tmp_name++; - *tmp_name = '0' + ((char) direct_sql->tgt_ssl_vsc); - if (direct_sql->tgt_default_file) - { - DBUG_PRINT("info",("spider tgt_default_file=%s", - direct_sql->tgt_default_file)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_file); - } else - tmp_name++; - if (direct_sql->tgt_default_group) - { - DBUG_PRINT("info",("spider tgt_default_group=%s", - direct_sql->tgt_default_group)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_default_group); - } else - tmp_name++; - if (direct_sql->tgt_dsn) - { - DBUG_PRINT("info",("spider tgt_dsn=%s", - direct_sql->tgt_dsn)); - tmp_name = strmov(tmp_name + 1, direct_sql->tgt_dsn); - } else - tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_username); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_password); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_ca); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_capath); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_cert); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_cipher); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_ssl_key); + counter++; + *tmp_name= (char) counter; + tmp_name++; + *tmp_name = '0' + ((char) direct_sql->tgt_ssl_vsc); + tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_default_file); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_default_group); + spider_create_conn_key_add_one(&counter, &tmp_name, direct_sql->tgt_dsn); + tmp_name++; #ifdef SPIDER_HAS_HASH_VALUE_TYPE direct_sql->conn_key_hash_value = my_calc_hash(&spider_open_connections, (uchar*) direct_sql->conn_key, direct_sql->conn_key_length); @@ -350,7 +290,7 @@ static inline void spider_maybe_memcpy_string( uint src_len) { *dest_len= src_len; - if (src_len) + if (src) { *dest= tmp; memcpy(*dest, src, src_len); @@ -416,13 +356,12 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn( conn->conn_key_length = direct_sql->conn_key_length; conn->conn_key = tmp_name; memcpy(conn->conn_key, direct_sql->conn_key, direct_sql->conn_key_length); - conn->tgt_wrapper_length = direct_sql->tgt_wrapper_length; - conn->tgt_wrapper = tmp_wrapper; - memcpy(conn->tgt_wrapper, direct_sql->tgt_wrapper, - direct_sql->tgt_wrapper_length); - conn->tgt_host_length = direct_sql->tgt_host_length; - conn->tgt_host = tmp_host; - memcpy(conn->tgt_host, direct_sql->tgt_host, direct_sql->tgt_host_length); + spider_maybe_memcpy_string( + &conn->tgt_wrapper, direct_sql->tgt_wrapper, tmp_wrapper, + &conn->tgt_wrapper_length, direct_sql->tgt_wrapper_length); + spider_maybe_memcpy_string( + &conn->tgt_host, direct_sql->tgt_host, tmp_host, + &conn->tgt_host_length, direct_sql->tgt_host_length); conn->tgt_port = direct_sql->tgt_port; spider_maybe_memcpy_string( &conn->tgt_socket, direct_sql->tgt_socket, tmp_socket, diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index 5c1c0d27820..fc6f3dc23cb 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -999,12 +999,7 @@ int spider_create_string_list( tmp_ptr = str; while (*tmp_ptr == ' ') tmp_ptr++; - if (*tmp_ptr) - *list_length = 1; - else { - *string_list = NULL; - DBUG_RETURN(0); - } + *list_length= 1; bool last_esc_flg = FALSE; while (TRUE) @@ -3820,6 +3815,17 @@ void spider_print_keys( } #endif +void spider_create_conn_key_add_one(int* counter, char** target, char* src) +{ + (*counter)++; + if (src) + { + **target= (char) *counter; + *target= strmov(*target + 1, src); + (*target)++; + } +} + int spider_create_conn_keys( SPIDER_SHARE *share ) { @@ -3881,23 +3887,23 @@ int spider_create_conn_keys( } conn_keys_lengths[roop_count] = 1 - + share->tgt_wrappers_lengths[roop_count] + 1 - + share->tgt_hosts_lengths[roop_count] + 1 - + 5 + 1 - + share->tgt_sockets_lengths[roop_count] + 1 - + (tables_on_different_db_are_joinable ? - 0 : share->tgt_dbs_lengths[roop_count] + 1) - + share->tgt_usernames_lengths[roop_count] + 1 - + share->tgt_passwords_lengths[roop_count] + 1 - + share->tgt_ssl_cas_lengths[roop_count] + 1 - + share->tgt_ssl_capaths_lengths[roop_count] + 1 - + share->tgt_ssl_certs_lengths[roop_count] + 1 - + share->tgt_ssl_ciphers_lengths[roop_count] + 1 - + share->tgt_ssl_keys_lengths[roop_count] + 1 - + 1 + 1 - + share->tgt_default_files_lengths[roop_count] + 1 - + share->tgt_default_groups_lengths[roop_count] + 1 - + share->tgt_dsns_lengths[roop_count]; + + (share->tgt_wrappers[roop_count] ? share->tgt_wrappers_lengths[roop_count] + 2 : 0) + + (share->tgt_hosts[roop_count] ? share->tgt_hosts_lengths[roop_count] + 2 : 0) + + 5 + 2 + + (share->tgt_sockets[roop_count] ? share->tgt_sockets_lengths[roop_count] + 2 : 0) + + (!tables_on_different_db_are_joinable && share->tgt_dbs[roop_count] ? + share->tgt_dbs_lengths[roop_count] + 2 : 0) + + (share->tgt_usernames[roop_count] ? share->tgt_usernames_lengths[roop_count] + 2 : 0) + + (share->tgt_passwords[roop_count] ? share->tgt_passwords_lengths[roop_count] + 2 : 0) + + (share->tgt_ssl_cas[roop_count] ? share->tgt_ssl_cas_lengths[roop_count] + 2 : 0) + + (share->tgt_ssl_capaths[roop_count] ? share->tgt_ssl_capaths_lengths[roop_count] + 2 : 0) + + (share->tgt_ssl_certs[roop_count] ? share->tgt_ssl_certs_lengths[roop_count] + 2 : 0) + + (share->tgt_ssl_ciphers[roop_count] ? share->tgt_ssl_ciphers_lengths[roop_count] + 2 : 0) + + (share->tgt_ssl_keys[roop_count] ? share->tgt_ssl_keys_lengths[roop_count] + 2 : 0) + + 1 + 2 + + (share->tgt_default_files[roop_count] ? share->tgt_default_files_lengths[roop_count] + 2 : 0) + + (share->tgt_default_groups[roop_count] ? share->tgt_default_groups_lengths[roop_count] + 2 : 0) + + (share->tgt_dsns[roop_count] ? share->tgt_dsns_lengths[roop_count] + 2 : 0); share->conn_keys_charlen += conn_keys_lengths[roop_count] + 2; } if (!(share->conn_keys = (char **) @@ -3937,105 +3943,35 @@ int spider_create_conn_keys( share->conn_keys[roop_count] = tmp_name; *tmp_name = '0'; - DBUG_PRINT("info",("spider tgt_wrappers[%d]=%s", roop_count, - share->tgt_wrappers[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_wrappers[roop_count]); - DBUG_PRINT("info",("spider tgt_hosts[%d]=%s", roop_count, - share->tgt_hosts[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_hosts[roop_count]); + tmp_name++; + int counter= 0; + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_wrappers[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_hosts[roop_count]); my_sprintf(port_str, (port_str, "%05ld", share->tgt_ports[roop_count])); - DBUG_PRINT("info",("spider port_str=%s", port_str)); - tmp_name = strmov(tmp_name + 1, port_str); - if (share->tgt_sockets[roop_count]) + spider_create_conn_key_add_one(&counter, &tmp_name, port_str); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_sockets[roop_count]); + counter++; + if (!tables_on_different_db_are_joinable && share->tgt_dbs[roop_count]) { - DBUG_PRINT("info",("spider tgt_sockets[%d]=%s", roop_count, - share->tgt_sockets[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_sockets[roop_count]); - } else + *tmp_name= (char) counter; + tmp_name = strmov(tmp_name + 1, share->tgt_dbs[roop_count]); tmp_name++; - if (!tables_on_different_db_are_joinable) - { - if (share->tgt_dbs[roop_count]) - { - DBUG_PRINT("info",("spider tgt_dbs[%d]=%s", roop_count, - share->tgt_dbs[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_dbs[roop_count]); - } else - tmp_name++; } - if (share->tgt_usernames[roop_count]) - { - DBUG_PRINT("info",("spider tgt_usernames[%d]=%s", roop_count, - share->tgt_usernames[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_usernames[roop_count]); - } else - tmp_name++; - if (share->tgt_passwords[roop_count]) - { - DBUG_PRINT("info",("spider tgt_passwords[%d]=%s", roop_count, - share->tgt_passwords[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_passwords[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_cas[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_cas[%d]=%s", roop_count, - share->tgt_ssl_cas[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_cas[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_capaths[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_capaths[%d]=%s", roop_count, - share->tgt_ssl_capaths[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_capaths[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_certs[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_certs[%d]=%s", roop_count, - share->tgt_ssl_certs[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_certs[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_ciphers[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_ciphers[%d]=%s", roop_count, - share->tgt_ssl_ciphers[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_ciphers[roop_count]); - } else - tmp_name++; - if (share->tgt_ssl_keys[roop_count]) - { - DBUG_PRINT("info",("spider tgt_ssl_keys[%d]=%s", roop_count, - share->tgt_ssl_keys[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_ssl_keys[roop_count]); - } else - tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_usernames[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_passwords[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_cas[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_capaths[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_certs[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_ciphers[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_ssl_keys[roop_count]); + counter++; + *tmp_name= (char) counter; tmp_name++; *tmp_name = '0' + ((char) share->tgt_ssl_vscs[roop_count]); - if (share->tgt_default_files[roop_count]) - { - DBUG_PRINT("info",("spider tgt_default_files[%d]=%s", roop_count, - share->tgt_default_files[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_default_files[roop_count]); - } else - tmp_name++; - if (share->tgt_default_groups[roop_count]) - { - DBUG_PRINT("info",("spider tgt_default_groups[%d]=%s", roop_count, - share->tgt_default_groups[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_default_groups[roop_count]); - } else - tmp_name++; - if (share->tgt_dsns[roop_count]) - { - DBUG_PRINT("info",("spider tgt_dsns[%d]=%s", roop_count, - share->tgt_dsns[roop_count])); - tmp_name = strmov(tmp_name + 1, share->tgt_dsns[roop_count]); - } else - tmp_name++; tmp_name++; + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_default_files[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_default_groups[roop_count]); + spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_dsns[roop_count]); tmp_name++; #ifdef SPIDER_HAS_HASH_VALUE_TYPE share->conn_keys_hash_value[roop_count] = my_calc_hash( diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h index 8ab00212091..b444ba2d3d9 100644 --- a/storage/spider/spd_table.h +++ b/storage/spider/spd_table.h @@ -169,6 +169,8 @@ void spider_print_keys( ); #endif +void spider_create_conn_key_add_one(int* counter, char** target, char* src); + int spider_create_conn_keys( SPIDER_SHARE *share ); From 8416fd323cf69f8fc1d7dcd5bd5e54e504e7f8b9 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 8 Jul 2024 16:14:44 +0800 Subject: [PATCH 38/60] MDEV-32627 [fixup] Spider: Fix conn key length To avoid off-by-one in spider_get_share. And document conn key and conn key length. --- storage/spider/spd_table.cc | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc index fc6f3dc23cb..461e47dd012 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc @@ -3826,6 +3826,33 @@ void spider_create_conn_key_add_one(int* counter, char** target, char* src) } } +/* + The conn keys are strings of the following format: + + 0 \ \0 \ \0 ... \ \0 + + Where idx1, idx2, etc. are the index of first, second, etc. options + where the value is specified. We have the wrapper as the first + option, host as the second, port as the third, socket as the fourth, + and so on (see below for the order of all options). So here would be + a conn key where only the host and the port are specified and + nothing else: + + 0\002localhost\000\00303306\000 + + And it has length 1 + 1 + 9 + 1 + 1 + 5 + 1 = 19. + + In case of HA, say we have another link with the same options + specified except that the port is 3307, then we place an extra NUL + before placing the next conn_key: + + 0\002localhost\000\00303306\000\0000\002localhost\000\00303307\000 + ^ ^ + conn_keys[0] conn_keys[1] + + Thus the total number of chars (share->conn_keys_charlen) needed is + (19 + 1) * 2 = 40 +*/ int spider_create_conn_keys( SPIDER_SHARE *share ) { @@ -3904,7 +3931,7 @@ int spider_create_conn_keys( + (share->tgt_default_files[roop_count] ? share->tgt_default_files_lengths[roop_count] + 2 : 0) + (share->tgt_default_groups[roop_count] ? share->tgt_default_groups_lengths[roop_count] + 2 : 0) + (share->tgt_dsns[roop_count] ? share->tgt_dsns_lengths[roop_count] + 2 : 0); - share->conn_keys_charlen += conn_keys_lengths[roop_count] + 2; + share->conn_keys_charlen += conn_keys_lengths[roop_count] + 1; } if (!(share->conn_keys = (char **) spider_bulk_alloc_mem(spider_current_trx, SPD_MID_CREATE_CONN_KEYS_1, @@ -3973,6 +4000,7 @@ int spider_create_conn_keys( spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_default_groups[roop_count]); spider_create_conn_key_add_one(&counter, &tmp_name, share->tgt_dsns[roop_count]); tmp_name++; + tmp_name++; #ifdef SPIDER_HAS_HASH_VALUE_TYPE share->conn_keys_hash_value[roop_count] = my_calc_hash( &spider_open_connections, (uchar*) share->conn_keys[roop_count], From 03a350378ad627d509a31a788896067b02f80e53 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Wed, 17 Jul 2024 08:54:28 +0800 Subject: [PATCH 39/60] MDEV-30408 Reset explicit_limit in exists2in Item_exists_subselect::fix_length_and_dec() sets explicit_limit to 1. In the exists2in transformation it resets select_limit to NULL. For consistency we should reset explicity_limit too. This fixes a bug where spider table returns wrong results for queries that gets through exists2in transformation when semijoin is off. --- sql/item_subselect.cc | 1 + .../spider/bugfix/r/mdev_30408.result | 30 +++++++++++++++++++ .../spider/bugfix/t/mdev_30408.test | 26 ++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result create mode 100644 storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index 7f6e0fbfafc..6dc4cbe16ec 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -3186,6 +3186,7 @@ bool Item_exists_subselect::exists2in_processor(void *opt_arg) set_exists_transformed(); first_select->select_limit= NULL; + first_select->explicit_limit= FALSE; if (!(in_subs= new (thd->mem_root) Item_in_subselect(thd, left_exp, first_select))) { diff --git a/storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result b/storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result new file mode 100644 index 00000000000..aa44e683102 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/r/mdev_30408.result @@ -0,0 +1,30 @@ +for master_1 +for child2 +for child3 +set @@optimizer_switch="semijoin=off"; +set spider_same_server_link= 1; +CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); +create table ten(a int primary key); +insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, b int); +insert into t2 select a,a from ten; +create table t1 (a int, b int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +select a.a, a.b from t1 a where exists (select * from t1 b where b.b = a.b); +a b +0 0 +1 1 +2 2 +3 3 +4 4 +5 5 +6 6 +7 7 +8 8 +9 9 +drop table ten, t1, t2; +drop server srv; +for master_1 +for child2 +for child3 diff --git a/storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test b/storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test new file mode 100644 index 00000000000..8f76c1209b6 --- /dev/null +++ b/storage/spider/mysql-test/spider/bugfix/t/mdev_30408.test @@ -0,0 +1,26 @@ +--disable_query_log +--disable_result_log +--source ../../t/test_init.inc +--enable_result_log +--enable_query_log + +set @@optimizer_switch="semijoin=off"; +set spider_same_server_link= 1; +evalp CREATE SERVER srv FOREIGN DATA WRAPPER mysql +OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root'); + +create table ten(a int primary key); +insert into ten values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t2 (a int, b int); +insert into t2 select a,a from ten; +create table t1 (a int, b int) ENGINE=Spider +COMMENT='WRAPPER "mysql", srv "srv",TABLE "t2"'; +select a.a, a.b from t1 a where exists (select * from t1 b where b.b = a.b); +drop table ten, t1, t2; +drop server srv; + +--disable_query_log +--disable_result_log +--source ../../t/test_deinit.inc +--enable_result_log +--enable_query_log From 49dff5a4b62109ba38421e34cf2944ad0fc00a76 Mon Sep 17 00:00:00 2001 From: PinkFreud Date: Thu, 7 Mar 2024 19:09:39 -0500 Subject: [PATCH 40/60] MDEV-34604 mytop - fix specifying filters in .mytop Specifying filters (filter_status, filter_user, etc) in the mytop config previously wouldn't work, because any filter specified here was added to the config hash as a literal string. This change fixes that - if filter_* is defined in the config and matches an existing filter_* key, then run the value through StringOrRegex() and assign to the config hash. --- scripts/mytop.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/mytop.sh b/scripts/mytop.sh index 65bfb8c976e..e5d926ef616 100644 --- a/scripts/mytop.sh +++ b/scripts/mytop.sh @@ -147,7 +147,12 @@ if (-e $config) if (/(\S+)\s*=\s*(.*\S)/) { - $config{lc $1} = $2 if exists $config{lc $1}; + my ($k, $v) = ($1, $2); + if ($k =~ /^filter_/i) { + $config{lc $k} = StringOrRegex($v) if exists $config{lc $k}; + } else { + $config{lc $k} = $v if exists $config{lc $k}; + } } } close CFG; From 383d53edbcaee7762e5e90473cda361b9c9e29d3 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Tue, 4 Jun 2024 17:38:14 +0900 Subject: [PATCH 41/60] MDEV-21166 Add Mroonga initialized check to Mroonga UDFs Mroonga UDFs can't be used without loading Mroonga. --- storage/mroonga/ha_mroonga.cpp | 6 ++++ storage/mroonga/mrn.hpp | 29 +++++++++++++++++++ storage/mroonga/sources.am | 1 + storage/mroonga/udf/mrn_udf_command.cpp | 10 +++++++ storage/mroonga/udf/mrn_udf_escape.cpp | 10 +++++++ .../mroonga/udf/mrn_udf_highlight_html.cpp | 9 ++++++ .../udf/mrn_udf_last_insert_grn_id.cpp | 8 +++++ storage/mroonga/udf/mrn_udf_normalize.cpp | 10 +++++++ storage/mroonga/udf/mrn_udf_query_expand.cpp | 10 +++++++ storage/mroonga/udf/mrn_udf_snippet.cpp | 8 +++++ storage/mroonga/udf/mrn_udf_snippet_html.cpp | 9 ++++++ 11 files changed, 110 insertions(+) create mode 100644 storage/mroonga/mrn.hpp diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp index 2077b0b8863..75f2387beab 100644 --- a/storage/mroonga/ha_mroonga.cpp +++ b/storage/mroonga/ha_mroonga.cpp @@ -20,6 +20,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include "mrn.hpp" #include "mrn_mysql.h" #include "mrn_mysql_compat.h" @@ -296,6 +297,7 @@ static PSI_mutex_info mrn_mutexes[] = #endif /* global variables */ +bool mrn_initialized = false; handlerton *mrn_hton_ptr; HASH mrn_open_tables; mysql_mutex_t mrn_open_tables_mutex; @@ -1957,6 +1959,8 @@ static int mrn_init(void *p) mrn::PathMapper::default_mysql_data_home_path = mysql_data_home; #endif + mrn_initialized = true; + return 0; error_allocated_long_term_share_hash_init: @@ -2051,6 +2055,8 @@ static int mrn_deinit(void *p) mysql_mutex_destroy(&mrn_query_log_mutex); mysql_mutex_destroy(&mrn_log_mutex); + mrn_initialized = false; + return 0; } diff --git a/storage/mroonga/mrn.hpp b/storage/mroonga/mrn.hpp new file mode 100644 index 00000000000..41d3a5df4be --- /dev/null +++ b/storage/mroonga/mrn.hpp @@ -0,0 +1,29 @@ +/* + Copyright (C) 2024 Sutou Kouhei + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +extern bool mrn_initialized; + +#ifdef __cplusplus +} +#endif diff --git a/storage/mroonga/sources.am b/storage/mroonga/sources.am index c7ddcfa5acc..20ab3e6eb7f 100644 --- a/storage/mroonga/sources.am +++ b/storage/mroonga/sources.am @@ -1,4 +1,5 @@ sources = \ + mrn.hpp \ mrn_macro.hpp \ mrn_constants.hpp \ ha_mroonga.cpp \ diff --git a/storage/mroonga/udf/mrn_udf_command.cpp b/storage/mroonga/udf/mrn_udf_command.cpp index 10123c6252d..46911c56e25 100644 --- a/storage/mroonga/udf/mrn_udf_command.cpp +++ b/storage/mroonga/udf/mrn_udf_command.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -51,6 +52,15 @@ MRN_API my_bool mroonga_command_init(UDF_INIT *init, UDF_ARGS *args, CommandInfo *info = NULL; init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_command(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count == 0) { grn_snprintf(message, MYSQL_ERRMSG_SIZE, diff --git a/storage/mroonga/udf/mrn_udf_escape.cpp b/storage/mroonga/udf/mrn_udf_escape.cpp index 72182790fea..55a3639565e 100644 --- a/storage/mroonga/udf/mrn_udf_escape.cpp +++ b/storage/mroonga/udf/mrn_udf_escape.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -44,6 +45,15 @@ MRN_API my_bool mroonga_escape_init(UDF_INIT *init, UDF_ARGS *args, bool script_mode = false; init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_escape(): Mroonga isn't initialized"); + goto error; + } + if (!(1 <= args->arg_count && args->arg_count <= 2)) { snprintf(message, MYSQL_ERRMSG_SIZE, diff --git a/storage/mroonga/udf/mrn_udf_highlight_html.cpp b/storage/mroonga/udf/mrn_udf_highlight_html.cpp index 12f54a7d16a..d986777caff 100644 --- a/storage/mroonga/udf/mrn_udf_highlight_html.cpp +++ b/storage/mroonga/udf/mrn_udf_highlight_html.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -211,6 +212,14 @@ MRN_API my_bool mroonga_highlight_html_init(UDF_INIT *init, init->ptr = NULL; + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_highlight_html(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count < 1) { snprintf(message, MYSQL_ERRMSG_SIZE, "mroonga_highlight_html(): wrong number of arguments: %u for 1+", diff --git a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp index 46176bc8641..f40dcf0055f 100644 --- a/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp +++ b/storage/mroonga/udf/mrn_udf_last_insert_grn_id.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -29,6 +30,13 @@ MRN_BEGIN_DECLS MRN_API my_bool last_insert_grn_id_init(UDF_INIT *init, UDF_ARGS *args, char *message) { + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "last_insert_grn_id(): Mroonga isn't initialized"); + return 1; + } if (args->arg_count != 0) { strcpy(message, "last_insert_grn_id must not have arguments"); return 1; diff --git a/storage/mroonga/udf/mrn_udf_normalize.cpp b/storage/mroonga/udf/mrn_udf_normalize.cpp index 303623516f1..0ebee2ff608 100644 --- a/storage/mroonga/udf/mrn_udf_normalize.cpp +++ b/storage/mroonga/udf/mrn_udf_normalize.cpp @@ -18,6 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -53,6 +54,15 @@ MRN_API my_bool mroonga_normalize_init(UDF_INIT *init, UDF_ARGS *args, String *result_str = NULL; init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_normalize(): Mroonga isn't initialized"); + goto error; + } + if (!(1 <= args->arg_count && args->arg_count <= 2)) { sprintf(message, "mroonga_normalize(): Incorrect number of arguments: %u for 1..2", diff --git a/storage/mroonga/udf/mrn_udf_query_expand.cpp b/storage/mroonga/udf/mrn_udf_query_expand.cpp index 03bef3215c7..76a5dad53b4 100644 --- a/storage/mroonga/udf/mrn_udf_query_expand.cpp +++ b/storage/mroonga/udf/mrn_udf_query_expand.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -74,6 +75,15 @@ MRN_API my_bool mroonga_query_expand_init(UDF_INIT *init, MRN_DBUG_ENTER_FUNCTION(); init->ptr = NULL; + + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_query_expand(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count != 4) { sprintf(message, "mroonga_query_expand(): wrong number of arguments: %u for 4", diff --git a/storage/mroonga/udf/mrn_udf_snippet.cpp b/storage/mroonga/udf/mrn_udf_snippet.cpp index a4b37d03a4f..45e539f0093 100644 --- a/storage/mroonga/udf/mrn_udf_snippet.cpp +++ b/storage/mroonga/udf/mrn_udf_snippet.cpp @@ -19,6 +19,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -135,6 +136,13 @@ MRN_API my_bool mroonga_snippet_init(UDF_INIT *init, UDF_ARGS *args, char *messa st_mrn_snip_info *snip_info = NULL; bool can_open_snippet = TRUE; init->ptr = NULL; + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_snippet(): Mroonga isn't initialized"); + goto error; + } if (args->arg_count < 11 || (args->arg_count - 11) % 3) { sprintf(message, "Incorrect number of arguments for mroonga_snippet(): %u", diff --git a/storage/mroonga/udf/mrn_udf_snippet_html.cpp b/storage/mroonga/udf/mrn_udf_snippet_html.cpp index 311c91bf665..ba0cdadda99 100644 --- a/storage/mroonga/udf/mrn_udf_snippet_html.cpp +++ b/storage/mroonga/udf/mrn_udf_snippet_html.cpp @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ +#include #include #include #include @@ -194,6 +195,14 @@ MRN_API my_bool mroonga_snippet_html_init(UDF_INIT *init, init->ptr = NULL; + if (!mrn_initialized) + { + snprintf(message, + MYSQL_ERRMSG_SIZE, + "mroonga_snippet_html(): Mroonga isn't initialized"); + goto error; + } + if (args->arg_count < 1) { snprintf(message, MYSQL_ERRMSG_SIZE, "mroonga_snippet_html(): wrong number of arguments: %u for 1+", From b777b749ad57b11f3e0f0adc96ce06e50e704d23 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 17 Jul 2024 08:39:43 +0400 Subject: [PATCH 42/60] MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number This patch fixes two problems: - The code inside my_strtod_int() in strings/dtoa.c could test the byte behind the end of the string when processing the mantissa. Rewriting the code to avoid this. - The code in test_if_number() in sql/sql_analyse.cc called my_atof() which is unsafe and makes the called my_strtod_int() look behind the end of the string if the input string is not 0-terminated. Fixing test_if_number() to use my_strtod() instead, passing the correct end pointer. --- mysql-test/main/func_analyse.result | 19 +++++++++++++++++++ mysql-test/main/func_analyse.test | 20 ++++++++++++++++++++ mysql-test/main/type_num_innodb.result | 24 ++++++++++++++++++++++++ mysql-test/main/type_num_innodb.test | 19 +++++++++++++++++++ sql/sql_analyse.cc | 4 +++- strings/dtoa.c | 18 +++++++++--------- 6 files changed, 94 insertions(+), 10 deletions(-) diff --git a/mysql-test/main/func_analyse.result b/mysql-test/main/func_analyse.result index 1cb9e3c9ad8..2c7ec0b131e 100644 --- a/mysql-test/main/func_analyse.result +++ b/mysql-test/main/func_analyse.result @@ -222,3 +222,22 @@ DROP TABLE t1; # # End of 10.4 tests # +# +# Start of 10.5 tests +# +# +# MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +# +SET sql_mode=''; +CREATE TABLE t1 (c CHAR(10) KEY); +INSERT INTO t1 VALUES (1.755555555); +Warnings: +Warning 1265 Data truncated for column 'c' at row 1 +SELECT * FROM t1 PROCEDURE ANALYSE(); +Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype +test.t1.c 1.75555555 1.75555555 10 10 0 0 10.0000 NULL ENUM('1.75555555') NOT NULL +DROP TABLE t1; +SET sql_mode=DEFAULT; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/func_analyse.test b/mysql-test/main/func_analyse.test index 3c8be90d6e2..fb243c5a31c 100644 --- a/mysql-test/main/func_analyse.test +++ b/mysql-test/main/func_analyse.test @@ -230,3 +230,23 @@ DROP TABLE t1; --echo # --echo # End of 10.4 tests --echo # + + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +--echo # + +SET sql_mode=''; +CREATE TABLE t1 (c CHAR(10) KEY); +INSERT INTO t1 VALUES (1.755555555); +SELECT * FROM t1 PROCEDURE ANALYSE(); +DROP TABLE t1; +SET sql_mode=DEFAULT; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/mysql-test/main/type_num_innodb.result b/mysql-test/main/type_num_innodb.result index 92dc705de90..74396081891 100644 --- a/mysql-test/main/type_num_innodb.result +++ b/mysql-test/main/type_num_innodb.result @@ -88,3 +88,27 @@ DROP TABLE t1,t2; # # End of 10.2 tests # +# +# Start of 10.5 tests +# +# +# MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +# +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('0.0e'),('0.0e+0'); +SELECT * FROM t1 WHERE COALESCE(c)=0.0; +c +0.0e +0.0e+0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0.0e' +SELECT * FROM t1 WHERE COALESCE(c)=0.0e0; +c +0.0e +0.0e+0 +Warnings: +Warning 1292 Truncated incorrect DOUBLE value: '0.0e' +DROP TABLE t1; +# +# End of 10.5 tests +# diff --git a/mysql-test/main/type_num_innodb.test b/mysql-test/main/type_num_innodb.test index 04bdd4c63b0..57bb3d178f5 100644 --- a/mysql-test/main/type_num_innodb.test +++ b/mysql-test/main/type_num_innodb.test @@ -39,3 +39,22 @@ DROP TABLE t1,t2; --echo # --echo # End of 10.2 tests --echo # + + +--echo # +--echo # Start of 10.5 tests +--echo # + +--echo # +--echo # MDEV-28345 ASAN: use-after-poison or unknown-crash in my_strtod_int from charset_info_st::strntod or test_if_number +--echo # + +CREATE TABLE t1 (c BLOB) ENGINE=InnoDB; +INSERT INTO t1 VALUES ('0.0e'),('0.0e+0'); +SELECT * FROM t1 WHERE COALESCE(c)=0.0; +SELECT * FROM t1 WHERE COALESCE(c)=0.0e0; +DROP TABLE t1; + +--echo # +--echo # End of 10.5 tests +--echo # diff --git a/sql/sql_analyse.cc b/sql/sql_analyse.cc index 8e833035b96..8dfa1c06d7f 100644 --- a/sql/sql_analyse.cc +++ b/sql/sql_analyse.cc @@ -258,7 +258,9 @@ bool test_if_number(NUM_INFO *info, const char *str, uint str_len) info->decimals++; if (str == end) { - info->dval = my_atof(begin); + int error; + const char *end2= end; + info->dval= my_strtod(begin, (char **) &end2, &error); DBUG_RETURN(1); } } diff --git a/strings/dtoa.c b/strings/dtoa.c index 9bdeeacf574..21eb95479da 100644 --- a/strings/dtoa.c +++ b/strings/dtoa.c @@ -1465,22 +1465,22 @@ static double my_strtod_int(const char *s00, char **se, int *error, char *buf, s s00= s; esign= 0; if (++s < end) - switch (c= *s) { + switch (*s) { case '-': esign= 1; /* fall through */ - case '+': c= *++s; + case '+': s++; } - if (s < end && c >= '0' && c <= '9') + if (s < end && *s >= '0' && *s <= '9') { - while (s < end && c == '0') - c= *++s; - if (s < end && c > '0' && c <= '9') { - L= c - '0'; + while (s < end && *s == '0') + s++; + if (s < end && *s > '0' && *s <= '9') { + L= *s - '0'; s1= s; - while (++s < end && (c= *s) >= '0' && c <= '9') + while (++s < end && *s >= '0' && *s <= '9') { if (L < 19999) - L= 10*L + c - '0'; + L= 10*L + *s - '0'; } if (s - s1 > 8 || L > 19999) /* Avoid confusion from exponents From 7478fabcff127e52282e211632938067f75213bb Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 17 Jul 2024 09:02:58 +0200 Subject: [PATCH 43/60] new PCRE2-10.44 --- cmake/pcre.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/pcre.cmake b/cmake/pcre.cmake index 70ea92f1746..89f928f684a 100644 --- a/cmake/pcre.cmake +++ b/cmake/pcre.cmake @@ -54,8 +54,8 @@ MACRO(BUNDLE_PCRE2) ExternalProject_Add( pcre2 PREFIX "${dir}" - URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.43/pcre2-10.43.zip" - URL_MD5 b58f050f2fdd6f2ca5774a2975377a85 + URL "https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.zip" + URL_MD5 dfab8313154b3377a6959c3b6377841e INSTALL_COMMAND "" CMAKE_ARGS "-DCMAKE_WARN_DEPRECATED=FALSE" From e7c2e25ba82cafcacecac8c2927ab5d1f7d3c305 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 17 Jul 2024 13:08:55 +0200 Subject: [PATCH 44/60] new CC version --- libmariadb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb b/libmariadb index 51b2a621b3d..6dfc071d356 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit 51b2a621b3d5ef949098dcb7912048caaf878793 +Subproject commit 6dfc071d3567eeace321f022dc0ed311d02c7ed7 From 008bddaa6c81fe30071475c24253950a4144863e Mon Sep 17 00:00:00 2001 From: Robin Newhouse Date: Mon, 3 Jun 2024 19:43:21 +0000 Subject: [PATCH 45/60] GitLab CI Upgrade CentOS 8 to CentOS 9 build > After May 31, 2024, CentOS Stream 8 will be archived and no further updates will be provided. [1] CentOS Stream 8 is now EOL and should be updated to using CentOS Stream 9 for compatibility testing in GitLab CI. [1] https://blog.centos.org/2023/04/end-dates-are-coming-for-centos-stream-8-and-centos-linux-7/ https://www.centos.org/centos-linux-eol/ All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services. --- .gitlab-ci.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7c6f5c2e9ed..46c7ed078f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -44,7 +44,7 @@ variables: # Major version dictates which branches share the same ccache. E.g. 10.6-abc # and 10.6-xyz will have the same cache. MARIADB_MAJOR_VERSION: "10.5" - # NOTE! Currently ccache is only used on the Centos8 build. As each job has + # NOTE! Currently ccache is only used on the Centos 9 build. As each job has # sufficiently different environments they are unable to benefit from each # other's ccaches. As each build generates about 1 GB of ccache, having # multiple caches would quickly consume all free storage on Gitlab-CI and @@ -53,7 +53,7 @@ variables: # cache:policy are not flexible enough to have a system where the cache is # uploaded only once a week and not on every build. Having ccache on at least # one build still helps ensure that ccache compatibility is at least tested - # and if the Centos 8 build is always significantly faster than all other + # and if the Centos 9 build is always significantly faster than all other # builds (e.g. on self-hosted Gitlab instances) then users would at least be # able to discover it. # @@ -209,26 +209,20 @@ fedora-sanitizer: matrix: - SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES] -centos8: +centos9: stage: build - image: quay.io/centos/centos:stream8 # CentOS 8 is deprecated, use this Stream8 instead + image: quay.io/centos/centos:stream9 # CentOS 9 is deprecated, use this Stream9 instead variables: GIT_STRATEGY: fetch GIT_SUBMODULE_STRATEGY: normal script: - - yum install -y yum-utils rpm-build openssl-devel pcre2-devel - - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm - # dnf --enablerepo=powertools install Judy-devel #--> not found - - dnf config-manager --set-enabled powertools - # Error: - # Problem: conflicting requests - # - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.i686 is filtered out by modular filtering - # - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64 is filtered out by modular filtering - # Solution: install Judy-devel directly from downloaded rpm file: - - yum install -y http://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64.rpm - # Use eatmydata to speed up build - - yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm - - yum install -y ccache # From EPEL + - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm + - yum install -y yum-utils rpm-build openssl-devel libeatmydata ccache + # Install missing dependencies + - yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/Judy-devel-1.0.5-28.el9.x86_64.rpm + - yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/bison-devel-3.7.4-5.el9.x86_64.rpm + - yum install -y https://mirror.stream.centos.org/9-stream/CRB/x86_64/os/Packages/multilib-rpm-config-1-19.el9.noarch.rpm + # Configure ccache - source /etc/profile.d/ccache.sh - export CCACHE_DIR="$(pwd)/.ccache"; ccache --zero-stats # This repository does not have any .spec files, so install dependencies based on CentOS spec file From 4a89f79b6aa05aed2ae39f0a3c968c4bb5196043 Mon Sep 17 00:00:00 2001 From: Souradeep Saha Date: Fri, 21 Jun 2024 17:17:47 +0000 Subject: [PATCH 46/60] Refactor import * with only required imports Import only the required functions instead of all the functions from the module to reduce the unnecessary functions in the namespace and prevent shadowing. Note: All code changes are non-functional. All new code of the whole pull request, including one or several files that are either new files or modified ones, are contributed under the BSD-new license. I am contributing on behalf of my employer Amazon Web Services, Inc. --- debian/additions/source_mariadb-10.5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/additions/source_mariadb-10.5.py b/debian/additions/source_mariadb-10.5.py index eac7a054b84..68a75c467d6 100644 --- a/debian/additions/source_mariadb-10.5.py +++ b/debian/additions/source_mariadb-10.5.py @@ -7,7 +7,7 @@ Author: Mathias Gug from __future__ import print_function, unicode_literals import os, os.path -from apport.hookutils import * +from apport.hookutils import path_to_key, read_file, attach_conffiles, attach_mac_events, attach_file def _add_my_conf_files(report, filename): key = 'MySQLConf' + path_to_key(filename) From 1f28350b59e022b4e968dd880d8f2de2def9f5f5 Mon Sep 17 00:00:00 2001 From: Rucha Deodhar Date: Tue, 9 Jul 2024 23:44:44 +0530 Subject: [PATCH 47/60] MDEV-32456: incorrect result of gis function in view protocol There are 3 diff in result: 1) NULL value from SELECT Due to incorrect truncating of the hex value, incorrect value is written instead of original value to the view frm. This results in reading incorrect value from frm, so eventual result is NULL. 2) 'Name_exp1' in column name (in gis.test) This was because the identifier in SELECT is longer than 64 characters, so 'Name_exp1' alias is also written to the view frm. 3)diff in explain extended This was because the query plan for view protocol doesn't contain database name. As a fix, disable view protocol for that particular query. --- mysql-test/include/gis_generic.inc | 2 ++ mysql-test/suite/innodb_gis/r/1.result | 12 ++++++------ mysql-test/suite/innodb_gis/r/gis.result | 12 ++++++------ mysql-test/suite/innodb_gis/t/1.test | 11 ++++++++--- mysql-test/suite/innodb_gis/t/geometry.test | 3 +++ mysql-test/suite/innodb_gis/t/gis.test | 11 ++++++++--- sql/item.cc | 4 +--- 7 files changed, 34 insertions(+), 21 deletions(-) diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index 8209240614e..80fdb6f324e 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -142,11 +142,13 @@ Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--disable_view_protocol explain extended SELECT g1.fid as first, g2.fid as second, Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o, Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t, Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result index 6db6407b5db..909051cc54e 100644 --- a/mysql-test/suite/innodb_gis/r/1.result +++ b/mysql-test/suite/innodb_gis/r/1.result @@ -433,8 +433,8 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) NO NULL DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); -ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; +val POINT(1 4) explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); id select_type table type possible_keys key key_len ref rows filtered Extra @@ -668,11 +668,11 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (ST_pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -(ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +val POINT(10 10) -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); -(ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +val POINT(10 10) create table t1 (g GEOMETRY); select * from t1; diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result index 2a31a6c5317..e7f735b5094 100644 --- a/mysql-test/suite/innodb_gis/r/gis.result +++ b/mysql-test/suite/innodb_gis/r/gis.result @@ -433,8 +433,8 @@ gc geometrycollection YES NULL gm geometry YES NULL fid int(11) NO NULL DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); -ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; +val POINT(1 4) explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); id select_type table type possible_keys key key_len ref rows filtered Extra @@ -668,11 +668,11 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (ST_pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -(ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +val POINT(10 10) -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); -(ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +val POINT(10 10) create table t1 (g GEOMETRY); select * from t1; diff --git a/mysql-test/suite/innodb_gis/t/1.test b/mysql-test/suite/innodb_gis/t/1.test index f08fdaddbda..3a5103860e1 100644 --- a/mysql-test/suite/innodb_gis/t/1.test +++ b/mysql-test/suite/innodb_gis/t/1.test @@ -136,17 +136,20 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; --replace_column 10 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; +--disable_view_protocol SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; + --replace_column 10 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -169,7 +172,7 @@ ALTER TABLE t1 ADD fid INT NOT NULL; SHOW FIELDS FROM t1; DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)')))); SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); @@ -398,14 +401,16 @@ insert into t1 values (ST_pointfromtext('point(1,1)')); drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +--disable_view_protocol --enable_metadata create table t1 (g GEOMETRY); select * from t1; select ST_asbinary(g) from t1; --disable_metadata +--enable_view_protocol drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, INDEX(b(5))); diff --git a/mysql-test/suite/innodb_gis/t/geometry.test b/mysql-test/suite/innodb_gis/t/geometry.test index 3efc664fbd2..0d9b445be67 100644 --- a/mysql-test/suite/innodb_gis/t/geometry.test +++ b/mysql-test/suite/innodb_gis/t/geometry.test @@ -623,17 +623,20 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; --replace_column 10 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; +--disable_view_protocol SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; + --replace_column 10 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol --echo # check support of Foreign Key constraint CREATE TABLE parent (id GEOMETRY NOT NULL,PRIMARY KEY (id(10))) ENGINE=INNODB; diff --git a/mysql-test/suite/innodb_gis/t/gis.test b/mysql-test/suite/innodb_gis/t/gis.test index 851e82308c6..ea9de7edfff 100644 --- a/mysql-test/suite/innodb_gis/t/gis.test +++ b/mysql-test/suite/innodb_gis/t/gis.test @@ -135,17 +135,20 @@ SELECT fid, ST_AsText(ST_GeometryN(g, 1)) from gis_geometrycollection; --replace_column 10 # explain extended SELECT fid, ST_AsText(ST_GeometryN(g, 2)) from gis_multi_point; +--disable_view_protocol SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; + --replace_column 10 # explain extended SELECT g1.fid as first, g2.fid as second, MBRWithin(g1.g, g2.g) as w, MBRContains(g1.g, g2.g) as c, MBROverlaps(g1.g, g2.g) as o, MBREquals(g1.g, g2.g) as e, MBRDisjoint(g1.g, g2.g) as d, ST_Touches(g1.g, g2.g) as t, MBRIntersects(g1.g, g2.g) as i, ST_Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; +--enable_view_protocol DROP TABLE gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; @@ -168,7 +171,7 @@ ALTER TABLE t1 ADD fid INT NOT NULL; SHOW FIELDS FROM t1; DROP TABLE t1; -SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); +SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))) AS val; explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_GeometryFromText('POINT(1 4)')))); explain extended SELECT ST_AsText(ST_GeometryFromWKB(ST_AsWKB(ST_PointFromText('POINT(1 4)')))); SELECT ST_SRID(ST_GeomFromText('LineString(1 1,2 2)',101)); @@ -393,14 +396,16 @@ insert into t1 values (ST_pointfromtext('point(1,1)')); drop table t1; -select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))); -select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))); +select (ST_asWKT(ST_geomfromwkb((0x000000000140240000000000004024000000000000)))) AS val; +select (ST_asWKT(ST_geomfromwkb((0x010100000000000000000024400000000000002440)))) AS val; +--disable_view_protocol --enable_metadata create table t1 (g GEOMETRY); select * from t1; select ST_asbinary(g) from t1; --disable_metadata +--enable_view_protocol drop table t1; create table t1 (a TEXT, b GEOMETRY NOT NULL, SPATIAL KEY(b)); diff --git a/sql/item.cc b/sql/item.cc index 063003ee6bf..9ba00944c85 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -7278,10 +7278,8 @@ void Item_hex_constant::hex_string_init(THD *thd, const char *str, size_t str_le void Item_hex_hybrid::print(String *str, enum_query_type query_type) { - uint32 len= MY_MIN(str_value.length(), sizeof(longlong)); - const char *ptr= str_value.ptr() + str_value.length() - len; str->append("0x"); - str->append_hex(ptr, len); + str->append_hex(str_value.ptr(), str_value.length()); } From 8ac30517af11cd40e6098e91e7f31268ef857b99 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 14 Jun 2024 17:23:55 +0200 Subject: [PATCH 48/60] MDEV-34384 restorecon call in RPM POSTIN script has hardcoded datadir path --- support-files/rpm/server-postin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support-files/rpm/server-postin.sh b/support-files/rpm/server-postin.sh index 525af219c9b..5a66381d593 100644 --- a/support-files/rpm/server-postin.sh +++ b/support-files/rpm/server-postin.sh @@ -71,7 +71,7 @@ if [ -x /usr/sbin/semodule ] ; then /usr/sbin/semodule -i /usr/share/mysql/policy/selinux/mariadb.pp fi -if [ -x /sbin/restorecon ] ; then +if [ -x /sbin/restorecon -a -d /var/lib/mysql ] ; then /sbin/restorecon -R /var/lib/mysql fi From dea5746de2e604bb1c15892d7f77593e6d7145a2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 16 Jun 2024 18:04:27 +0200 Subject: [PATCH 49/60] MDEV-32155 MariaDB Server crashes with ill-formed partitions for ALTER_PARTITION_ADMIN (CHECK/REPAIR/LOAD INDEX/CACHE INDEX/etc) partitioning marks affected partitions with PART_ADMIN state. The assumption is that the server will call a corresponding method of ha_partition which will reset the state back to PART_NORMAL. This assumption is invalid, the server is not required to do so, indeed, in CHECK ... FOR UPGRADE the server might decide early that the table is fine and won't call ha_partition::check(), leaving partitions in the wrong state. It will thus leak into the next statement confusing the engine about what it is doing (see ha_partition::create_handler_file()), causing a crash later. Let's force all partitions into PART_NORMAL state after the admin operation succeeded, in case it did so without consulting the engine. --- mysql-test/main/partition_key_cache.result | 1 - mysql-test/main/partition_key_cache.test | 4 ---- mysql-test/main/partition_mgm_err.result | 13 ++++++++++++- mysql-test/main/partition_mgm_err.test | 17 +++++++++++++---- sql/sql_admin.cc | 4 ++++ 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/mysql-test/main/partition_key_cache.result b/mysql-test/main/partition_key_cache.result index fae7639d9bb..94fa099447b 100644 --- a/mysql-test/main/partition_key_cache.result +++ b/mysql-test/main/partition_key_cache.result @@ -1,4 +1,3 @@ -DROP TABLE IF EXISTS t1, t2, v, x; # Actual test of key caches # Verifing that reads/writes use the key cache correctly SET @org_key_cache_buffer_size= @@global.default.key_buffer_size; diff --git a/mysql-test/main/partition_key_cache.test b/mysql-test/main/partition_key_cache.test index 365a571ae92..a4178d62d65 100644 --- a/mysql-test/main/partition_key_cache.test +++ b/mysql-test/main/partition_key_cache.test @@ -1,10 +1,6 @@ # Test of key cache with partitions --source include/have_partition.inc ---disable_warnings -DROP TABLE IF EXISTS t1, t2, v, x; ---enable_warnings - --echo # Actual test of key caches --echo # Verifing that reads/writes use the key cache correctly SET @org_key_cache_buffer_size= @@global.default.key_buffer_size; diff --git a/mysql-test/main/partition_mgm_err.result b/mysql-test/main/partition_mgm_err.result index 01adc4f5adf..2d523998985 100644 --- a/mysql-test/main/partition_mgm_err.result +++ b/mysql-test/main/partition_mgm_err.result @@ -1,4 +1,3 @@ -drop table if exists t1; CREATE TABLE t1 (a int, b int) PARTITION BY RANGE (a) (PARTITION x0 VALUES LESS THAN (2), @@ -158,3 +157,15 @@ PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), PARTITION p2 VALUES IN (2) (SUBPARTITION p1b) ); ERROR HY000: Duplicate partition name p1b +# End of 5.5 tests +# +# MDEV-32155 MariaDB Server crashes with ill-formed partitions +# +create table t1 (c1 set ( 'abc' ) binary unicode) partition by linear hash (c1 mod c1) partitions 10; +alter table t1 check partition all for upgrade; +Table Op Msg_type Msg_text +test.t1 check status OK +alter table t1 order by nonexistent; +ERROR 42S22: Unknown column 'nonexistent' in 'order clause' +drop table t1; +# End of 10.5 tests diff --git a/mysql-test/main/partition_mgm_err.test b/mysql-test/main/partition_mgm_err.test index 0987c427fc7..61cb82f0c7a 100644 --- a/mysql-test/main/partition_mgm_err.test +++ b/mysql-test/main/partition_mgm_err.test @@ -4,10 +4,6 @@ # -- source include/have_partition.inc ---disable_warnings -drop table if exists t1; ---enable_warnings - # # Try faulty DROP PARTITION and COALESCE PARTITION # @@ -223,3 +219,16 @@ SUBPARTITION BY KEY (s2) ( PARTITION p1 VALUES IN (0) (SUBPARTITION p1b), PARTITION p2 VALUES IN (2) (SUBPARTITION p1b) ); + +--echo # End of 5.5 tests + +--echo # +--echo # MDEV-32155 MariaDB Server crashes with ill-formed partitions +--echo # +create table t1 (c1 set ( 'abc' ) binary unicode) partition by linear hash (c1 mod c1) partitions 10; +alter table t1 check partition all for upgrade; +--error ER_BAD_FIELD_ERROR +alter table t1 order by nonexistent; +drop table t1; + +--echo # End of 10.5 tests diff --git a/sql/sql_admin.cc b/sql/sql_admin.cc index 3b1ee878b50..9e8d36c475b 100644 --- a/sql/sql_admin.cc +++ b/sql/sql_admin.cc @@ -875,6 +875,10 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, result_code = (table->table->file->*operator_func)(thd, check_opt); THD_STAGE_INFO(thd, stage_sending_data); DBUG_PRINT("admin", ("operator_func returned: %d", result_code)); +#ifdef WITH_PARTITION_STORAGE_ENGINE + if (lex->alter_info.partition_flags & ALTER_PARTITION_ADMIN) + set_part_state(&lex->alter_info, table->table->part_info, PART_NORMAL); +#endif } if (compl_result_code == HA_ADMIN_OK && collect_eis) From d60f5c11ea9008fa57444327526e3d2c8633ba06 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 14 Jun 2024 17:32:52 +0200 Subject: [PATCH 50/60] MDEV-34318 mariadb-dump SQL syntax error with MAX_STATEMENT_TIME against Percona MySQL server protect MariaDB conditional comments from a bug in Percona MySQL comment parser --- client/mysqldump.c | 4 +- mysql-test/main/column_compression.result | 288 ++++---- .../main/column_compression_parts.result | 14 +- .../main/mysqlbinlog_row_compressed.result | 26 +- .../main/mysqlbinlog_row_minimal.result | 34 +- .../main/mysqlbinlog_stmt_compressed.result | 26 +- .../binlog/r/binlog_mysqlbinlog_row.result | 666 +++++++++--------- .../r/binlog_mysqlbinlog_row_innodb.result | 76 +- .../r/binlog_mysqlbinlog_row_myisam.result | 76 +- .../r/binlog_mysqlbinlog_row_trans.result | 38 +- .../suite/binlog/r/binlog_row_annotate.result | 144 ++-- .../binlog/r/binlog_row_ctype_ucs.result | 22 +- .../r/binlog_row_mysqlbinlog_options.result | 52 +- .../binlog/r/binlog_stm_ctype_ucs.result | 22 +- mysql-test/suite/binlog/r/flashback.result | 18 +- .../binlog_row_annotate.result | 72 +- .../compat/oracle/r/column_compression.result | 250 +++---- .../rpl/r/rpl_blackhole_row_annotate.result | 44 +- sql/field.h | 4 +- sql/log_event_client.cc | 8 +- 20 files changed, 942 insertions(+), 942 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 1c9d92d6e09..867bb620b00 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -6951,11 +6951,11 @@ int main(int argc, char **argv) write_header(md_result_file, *argv); /* Set MAX_STATEMENT_TIME to 0 unless set in client */ - my_snprintf(query, sizeof(query), "/*!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time); + my_snprintf(query, sizeof(query), "/*M!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time); mysql_query(mysql, query); /* Set server side timeout between client commands to server compiled-in default */ - mysql_query(mysql, "/*!100100 SET WAIT_TIMEOUT=DEFAULT */"); + mysql_query(mysql, "/*M!100100 SET WAIT_TIMEOUT=DEFAULT */"); /* Check if the server support multi source */ if (mysql_get_server_version(mysql) >= 100000) diff --git a/mysql-test/main/column_compression.result b/mysql-test/main/column_compression.result index da6dfdc51f4..f7b02639af3 100644 --- a/mysql-test/main/column_compression.result +++ b/mysql-test/main/column_compression.result @@ -8,7 +8,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -44,7 +44,7 @@ ALTER TABLE t1 MODIFY COLUMN a BLOB COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -61,7 +61,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -69,7 +69,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -105,7 +105,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -223,7 +223,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -259,7 +259,7 @@ ALTER TABLE t1 MODIFY COLUMN a TEXT COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -276,7 +276,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -284,7 +284,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -320,7 +320,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -438,7 +438,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -474,7 +474,7 @@ ALTER TABLE t1 MODIFY COLUMN a VARBINARY(10000) COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -491,7 +491,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -499,7 +499,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -535,7 +535,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -653,7 +653,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -689,7 +689,7 @@ ALTER TABLE t1 MODIFY COLUMN a VARCHAR(10000) COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -706,7 +706,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -714,7 +714,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -750,7 +750,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10000) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10000) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -868,7 +868,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -904,7 +904,7 @@ ALTER TABLE t1 MODIFY COLUMN a TEXT COMPRESSED CHARSET ucs2; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -921,7 +921,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -929,7 +929,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -965,7 +965,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -1084,7 +1084,7 @@ ERROR HY000: Compressed column 'a' can't be used in key specification SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci # Make sure column was actually compressed INSERT INTO t1 VALUES(REPEAT('a', 1000)); @@ -1120,7 +1120,7 @@ ALTER TABLE t1 MODIFY COLUMN a BLOB COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -1137,7 +1137,7 @@ CREATE TABLE t2 LIKE t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t2; # Make sure implicit CREATE TABLE ... SELECT inherits compression @@ -1145,7 +1145,7 @@ CREATE TABLE t2 SELECT * FROM t1; SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t2; LEFT(a, 10) LENGTH(a) @@ -1181,7 +1181,7 @@ ALTER TABLE t1 ENGINE=InnoDB; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT LEFT(a, 10), LENGTH(a) FROM t1; LEFT(a, 10) LENGTH(a) @@ -1323,7 +1323,7 @@ LENGTH(a) SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ NOT NULL DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ NOT NULL DEFAULT '' ) ENGINE=CSV DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" DROP TABLE t1; @@ -1373,7 +1373,7 @@ CREATE TABLE t1(a VARCHAR(255) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(255) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(255) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SET column_compression_threshold=300; INSERT INTO t1 VALUES(REPEAT('a', 255)); @@ -1483,12 +1483,12 @@ CREATE OR REPLACE TABLE t1 (a VARCHAR(1000) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'; COLUMN_TYPE -varchar(1000) /*!100301 COMPRESSED*/ +varchar(1000) /*M!100301 COMPRESSED*/ DROP TABLE t1; # # MDEV-17363 - Compressed columns cannot be restored from dump @@ -1507,10 +1507,10 @@ d TINYTEXT COMPRESSED BINARY SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`)), - `b` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - `c` varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - `d` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`a`)), + `b` varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + `c` varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + `d` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1524,49 +1524,49 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1577,35 +1577,35 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1617,7 +1617,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED); @@ -1626,7 +1626,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED); @@ -1635,7 +1635,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1675,49 +1675,49 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1728,35 +1728,35 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1768,7 +1768,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED); @@ -1777,7 +1777,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED); @@ -1786,7 +1786,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1826,49 +1826,49 @@ CREATE TABLE t1 (a TEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1879,35 +1879,35 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT '' + `a` text /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1919,7 +1919,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT ASCII COMPRESSED); @@ -1928,7 +1928,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` text /*!100301 COMPRESSED*/ DEFAULT NULL + `a` text /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TEXT BYTE COMPRESSED); @@ -1937,7 +1937,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -1977,49 +1977,49 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2030,35 +2030,35 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2070,7 +2070,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED); @@ -2079,7 +2079,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED); @@ -2088,7 +2088,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2128,49 +2128,49 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2181,35 +2181,35 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT '' + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2221,7 +2221,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED); @@ -2230,7 +2230,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longtext /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED); @@ -2239,7 +2239,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2281,7 +2281,7 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2292,21 +2292,21 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` varchar(10) /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2318,7 +2318,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED); @@ -2327,7 +2327,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2356,7 +2356,7 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2367,21 +2367,21 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` tinyblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2393,7 +2393,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED); @@ -2402,7 +2402,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2431,7 +2431,7 @@ CREATE TABLE t1 (a BLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2442,21 +2442,21 @@ CREATE TABLE t1 (a BLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` blob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2468,7 +2468,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT '' + `a` blob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a BLOB NULL COMPRESSED); @@ -2477,7 +2477,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` blob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2506,7 +2506,7 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2517,21 +2517,21 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` mediumblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2543,7 +2543,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED); @@ -2552,7 +2552,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2581,7 +2581,7 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2592,21 +2592,21 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + `a` longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2618,7 +2618,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT '' + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED); @@ -2627,7 +2627,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` longblob /*!100301 COMPRESSED*/ DEFAULT NULL + `a` longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; # @@ -2656,7 +2656,7 @@ CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + `a` varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci DROP TABLE t1; CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED); diff --git a/mysql-test/main/column_compression_parts.result b/mysql-test/main/column_compression_parts.result index 5f5539b723c..e960ff71927 100644 --- a/mysql-test/main/column_compression_parts.result +++ b/mysql-test/main/column_compression_parts.result @@ -64,7 +64,7 @@ SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( `i` int(11) DEFAULT NULL, - `a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT 'AAA' + `a` varchar(1000) /*M!100301 COMPRESSED*/ DEFAULT 'AAA' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY RANGE COLUMNS(`a`) (PARTITION `p1` VALUES LESS THAN ('m') ENGINE = MyISAM, @@ -132,7 +132,7 @@ ALTER TABLE t1 MODIFY COLUMN a VARCHAR(1000) COMPRESSED; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT NULL, + `a` varchar(1000) /*M!100301 COMPRESSED*/ DEFAULT NULL, `id` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY RANGE COLUMNS(`id`,`a`) @@ -165,7 +165,7 @@ ALTER TABLE t1 PARTITION BY KEY(a) PARTITIONS 6; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(1000) /*!100301 COMPRESSED*/ DEFAULT '10-12-2010' + `a` varchar(1000) /*M!100301 COMPRESSED*/ DEFAULT '10-12-2010' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY KEY (`a`) PARTITIONS 6 @@ -230,7 +230,7 @@ ALTER TABLE t2 REMOVE PARTITIONING; SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(200) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(200) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY KEY (`a`) (PARTITION `p0` ENGINE = MyISAM, @@ -247,7 +247,7 @@ t1 CREATE TABLE `t1` ( SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( - `a` varchar(200) /*!100301 COMPRESSED*/ DEFAULT NULL + `a` varchar(200) /*M!100301 COMPRESSED*/ DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci ALTER TABLE t1 EXCHANGE PARTITION pm WITH TABLE t2; DROP TABLE t1,t2; @@ -265,7 +265,7 @@ ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition defin SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` blob /*!100301 COMPRESSED*/ DEFAULT 5, + `a` blob /*M!100301 COMPRESSED*/ DEFAULT 5, `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY HASH (`i`) @@ -282,7 +282,7 @@ ALTER TABLE t1 REORGANIZE PARTITION p2 INTO (PARTITION p22 VALUES LESS THAN (MAX SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE `t1` ( - `a` varchar(500) /*!100301 COMPRESSED*/ DEFAULT '5', + `a` varchar(500) /*M!100301 COMPRESSED*/ DEFAULT '5', `i` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PARTITION BY RANGE COLUMNS(`i`) diff --git a/mysql-test/main/mysqlbinlog_row_compressed.result b/mysql-test/main/mysqlbinlog_row_compressed.result index 820e100220f..39be61ba916 100644 --- a/mysql-test/main/mysqlbinlog_row_compressed.result +++ b/mysql-test/main/mysqlbinlog_row_compressed.result @@ -24,10 +24,10 @@ ROLLBACK/*!*/; # server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001 # at 329 # server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at 371 # server id 1 end_log_pos 533 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 use `test`/*!*/; @@ -44,7 +44,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f /*!*/; # at 533 # server id 1 end_log_pos 575 CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at 575 # server id 1 end_log_pos 727 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; @@ -52,7 +52,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN /*!*/; # at 727 # server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at 769 @@ -81,7 +81,7 @@ COMMIT /*!*/; # at 1040 # server id 1 end_log_pos 1082 CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at 1082 @@ -110,7 +110,7 @@ COMMIT /*!*/; # at 1354 # server id 1 end_log_pos 1396 CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at 1396 @@ -139,7 +139,7 @@ COMMIT /*!*/; # at 1669 # server id 1 end_log_pos 1711 CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at 1711 @@ -168,7 +168,7 @@ COMMIT /*!*/; # at 1982 # server id 1 end_log_pos 2024 CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at 2024 @@ -230,7 +230,7 @@ COMMIT /*!*/; # at 2298 # server id 1 end_log_pos 2340 CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at 2340 @@ -311,7 +311,7 @@ COMMIT /*!*/; # at 2634 # server id 1 end_log_pos 2676 CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at 2676 @@ -373,7 +373,7 @@ COMMIT /*!*/; # at 2934 # server id 1 end_log_pos 2976 CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at 2976 diff --git a/mysql-test/main/mysqlbinlog_row_minimal.result b/mysql-test/main/mysqlbinlog_row_minimal.result index a44f07a66ea..31c8bff122e 100644 --- a/mysql-test/main/mysqlbinlog_row_minimal.result +++ b/mysql-test/main/mysqlbinlog_row_minimal.result @@ -22,10 +22,10 @@ ROLLBACK/*!*/; # server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001 # at 329 # server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at 371 # server id 1 end_log_pos 555 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 use `test`/*!*/; @@ -42,7 +42,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f /*!*/; # at 555 # server id 1 end_log_pos 597 CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at 597 # server id 1 end_log_pos 774 CRC32 XXX Query thread_id=5 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; @@ -50,7 +50,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN /*!*/; # at 774 # server id 1 end_log_pos 816 CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at 816 @@ -79,7 +79,7 @@ COMMIT /*!*/; # at 1088 # server id 1 end_log_pos 1130 CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at 1130 @@ -108,7 +108,7 @@ COMMIT /*!*/; # at 1403 # server id 1 end_log_pos 1445 CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at 1445 @@ -137,7 +137,7 @@ COMMIT /*!*/; # at 1719 # server id 1 end_log_pos 1761 CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at 1761 @@ -166,7 +166,7 @@ COMMIT /*!*/; # at 2035 # server id 1 end_log_pos 2077 CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at 2077 @@ -228,7 +228,7 @@ COMMIT /*!*/; # at 2427 # server id 1 end_log_pos 2469 CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at 2469 @@ -261,7 +261,7 @@ COMMIT /*!*/; # at 2730 # server id 1 end_log_pos 2772 CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at 2772 @@ -291,7 +291,7 @@ COMMIT /*!*/; # at 2992 # server id 1 end_log_pos 3034 CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at 3034 @@ -371,10 +371,10 @@ FLUSH BINARY LOGS; DELIMITER /*!*/; # at POS # server id 1 end_log_pos END_LOG_POS CRC32 XXX GTID D-S-N -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=21*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=21*//*!*/; START TRANSACTION /*!*/; # at POS diff --git a/mysql-test/main/mysqlbinlog_stmt_compressed.result b/mysql-test/main/mysqlbinlog_stmt_compressed.result index 7db60a96b72..cb9f2c63ca1 100644 --- a/mysql-test/main/mysqlbinlog_stmt_compressed.result +++ b/mysql-test/main/mysqlbinlog_stmt_compressed.result @@ -24,10 +24,10 @@ ROLLBACK/*!*/; # server id 1 end_log_pos 329 CRC32 XXX Binlog checkpoint master-bin.000001 # at 329 # server id 1 end_log_pos 371 CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at 371 # server id 1 end_log_pos 533 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 use `test`/*!*/; @@ -44,7 +44,7 @@ CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f /*!*/; # at 533 # server id 1 end_log_pos 575 CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at 575 # server id 1 end_log_pos 727 CRC32 XXX Query_compressed thread_id=5 exec_time=x error_code=0 SET TIMESTAMP=X/*!*/; @@ -52,7 +52,7 @@ CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMIN /*!*/; # at 727 # server id 1 end_log_pos 769 CRC32 XXX GTID 0-1-3 -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at 769 @@ -67,7 +67,7 @@ COMMIT /*!*/; # at 970 # server id 1 end_log_pos 1012 CRC32 XXX GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at 1012 @@ -82,7 +82,7 @@ COMMIT /*!*/; # at 1213 # server id 1 end_log_pos 1255 CRC32 XXX GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at 1255 @@ -97,7 +97,7 @@ COMMIT /*!*/; # at 1458 # server id 1 end_log_pos 1500 CRC32 XXX GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at 1500 @@ -112,7 +112,7 @@ COMMIT /*!*/; # at 1700 # server id 1 end_log_pos 1742 CRC32 XXX GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at 1742 @@ -127,7 +127,7 @@ COMMIT /*!*/; # at 1923 # server id 1 end_log_pos 1965 CRC32 XXX GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at 1965 @@ -142,7 +142,7 @@ COMMIT /*!*/; # at 2155 # server id 1 end_log_pos 2197 CRC32 XXX GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at 2197 @@ -157,7 +157,7 @@ COMMIT /*!*/; # at 2361 # server id 1 end_log_pos 2403 CRC32 XXX GTID 0-1-10 -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at 2403 diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result index 3287a19a3bf..c6a8417ac9f 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result @@ -367,10 +367,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -387,7 +387,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -408,7 +408,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -429,7 +429,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 ddl -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -437,7 +437,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 ddl -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -445,7 +445,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -466,7 +466,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -487,7 +487,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -508,7 +508,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -529,7 +529,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -550,7 +550,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -571,7 +571,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -592,7 +592,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=13*//*!*/; START TRANSACTION /*!*/; # at # @@ -613,7 +613,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=14*//*!*/; START TRANSACTION /*!*/; # at # @@ -634,7 +634,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=15*//*!*/; START TRANSACTION /*!*/; # at # @@ -657,7 +657,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-16 ddl -/*!100001 SET @@session.gtid_seq_no=16*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=16*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -665,7 +665,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-17 ddl -/*!100001 SET @@session.gtid_seq_no=17*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=17*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -673,7 +673,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=18*//*!*/; START TRANSACTION /*!*/; # at # @@ -695,7 +695,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-19 ddl -/*!100001 SET @@session.gtid_seq_no=19*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=19*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -703,7 +703,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-20 ddl -/*!100001 SET @@session.gtid_seq_no=20*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=20*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -711,7 +711,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=21*//*!*/; START TRANSACTION /*!*/; # at # @@ -732,7 +732,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=22*//*!*/; START TRANSACTION /*!*/; # at # @@ -753,7 +753,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=23*//*!*/; START TRANSACTION /*!*/; # at # @@ -774,7 +774,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=24*//*!*/; START TRANSACTION /*!*/; # at # @@ -795,7 +795,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-25 ddl -/*!100001 SET @@session.gtid_seq_no=25*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=25*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -803,7 +803,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-26 ddl -/*!100001 SET @@session.gtid_seq_no=26*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=26*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -811,7 +811,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=27*//*!*/; START TRANSACTION /*!*/; # at # @@ -838,7 +838,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=28*//*!*/; START TRANSACTION /*!*/; # at # @@ -859,7 +859,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=29*//*!*/; START TRANSACTION /*!*/; # at # @@ -882,7 +882,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=30*//*!*/; START TRANSACTION /*!*/; # at # @@ -903,7 +903,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-31 ddl -/*!100001 SET @@session.gtid_seq_no=31*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=31*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -911,7 +911,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-32 ddl -/*!100001 SET @@session.gtid_seq_no=32*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=32*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -919,7 +919,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=33*//*!*/; START TRANSACTION /*!*/; # at # @@ -943,7 +943,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=34*//*!*/; START TRANSACTION /*!*/; # at # @@ -964,7 +964,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-35 ddl -/*!100001 SET @@session.gtid_seq_no=35*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=35*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -972,7 +972,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-36 ddl -/*!100001 SET @@session.gtid_seq_no=36*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=36*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -980,7 +980,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=37*//*!*/; START TRANSACTION /*!*/; # at # @@ -1001,7 +1001,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=38*//*!*/; START TRANSACTION /*!*/; # at # @@ -1022,7 +1022,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-39 ddl -/*!100001 SET @@session.gtid_seq_no=39*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=39*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1030,7 +1030,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-40 ddl -/*!100001 SET @@session.gtid_seq_no=40*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=40*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1038,7 +1038,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=41*//*!*/; START TRANSACTION /*!*/; # at # @@ -1059,7 +1059,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=42*//*!*/; START TRANSACTION /*!*/; # at # @@ -1080,7 +1080,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-43 ddl -/*!100001 SET @@session.gtid_seq_no=43*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=43*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1088,7 +1088,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-44 ddl -/*!100001 SET @@session.gtid_seq_no=44*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=44*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1096,7 +1096,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=45*//*!*/; START TRANSACTION /*!*/; # at # @@ -1120,7 +1120,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=46*//*!*/; START TRANSACTION /*!*/; # at # @@ -1143,7 +1143,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=47*//*!*/; START TRANSACTION /*!*/; # at # @@ -1164,7 +1164,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-48 ddl -/*!100001 SET @@session.gtid_seq_no=48*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=48*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1172,7 +1172,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-49 ddl -/*!100001 SET @@session.gtid_seq_no=49*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=49*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1180,7 +1180,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=50*//*!*/; START TRANSACTION /*!*/; # at # @@ -1201,7 +1201,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=51*//*!*/; START TRANSACTION /*!*/; # at # @@ -1222,7 +1222,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-52 ddl -/*!100001 SET @@session.gtid_seq_no=52*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=52*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1230,7 +1230,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-53 ddl -/*!100001 SET @@session.gtid_seq_no=53*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=53*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1238,7 +1238,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=54*//*!*/; START TRANSACTION /*!*/; # at # @@ -1262,7 +1262,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=55*//*!*/; START TRANSACTION /*!*/; # at # @@ -1285,7 +1285,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=56*//*!*/; START TRANSACTION /*!*/; # at # @@ -1306,7 +1306,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-57 ddl -/*!100001 SET @@session.gtid_seq_no=57*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=57*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1314,7 +1314,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-58 ddl -/*!100001 SET @@session.gtid_seq_no=58*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=58*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1322,7 +1322,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=59*//*!*/; START TRANSACTION /*!*/; # at # @@ -1343,7 +1343,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=60*//*!*/; START TRANSACTION /*!*/; # at # @@ -1364,7 +1364,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-61 ddl -/*!100001 SET @@session.gtid_seq_no=61*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=61*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1372,7 +1372,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-62 ddl -/*!100001 SET @@session.gtid_seq_no=62*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=62*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1380,7 +1380,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=63*//*!*/; START TRANSACTION /*!*/; # at # @@ -1404,7 +1404,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=64*//*!*/; START TRANSACTION /*!*/; # at # @@ -1427,7 +1427,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=65*//*!*/; START TRANSACTION /*!*/; # at # @@ -1448,7 +1448,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-66 ddl -/*!100001 SET @@session.gtid_seq_no=66*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=66*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1456,7 +1456,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-67 ddl -/*!100001 SET @@session.gtid_seq_no=67*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=67*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1464,7 +1464,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=68*//*!*/; START TRANSACTION /*!*/; # at # @@ -1485,7 +1485,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=69*//*!*/; START TRANSACTION /*!*/; # at # @@ -1506,7 +1506,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-70 ddl -/*!100001 SET @@session.gtid_seq_no=70*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=70*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1514,7 +1514,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-71 ddl -/*!100001 SET @@session.gtid_seq_no=71*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=71*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1522,7 +1522,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=72*//*!*/; START TRANSACTION /*!*/; # at # @@ -1546,7 +1546,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=73*//*!*/; START TRANSACTION /*!*/; # at # @@ -1569,7 +1569,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=74*//*!*/; START TRANSACTION /*!*/; # at # @@ -1590,7 +1590,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-75 ddl -/*!100001 SET @@session.gtid_seq_no=75*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=75*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1598,7 +1598,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-76 ddl -/*!100001 SET @@session.gtid_seq_no=76*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=76*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1606,7 +1606,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=77*//*!*/; START TRANSACTION /*!*/; # at # @@ -1627,7 +1627,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=78*//*!*/; START TRANSACTION /*!*/; # at # @@ -1648,7 +1648,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-79 ddl -/*!100001 SET @@session.gtid_seq_no=79*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=79*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1656,7 +1656,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-80 ddl -/*!100001 SET @@session.gtid_seq_no=80*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=80*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1664,7 +1664,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=81*//*!*/; START TRANSACTION /*!*/; # at # @@ -1685,7 +1685,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=82*//*!*/; START TRANSACTION /*!*/; # at # @@ -1706,7 +1706,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-83 ddl -/*!100001 SET @@session.gtid_seq_no=83*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=83*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1714,7 +1714,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-84 ddl -/*!100001 SET @@session.gtid_seq_no=84*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=84*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1722,7 +1722,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=85*//*!*/; START TRANSACTION /*!*/; # at # @@ -1743,7 +1743,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=86*//*!*/; START TRANSACTION /*!*/; # at # @@ -1764,7 +1764,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=87*//*!*/; START TRANSACTION /*!*/; # at # @@ -1785,7 +1785,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-88 ddl -/*!100001 SET @@session.gtid_seq_no=88*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=88*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1793,7 +1793,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-89 ddl -/*!100001 SET @@session.gtid_seq_no=89*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=89*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1801,7 +1801,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=90*//*!*/; START TRANSACTION /*!*/; # at # @@ -1822,7 +1822,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=91*//*!*/; START TRANSACTION /*!*/; # at # @@ -1843,7 +1843,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-92 ddl -/*!100001 SET @@session.gtid_seq_no=92*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=92*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1851,7 +1851,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-93 ddl -/*!100001 SET @@session.gtid_seq_no=93*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=93*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1859,7 +1859,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=94*//*!*/; START TRANSACTION /*!*/; # at # @@ -1880,7 +1880,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=95*//*!*/; START TRANSACTION /*!*/; # at # @@ -1901,7 +1901,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-96 ddl -/*!100001 SET @@session.gtid_seq_no=96*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=96*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1909,7 +1909,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-97 ddl -/*!100001 SET @@session.gtid_seq_no=97*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=97*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1917,7 +1917,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=98*//*!*/; START TRANSACTION /*!*/; # at # @@ -1939,7 +1939,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=99*//*!*/; START TRANSACTION /*!*/; # at # @@ -1960,7 +1960,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-100 ddl -/*!100001 SET @@session.gtid_seq_no=100*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=100*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1968,7 +1968,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-101 ddl -/*!100001 SET @@session.gtid_seq_no=101*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=101*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1976,7 +1976,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=102*//*!*/; START TRANSACTION /*!*/; # at # @@ -1997,7 +1997,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=103*//*!*/; START TRANSACTION /*!*/; # at # @@ -2018,7 +2018,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-104 ddl -/*!100001 SET @@session.gtid_seq_no=104*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=104*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2026,7 +2026,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-105 ddl -/*!100001 SET @@session.gtid_seq_no=105*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=105*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2034,7 +2034,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=106*//*!*/; START TRANSACTION /*!*/; # at # @@ -2055,7 +2055,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=107*//*!*/; START TRANSACTION /*!*/; # at # @@ -2076,7 +2076,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-108 ddl -/*!100001 SET @@session.gtid_seq_no=108*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=108*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2084,7 +2084,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-109 ddl -/*!100001 SET @@session.gtid_seq_no=109*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=109*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2092,7 +2092,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=110*//*!*/; START TRANSACTION /*!*/; # at # @@ -2113,7 +2113,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=111*//*!*/; START TRANSACTION /*!*/; # at # @@ -2134,7 +2134,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-112 ddl -/*!100001 SET @@session.gtid_seq_no=112*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=112*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2142,7 +2142,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-113 ddl -/*!100001 SET @@session.gtid_seq_no=113*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=113*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2150,7 +2150,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=114*//*!*/; START TRANSACTION /*!*/; # at # @@ -2171,7 +2171,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=115*//*!*/; START TRANSACTION /*!*/; # at # @@ -2192,7 +2192,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-116 ddl -/*!100001 SET @@session.gtid_seq_no=116*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=116*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2200,7 +2200,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-117 ddl -/*!100001 SET @@session.gtid_seq_no=117*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=117*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2208,7 +2208,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=118*//*!*/; START TRANSACTION /*!*/; # at # @@ -2229,7 +2229,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=119*//*!*/; START TRANSACTION /*!*/; # at # @@ -2250,7 +2250,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-120 ddl -/*!100001 SET @@session.gtid_seq_no=120*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=120*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2258,7 +2258,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-121 ddl -/*!100001 SET @@session.gtid_seq_no=121*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=121*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2266,7 +2266,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=122*//*!*/; START TRANSACTION /*!*/; # at # @@ -2287,7 +2287,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=123*//*!*/; START TRANSACTION /*!*/; # at # @@ -2308,7 +2308,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-124 ddl -/*!100001 SET @@session.gtid_seq_no=124*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=124*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2316,7 +2316,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-125 ddl -/*!100001 SET @@session.gtid_seq_no=125*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=125*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2324,7 +2324,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=126*//*!*/; START TRANSACTION /*!*/; # at # @@ -2345,7 +2345,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=127*//*!*/; START TRANSACTION /*!*/; # at # @@ -2366,7 +2366,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-128 ddl -/*!100001 SET @@session.gtid_seq_no=128*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=128*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2374,7 +2374,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-129 ddl -/*!100001 SET @@session.gtid_seq_no=129*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=129*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2382,7 +2382,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=130*//*!*/; START TRANSACTION /*!*/; # at # @@ -2403,7 +2403,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=131*//*!*/; START TRANSACTION /*!*/; # at # @@ -2424,7 +2424,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-132 ddl -/*!100001 SET @@session.gtid_seq_no=132*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=132*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2432,7 +2432,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-133 ddl -/*!100001 SET @@session.gtid_seq_no=133*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=133*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2440,7 +2440,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=134*//*!*/; START TRANSACTION /*!*/; # at # @@ -2461,7 +2461,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=135*//*!*/; START TRANSACTION /*!*/; # at # @@ -2482,7 +2482,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-136 ddl -/*!100001 SET @@session.gtid_seq_no=136*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=136*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2490,7 +2490,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-137 ddl -/*!100001 SET @@session.gtid_seq_no=137*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=137*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2498,7 +2498,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=138*//*!*/; START TRANSACTION /*!*/; # at # @@ -2519,7 +2519,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=139*//*!*/; START TRANSACTION /*!*/; # at # @@ -2540,7 +2540,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=140*//*!*/; START TRANSACTION /*!*/; # at # @@ -2564,7 +2564,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-141 ddl -/*!100001 SET @@session.gtid_seq_no=141*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=141*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2572,7 +2572,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-142 ddl -/*!100001 SET @@session.gtid_seq_no=142*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=142*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2580,7 +2580,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=143*//*!*/; START TRANSACTION /*!*/; # at # @@ -2601,7 +2601,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=144*//*!*/; START TRANSACTION /*!*/; # at # @@ -2622,7 +2622,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-145 ddl -/*!100001 SET @@session.gtid_seq_no=145*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=145*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2630,7 +2630,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-146 ddl -/*!100001 SET @@session.gtid_seq_no=146*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=146*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2638,7 +2638,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=147*//*!*/; START TRANSACTION /*!*/; # at # @@ -2659,7 +2659,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=148*//*!*/; START TRANSACTION /*!*/; # at # @@ -2680,7 +2680,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-149 ddl -/*!100001 SET @@session.gtid_seq_no=149*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=149*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2688,7 +2688,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-150 ddl -/*!100001 SET @@session.gtid_seq_no=150*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=150*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2696,7 +2696,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=151*//*!*/; START TRANSACTION /*!*/; # at # @@ -2717,7 +2717,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=152*//*!*/; START TRANSACTION /*!*/; # at # @@ -2738,7 +2738,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-153 ddl -/*!100001 SET @@session.gtid_seq_no=153*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=153*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2746,7 +2746,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-154 ddl -/*!100001 SET @@session.gtid_seq_no=154*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=154*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2754,7 +2754,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=155*//*!*/; START TRANSACTION /*!*/; # at # @@ -2775,7 +2775,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=156*//*!*/; START TRANSACTION /*!*/; # at # @@ -2796,7 +2796,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=157*//*!*/; START TRANSACTION /*!*/; # at # @@ -2820,7 +2820,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-158 ddl -/*!100001 SET @@session.gtid_seq_no=158*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=158*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2828,7 +2828,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-159 ddl -/*!100001 SET @@session.gtid_seq_no=159*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=159*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2836,7 +2836,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=160*//*!*/; START TRANSACTION /*!*/; # at # @@ -2857,7 +2857,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=161*//*!*/; START TRANSACTION /*!*/; # at # @@ -2878,7 +2878,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-162 ddl -/*!100001 SET @@session.gtid_seq_no=162*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=162*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2886,7 +2886,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-163 ddl -/*!100001 SET @@session.gtid_seq_no=163*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=163*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2894,7 +2894,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=164*//*!*/; START TRANSACTION /*!*/; # at # @@ -2915,7 +2915,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=165*//*!*/; START TRANSACTION /*!*/; # at # @@ -2936,7 +2936,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-166 ddl -/*!100001 SET @@session.gtid_seq_no=166*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=166*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2944,7 +2944,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-167 ddl -/*!100001 SET @@session.gtid_seq_no=167*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=167*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -2952,7 +2952,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=168*//*!*/; START TRANSACTION /*!*/; # at # @@ -2973,7 +2973,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=169*//*!*/; START TRANSACTION /*!*/; # at # @@ -2994,7 +2994,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-170 ddl -/*!100001 SET @@session.gtid_seq_no=170*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=170*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3002,7 +3002,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-171 ddl -/*!100001 SET @@session.gtid_seq_no=171*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=171*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3010,7 +3010,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=172*//*!*/; START TRANSACTION /*!*/; # at # @@ -3031,7 +3031,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=173*//*!*/; START TRANSACTION /*!*/; # at # @@ -3052,7 +3052,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-174 ddl -/*!100001 SET @@session.gtid_seq_no=174*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=174*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3060,7 +3060,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-175 ddl -/*!100001 SET @@session.gtid_seq_no=175*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=175*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3068,7 +3068,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=176*//*!*/; START TRANSACTION /*!*/; # at # @@ -3089,7 +3089,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=177*//*!*/; START TRANSACTION /*!*/; # at # @@ -3110,7 +3110,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-178 ddl -/*!100001 SET @@session.gtid_seq_no=178*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=178*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3118,7 +3118,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-179 ddl -/*!100001 SET @@session.gtid_seq_no=179*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=179*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3126,7 +3126,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=180*//*!*/; START TRANSACTION /*!*/; # at # @@ -3147,7 +3147,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=181*//*!*/; START TRANSACTION /*!*/; # at # @@ -3168,7 +3168,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-182 ddl -/*!100001 SET @@session.gtid_seq_no=182*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=182*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3176,7 +3176,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-183 ddl -/*!100001 SET @@session.gtid_seq_no=183*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=183*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3184,7 +3184,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=184*//*!*/; START TRANSACTION /*!*/; # at # @@ -3205,7 +3205,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=185*//*!*/; START TRANSACTION /*!*/; # at # @@ -3226,7 +3226,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=186*//*!*/; START TRANSACTION /*!*/; # at # @@ -3250,7 +3250,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-187 ddl -/*!100001 SET @@session.gtid_seq_no=187*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=187*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3258,7 +3258,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-188 ddl -/*!100001 SET @@session.gtid_seq_no=188*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=188*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3266,7 +3266,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=189*//*!*/; START TRANSACTION /*!*/; # at # @@ -3287,7 +3287,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=190*//*!*/; START TRANSACTION /*!*/; # at # @@ -3308,7 +3308,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=191*//*!*/; START TRANSACTION /*!*/; # at # @@ -3332,7 +3332,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-192 ddl -/*!100001 SET @@session.gtid_seq_no=192*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=192*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3340,7 +3340,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-193 ddl -/*!100001 SET @@session.gtid_seq_no=193*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=193*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3348,7 +3348,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=194*//*!*/; START TRANSACTION /*!*/; # at # @@ -3369,7 +3369,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=195*//*!*/; START TRANSACTION /*!*/; # at # @@ -3390,7 +3390,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-196 ddl -/*!100001 SET @@session.gtid_seq_no=196*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=196*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3398,7 +3398,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-197 ddl -/*!100001 SET @@session.gtid_seq_no=197*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=197*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3406,7 +3406,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=198*//*!*/; START TRANSACTION /*!*/; # at # @@ -3427,7 +3427,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=199*//*!*/; START TRANSACTION /*!*/; # at # @@ -3448,7 +3448,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-200 ddl -/*!100001 SET @@session.gtid_seq_no=200*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=200*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3456,7 +3456,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-201 ddl -/*!100001 SET @@session.gtid_seq_no=201*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=201*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3464,7 +3464,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=202*//*!*/; START TRANSACTION /*!*/; # at # @@ -3485,7 +3485,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=203*//*!*/; START TRANSACTION /*!*/; # at # @@ -3506,7 +3506,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-204 ddl -/*!100001 SET @@session.gtid_seq_no=204*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=204*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3514,7 +3514,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-205 ddl -/*!100001 SET @@session.gtid_seq_no=205*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=205*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3522,7 +3522,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=206*//*!*/; START TRANSACTION /*!*/; # at # @@ -3543,7 +3543,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=207*//*!*/; START TRANSACTION /*!*/; # at # @@ -3564,7 +3564,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-208 ddl -/*!100001 SET @@session.gtid_seq_no=208*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=208*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3572,7 +3572,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-209 ddl -/*!100001 SET @@session.gtid_seq_no=209*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=209*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3580,7 +3580,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=210*//*!*/; START TRANSACTION /*!*/; # at # @@ -3601,7 +3601,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=211*//*!*/; START TRANSACTION /*!*/; # at # @@ -3622,7 +3622,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=212*//*!*/; START TRANSACTION /*!*/; # at # @@ -3643,7 +3643,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=213*//*!*/; START TRANSACTION /*!*/; # at # @@ -3664,7 +3664,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-214 ddl -/*!100001 SET @@session.gtid_seq_no=214*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=214*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3672,7 +3672,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-215 ddl -/*!100001 SET @@session.gtid_seq_no=215*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=215*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3680,7 +3680,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=216*//*!*/; START TRANSACTION /*!*/; # at # @@ -3701,7 +3701,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=217*//*!*/; START TRANSACTION /*!*/; # at # @@ -3722,7 +3722,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-218 ddl -/*!100001 SET @@session.gtid_seq_no=218*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=218*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3730,7 +3730,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-219 ddl -/*!100001 SET @@session.gtid_seq_no=219*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=219*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3738,7 +3738,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=220*//*!*/; START TRANSACTION /*!*/; # at # @@ -3759,7 +3759,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=221*//*!*/; START TRANSACTION /*!*/; # at # @@ -3780,7 +3780,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=222*//*!*/; START TRANSACTION /*!*/; # at # @@ -3801,7 +3801,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=223*//*!*/; START TRANSACTION /*!*/; # at # @@ -3822,7 +3822,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-224 ddl -/*!100001 SET @@session.gtid_seq_no=224*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=224*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3830,7 +3830,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-225 ddl -/*!100001 SET @@session.gtid_seq_no=225*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=225*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3838,7 +3838,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=226*//*!*/; START TRANSACTION /*!*/; # at # @@ -3859,7 +3859,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=227*//*!*/; START TRANSACTION /*!*/; # at # @@ -3880,7 +3880,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=228*//*!*/; START TRANSACTION /*!*/; # at # @@ -3901,7 +3901,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=229*//*!*/; START TRANSACTION /*!*/; # at # @@ -3922,7 +3922,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-230 ddl -/*!100001 SET @@session.gtid_seq_no=230*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=230*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3930,7 +3930,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-231 ddl -/*!100001 SET @@session.gtid_seq_no=231*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=231*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3938,7 +3938,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=232*//*!*/; START TRANSACTION /*!*/; # at # @@ -3959,7 +3959,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=233*//*!*/; START TRANSACTION /*!*/; # at # @@ -3980,7 +3980,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-234 ddl -/*!100001 SET @@session.gtid_seq_no=234*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=234*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3988,7 +3988,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-235 ddl -/*!100001 SET @@session.gtid_seq_no=235*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=235*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -3996,7 +3996,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=236*//*!*/; START TRANSACTION /*!*/; # at # @@ -4017,7 +4017,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=237*//*!*/; START TRANSACTION /*!*/; # at # @@ -4038,7 +4038,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=238*//*!*/; START TRANSACTION /*!*/; # at # @@ -4059,7 +4059,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=239*//*!*/; START TRANSACTION /*!*/; # at # @@ -4080,7 +4080,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-240 ddl -/*!100001 SET @@session.gtid_seq_no=240*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=240*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4088,7 +4088,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-241 ddl -/*!100001 SET @@session.gtid_seq_no=241*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=241*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4096,7 +4096,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=242*//*!*/; START TRANSACTION /*!*/; # at # @@ -4117,7 +4117,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=243*//*!*/; START TRANSACTION /*!*/; # at # @@ -4138,7 +4138,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=244*//*!*/; START TRANSACTION /*!*/; # at # @@ -4159,7 +4159,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=245*//*!*/; START TRANSACTION /*!*/; # at # @@ -4180,7 +4180,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-246 ddl -/*!100001 SET @@session.gtid_seq_no=246*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=246*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4188,7 +4188,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-247 ddl -/*!100001 SET @@session.gtid_seq_no=247*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=247*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4196,7 +4196,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=248*//*!*/; START TRANSACTION /*!*/; # at # @@ -4217,7 +4217,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=249*//*!*/; START TRANSACTION /*!*/; # at # @@ -4238,7 +4238,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-250 ddl -/*!100001 SET @@session.gtid_seq_no=250*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=250*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4246,7 +4246,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-251 ddl -/*!100001 SET @@session.gtid_seq_no=251*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=251*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4254,7 +4254,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=252*//*!*/; START TRANSACTION /*!*/; # at # @@ -4275,7 +4275,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=253*//*!*/; START TRANSACTION /*!*/; # at # @@ -4296,7 +4296,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-254 ddl -/*!100001 SET @@session.gtid_seq_no=254*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=254*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4304,7 +4304,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-255 ddl -/*!100001 SET @@session.gtid_seq_no=255*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=255*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4312,7 +4312,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=256*//*!*/; START TRANSACTION /*!*/; # at # @@ -4333,7 +4333,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=257*//*!*/; START TRANSACTION /*!*/; # at # @@ -4354,7 +4354,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-258 ddl -/*!100001 SET @@session.gtid_seq_no=258*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=258*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4362,7 +4362,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-259 ddl -/*!100001 SET @@session.gtid_seq_no=259*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=259*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4370,7 +4370,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=260*//*!*/; START TRANSACTION /*!*/; # at # @@ -4391,7 +4391,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=261*//*!*/; START TRANSACTION /*!*/; # at # @@ -4412,7 +4412,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-262 ddl -/*!100001 SET @@session.gtid_seq_no=262*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=262*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4420,7 +4420,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-263 ddl -/*!100001 SET @@session.gtid_seq_no=263*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=263*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4428,7 +4428,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=264*//*!*/; START TRANSACTION /*!*/; # at # @@ -4449,7 +4449,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=265*//*!*/; START TRANSACTION /*!*/; # at # @@ -4470,7 +4470,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-266 ddl -/*!100001 SET @@session.gtid_seq_no=266*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=266*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4478,7 +4478,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-267 ddl -/*!100001 SET @@session.gtid_seq_no=267*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=267*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4486,7 +4486,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=268*//*!*/; START TRANSACTION /*!*/; # at # @@ -4507,7 +4507,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=269*//*!*/; START TRANSACTION /*!*/; # at # @@ -4528,7 +4528,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-270 ddl -/*!100001 SET @@session.gtid_seq_no=270*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=270*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4536,7 +4536,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-271 ddl -/*!100001 SET @@session.gtid_seq_no=271*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=271*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4544,7 +4544,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=272*//*!*/; START TRANSACTION /*!*/; # at # @@ -4565,7 +4565,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=273*//*!*/; START TRANSACTION /*!*/; # at # @@ -4586,7 +4586,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-274 ddl -/*!100001 SET @@session.gtid_seq_no=274*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=274*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4594,7 +4594,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-275 ddl -/*!100001 SET @@session.gtid_seq_no=275*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=275*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4602,7 +4602,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=276*//*!*/; START TRANSACTION /*!*/; # at # @@ -4623,7 +4623,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=277*//*!*/; START TRANSACTION /*!*/; # at # @@ -4644,7 +4644,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-278 ddl -/*!100001 SET @@session.gtid_seq_no=278*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=278*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4652,7 +4652,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-279 ddl -/*!100001 SET @@session.gtid_seq_no=279*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=279*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4660,7 +4660,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=280*//*!*/; START TRANSACTION /*!*/; # at # @@ -4681,7 +4681,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=281*//*!*/; START TRANSACTION /*!*/; # at # @@ -4702,7 +4702,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-282 ddl -/*!100001 SET @@session.gtid_seq_no=282*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=282*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4710,7 +4710,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-283 ddl -/*!100001 SET @@session.gtid_seq_no=283*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=283*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4718,7 +4718,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=284*//*!*/; START TRANSACTION /*!*/; # at # @@ -4739,7 +4739,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=285*//*!*/; START TRANSACTION /*!*/; # at # @@ -4760,7 +4760,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-286 ddl -/*!100001 SET @@session.gtid_seq_no=286*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=286*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4768,7 +4768,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-287 ddl -/*!100001 SET @@session.gtid_seq_no=287*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=287*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4776,7 +4776,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=288*//*!*/; START TRANSACTION /*!*/; # at # @@ -4797,7 +4797,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=289*//*!*/; START TRANSACTION /*!*/; # at # @@ -4818,7 +4818,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-290 ddl -/*!100001 SET @@session.gtid_seq_no=290*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=290*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4826,7 +4826,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-291 ddl -/*!100001 SET @@session.gtid_seq_no=291*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=291*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4834,7 +4834,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=292*//*!*/; START TRANSACTION /*!*/; # at # @@ -4855,7 +4855,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=293*//*!*/; START TRANSACTION /*!*/; # at # @@ -4876,7 +4876,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-294 ddl -/*!100001 SET @@session.gtid_seq_no=294*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=294*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4884,7 +4884,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-295 ddl -/*!100001 SET @@session.gtid_seq_no=295*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=295*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4892,7 +4892,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=296*//*!*/; START TRANSACTION /*!*/; # at # @@ -4913,7 +4913,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=297*//*!*/; START TRANSACTION /*!*/; # at # @@ -4934,7 +4934,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-298 ddl -/*!100001 SET @@session.gtid_seq_no=298*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=298*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4942,7 +4942,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-299 ddl -/*!100001 SET @@session.gtid_seq_no=299*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=299*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -4950,7 +4950,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=300*//*!*/; START TRANSACTION /*!*/; # at # @@ -4971,7 +4971,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=301*//*!*/; START TRANSACTION /*!*/; # at # @@ -4992,7 +4992,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=302*//*!*/; START TRANSACTION /*!*/; # at # @@ -5013,7 +5013,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=303*//*!*/; START TRANSACTION /*!*/; # at # @@ -5034,7 +5034,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=304*//*!*/; START TRANSACTION /*!*/; # at # @@ -5055,7 +5055,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=305*//*!*/; START TRANSACTION /*!*/; # at # @@ -5076,7 +5076,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=306*//*!*/; START TRANSACTION /*!*/; # at # @@ -5097,7 +5097,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=307*//*!*/; START TRANSACTION /*!*/; # at # @@ -5118,7 +5118,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-308 ddl -/*!100001 SET @@session.gtid_seq_no=308*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=308*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5126,7 +5126,7 @@ DROP TABLE `t1` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-309 ddl -/*!100001 SET @@session.gtid_seq_no=309*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=309*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5134,7 +5134,7 @@ CREATE TABLE t1 (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-310 ddl -/*!100001 SET @@session.gtid_seq_no=310*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=310*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5142,7 +5142,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=311*//*!*/; START TRANSACTION /*!*/; # at # @@ -5164,7 +5164,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=312*//*!*/; START TRANSACTION /*!*/; # at # @@ -5186,7 +5186,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=313*//*!*/; START TRANSACTION /*!*/; # at # @@ -5208,7 +5208,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=314*//*!*/; START TRANSACTION /*!*/; # at # @@ -5230,7 +5230,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=315*//*!*/; START TRANSACTION /*!*/; # at # @@ -5280,7 +5280,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-316 ddl -/*!100001 SET @@session.gtid_seq_no=316*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=316*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5288,7 +5288,7 @@ DROP TABLE `t1`,`t2` /* generated by server */ /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-317 ddl -/*!100001 SET @@session.gtid_seq_no=317*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=317*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5298,7 +5298,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=318*//*!*/; START TRANSACTION /*!*/; # at # @@ -5321,7 +5321,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-319 ddl -/*!100001 SET @@session.gtid_seq_no=319*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=319*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5348,10 +5348,10 @@ DELIMITER /*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000002 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-320 -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=320*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=320*//*!*/; START TRANSACTION /*!*/; # at # @@ -5377,10 +5377,10 @@ DELIMITER /*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-324 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=324*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=324*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -5397,7 +5397,7 @@ CREATE TABLE t1 (a GEOMETRY DEFAULT NULL) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-325 -/*!100001 SET @@session.gtid_seq_no=325*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=325*//*!*/; START TRANSACTION /*!*/; # at # @@ -5418,7 +5418,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-326 -/*!100001 SET @@session.gtid_seq_no=326*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=326*//*!*/; START TRANSACTION /*!*/; # at # @@ -5439,7 +5439,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-327 ddl -/*!100001 SET @@session.gtid_seq_no=327*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=327*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; 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 bb2cfc02e56..f6c24e66f1e 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result @@ -2259,10 +2259,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -2367,7 +2367,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -2552,7 +2552,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -2737,7 +2737,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -3091,7 +3091,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -3445,7 +3445,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -3800,7 +3800,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -4154,7 +4154,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -4509,7 +4509,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -4695,7 +4695,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -4880,7 +4880,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -5066,7 +5066,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -5351,10 +5351,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -5375,7 +5375,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -5445,7 +5445,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -5524,7 +5524,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5751,10 +5751,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -5775,7 +5775,7 @@ c_1_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5787,7 +5787,7 @@ c_2_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5799,7 +5799,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5869,7 +5869,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -5939,7 +5939,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -6009,7 +6009,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -6199,7 +6199,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -6389,10 +6389,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -6413,7 +6413,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # 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 5b0f40ea087..2b118372ada 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result @@ -2259,10 +2259,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -2367,7 +2367,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -2555,7 +2555,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -2742,7 +2742,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -3098,7 +3098,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -3454,7 +3454,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -3811,7 +3811,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -4167,7 +4167,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -4524,7 +4524,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -4712,7 +4712,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -4899,7 +4899,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -5087,7 +5087,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -5374,10 +5374,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -5398,7 +5398,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -5470,7 +5470,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -5551,7 +5551,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5780,10 +5780,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -5804,7 +5804,7 @@ c_1_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5816,7 +5816,7 @@ c_2_n INT -- row number /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -5828,7 +5828,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -5900,7 +5900,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -5972,7 +5972,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -6044,7 +6044,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -6236,7 +6236,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -6428,10 +6428,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -6452,7 +6452,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # 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 8d67b348420..1a26879e565 100644 --- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result +++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result @@ -137,10 +137,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -160,7 +160,7 @@ c2 VARCHAR(20) /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -171,7 +171,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -240,7 +240,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 ddl -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -248,7 +248,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 ddl -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -256,7 +256,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -286,7 +286,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -325,7 +325,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -347,7 +347,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -416,7 +416,7 @@ START TRANSACTION COMMIT/*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 ddl -/*!100001 SET @@session.gtid_seq_no=10*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -424,7 +424,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 ddl -/*!100001 SET @@session.gtid_seq_no=11*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -432,7 +432,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; START TRANSACTION /*!*/; # at # @@ -462,7 +462,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=13*//*!*/; START TRANSACTION /*!*/; # at # @@ -501,7 +501,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=14*//*!*/; START TRANSACTION /*!*/; # at # @@ -523,7 +523,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-15 ddl -/*!100001 SET @@session.gtid_seq_no=15*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=15*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -531,7 +531,7 @@ TRUNCATE TABLE t1 /*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-16 ddl -/*!100001 SET @@session.gtid_seq_no=16*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=16*//*!*/; # at # #010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; diff --git a/mysql-test/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result index 6a15fd47d55..fd9f87e7ea2 100644 --- a/mysql-test/suite/binlog/r/binlog_row_annotate.result +++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result @@ -108,10 +108,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -127,7 +127,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -135,7 +135,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -143,7 +143,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -170,7 +170,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -197,7 +197,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -224,7 +224,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -266,7 +266,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -293,7 +293,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -346,10 +346,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -365,15 +365,15 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -400,7 +400,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -413,7 +413,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -426,7 +426,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -456,7 +456,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -469,7 +469,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -505,10 +505,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -524,7 +524,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -532,7 +532,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -540,7 +540,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -565,7 +565,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -590,7 +590,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -615,7 +615,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -653,7 +653,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -678,7 +678,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -731,10 +731,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -750,7 +750,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -758,7 +758,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -766,7 +766,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -793,7 +793,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -820,7 +820,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -847,7 +847,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -889,7 +889,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -916,7 +916,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -969,10 +969,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -988,15 +988,15 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -1023,7 +1023,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -1036,7 +1036,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -1049,7 +1049,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -1079,7 +1079,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -1092,7 +1092,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -1128,10 +1128,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1147,7 +1147,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1155,7 +1155,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -1163,7 +1163,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -1187,7 +1187,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -1211,7 +1211,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -1235,7 +1235,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -1272,7 +1272,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -1296,7 +1296,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # 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 c9ee047afbf..4f1465348e5 100644 --- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result @@ -83,10 +83,10 @@ DELIMITER /*!*/; #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=#*//*!*/; -/*!100001 SET @@session.server_id=#*//*!*/; -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=#*//*!*/; +/*M!100001 SET @@session.server_id=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -103,7 +103,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=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -124,7 +124,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -145,7 +145,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -166,7 +166,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -187,7 +187,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -208,7 +208,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -229,7 +229,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; 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 2452c47573e..2ab9391d1bf 100644 --- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result +++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result @@ -41,10 +41,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -61,7 +61,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -87,7 +87,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test2`/*!*/; @@ -96,7 +96,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -120,7 +120,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -142,7 +142,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 ddl -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; # at # use `new_test3`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -151,7 +151,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -175,7 +175,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -197,7 +197,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -236,7 +236,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -282,10 +282,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # use `new_test1`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -302,7 +302,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -328,7 +328,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test2`/*!*/; @@ -337,7 +337,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -361,7 +361,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -383,7 +383,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 ddl -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; # at # use `new_test3`/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 @@ -392,7 +392,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -416,7 +416,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -438,7 +438,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -477,7 +477,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # 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 a6f5cee1e25..099c3fb533e 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result +++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result @@ -85,10 +85,10 @@ DELIMITER /*!*/; #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000003 # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=#*//*!*/; -/*!100001 SET @@session.server_id=#*//*!*/; -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=#*//*!*/; +/*M!100001 SET @@session.server_id=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -105,7 +105,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=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -120,7 +120,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -135,7 +135,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -150,7 +150,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -165,7 +165,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -180,7 +180,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; START TRANSACTION /*!*/; # at # @@ -195,7 +195,7 @@ COMMIT /*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX GTID #-#-# ddl -/*!100001 SET @@session.gtid_seq_no=#*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=#*//*!*/; # at # #YYMMDD HH:MM:SS server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=XXX/*!*/; diff --git a/mysql-test/suite/binlog/r/flashback.result b/mysql-test/suite/binlog/r/flashback.result index ebbbeef9572..4aff1ba93ec 100644 --- a/mysql-test/suite/binlog/r/flashback.result +++ b/mysql-test/suite/binlog/r/flashback.result @@ -51,10 +51,10 @@ ROLLBACK/*!*/; #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001 # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 9:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -80,7 +80,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; START TRANSACTION /*!*/; # at # @@ -106,7 +106,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -132,7 +132,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -158,7 +158,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -212,7 +212,7 @@ START TRANSACTION 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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result index 31b988a2c03..100572dd2a3 100644 --- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result +++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result @@ -112,10 +112,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -131,7 +131,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -139,7 +139,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -147,7 +147,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -174,7 +174,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -201,7 +201,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -228,7 +228,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -270,7 +270,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -297,7 +297,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -353,10 +353,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -372,15 +372,15 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-4 -/*!100001 SET @@session.gtid_seq_no=4*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -407,7 +407,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -420,7 +420,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -433,7 +433,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -463,7 +463,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -476,7 +476,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -515,10 +515,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -534,7 +534,7 @@ CREATE DATABASE test1 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -542,7 +542,7 @@ CREATE DATABASE test2 /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -550,7 +550,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -574,7 +574,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-5 -/*!100001 SET @@session.gtid_seq_no=5*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -598,7 +598,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-6 -/*!100001 SET @@session.gtid_seq_no=6*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -622,7 +622,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-7 -/*!100001 SET @@session.gtid_seq_no=7*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -659,7 +659,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-8 -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; START TRANSACTION /*!*/; # at # @@ -683,7 +683,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # GTID 0-1-9 -/*!100001 SET @@session.gtid_seq_no=9*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # diff --git a/mysql-test/suite/compat/oracle/r/column_compression.result b/mysql-test/suite/compat/oracle/r/column_compression.result index 10fc92480c0..9e4f758bb58 100644 --- a/mysql-test/suite/compat/oracle/r/column_compression.result +++ b/mysql-test/suite/compat/oracle/r/column_compression.result @@ -24,10 +24,10 @@ d TINYTEXT COMPRESSED BINARY SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid("a")), - "b" varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, - "c" varchar(1000) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, - "d" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid("a")), + "b" varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, + "c" varchar(1000) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL, + "d" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; # @@ -41,49 +41,49 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -94,35 +94,35 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -134,7 +134,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) ASCII COMPRESSED); @@ -143,7 +143,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) BYTE COMPRESSED); @@ -152,7 +152,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -192,49 +192,49 @@ CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -245,35 +245,35 @@ CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -285,7 +285,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) ASCII COMPRESSED); @@ -294,7 +294,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR2(10) BYTE COMPRESSED); @@ -303,7 +303,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varbinary(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varbinary(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -343,49 +343,49 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -396,35 +396,35 @@ CREATE TABLE t1 (a TINYTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -436,7 +436,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT ASCII COMPRESSED); @@ -445,7 +445,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinytext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinytext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYTEXT BYTE COMPRESSED); @@ -454,7 +454,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -494,49 +494,49 @@ CREATE TABLE t1 (a TEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -547,35 +547,35 @@ CREATE TABLE t1 (a TEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT '' + "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT '' + "a" text /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -587,7 +587,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT ASCII COMPRESSED); @@ -596,7 +596,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" text /*!100301 COMPRESSED*/ DEFAULT NULL + "a" text /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TEXT BYTE COMPRESSED); @@ -605,7 +605,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" blob(65535) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" blob(65535) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -645,49 +645,49 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -698,35 +698,35 @@ CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -738,7 +738,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT ASCII COMPRESSED); @@ -747,7 +747,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMTEXT BYTE COMPRESSED); @@ -756,7 +756,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -796,49 +796,49 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED UNICODE); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET ucs2 COLLATE ucs2_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; # @@ -849,35 +849,35 @@ CREATE TABLE t1 (a LONGTEXT COMPRESSED BYTE DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED BINARY DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED ASCII DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT '' + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT COMPRESSED CHARACTER SET utf8 GENERATED ALWAYS AS (REPEAT('a',100))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci GENERATED ALWAYS AS (repeat('a',100)) VIRTUAL ) DROP TABLE t1; # @@ -889,7 +889,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT ASCII COMPRESSED); @@ -898,7 +898,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longtext /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longtext /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGTEXT BYTE COMPRESSED); @@ -907,7 +907,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -949,7 +949,7 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -960,21 +960,21 @@ CREATE TABLE t1 (a VARCHAR(10) COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" varchar(10) /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -986,7 +986,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT '' + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a VARCHAR(10) NULL COMPRESSED); @@ -995,7 +995,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1024,7 +1024,7 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1035,21 +1035,21 @@ CREATE TABLE t1 (a TINYBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" tinyblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1061,7 +1061,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a TINYBLOB NULL COMPRESSED); @@ -1070,7 +1070,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" tinyblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" tinyblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1099,7 +1099,7 @@ CREATE TABLE t1 (a BLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1110,21 +1110,21 @@ CREATE TABLE t1 (a BLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a BLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1136,7 +1136,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a BLOB NULL COMPRESSED); @@ -1145,7 +1145,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1174,7 +1174,7 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1185,21 +1185,21 @@ CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" mediumblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1211,7 +1211,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a MEDIUMBLOB NULL COMPRESSED); @@ -1220,7 +1220,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" mediumblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" mediumblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1249,7 +1249,7 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1260,21 +1260,21 @@ CREATE TABLE t1 (a LONGBLOB COMPRESSED DEFAULT ''); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED NULL); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB COMPRESSED GENERATED ALWAYS AS (REPEAT('a',10))); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL + "a" longblob /*M!100301 COMPRESSED*/ GENERATED ALWAYS AS (repeat('a',10)) VIRTUAL ) DROP TABLE t1; # @@ -1286,7 +1286,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT '' + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT '' ) DROP TABLE t1; CREATE TABLE t1 (a LONGBLOB NULL COMPRESSED); @@ -1295,7 +1295,7 @@ Warning 1287 ' ... COMPRESSED...' is deprecate SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" longblob /*!100301 COMPRESSED*/ DEFAULT NULL + "a" longblob /*M!100301 COMPRESSED*/ DEFAULT NULL ) DROP TABLE t1; # @@ -1324,7 +1324,7 @@ CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED); SHOW CREATE TABLE t1; Table Create Table t1 CREATE TABLE "t1" ( - "a" varchar(10) /*!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL + "a" varchar(10) /*M!100301 COMPRESSED*/ CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL ) DROP TABLE t1; CREATE TABLE t1 (a NVARCHAR(10) COMPRESSED BINARY COMPRESSED); 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 b7019d051e1..c2d871cdba4 100644 --- a/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result +++ b/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result @@ -191,10 +191,10 @@ ROLLBACK/*!*/; #010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint slave-bin.000001 # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl -/*!100101 SET @@session.skip_parallel_replication=0*//*!*/; -/*!100001 SET @@session.gtid_domain_id=0*//*!*/; -/*!100001 SET @@session.server_id=1*//*!*/; -/*!100001 SET @@session.gtid_seq_no=1*//*!*/; +/*M!100101 SET @@session.skip_parallel_replication=0*//*!*/; +/*M!100001 SET @@session.gtid_domain_id=0*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=1*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 use `test`/*!*/; @@ -211,7 +211,7 @@ CREATE TABLE t1 (a INT, b INT, c INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2 ddl -/*!100001 SET @@session.gtid_seq_no=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=2*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -219,8 +219,8 @@ CREATE TABLE t2 (a INT, b INT, c INT) /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-2-3 ddl -/*!100001 SET @@session.server_id=2*//*!*/; -/*!100001 SET @@session.gtid_seq_no=3*//*!*/; +/*M!100001 SET @@session.server_id=2*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -228,8 +228,8 @@ ALTER TABLE t1 ENGINE=BLACKHOLE /*!*/; # at # #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*//*!*/; +/*M!100001 SET @@session.server_id=1*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=3*//*!*/; START TRANSACTION /*!*/; # at # @@ -247,7 +247,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=4*//*!*/; START TRANSACTION /*!*/; # at # @@ -265,7 +265,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=5*//*!*/; START TRANSACTION /*!*/; # at # @@ -283,7 +283,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=6*//*!*/; START TRANSACTION /*!*/; # at # @@ -301,7 +301,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=7*//*!*/; START TRANSACTION /*!*/; # at # @@ -319,7 +319,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8 ddl -/*!100001 SET @@session.gtid_seq_no=8*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=8*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -327,7 +327,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=9*//*!*/; START TRANSACTION /*!*/; # at # @@ -345,7 +345,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=10*//*!*/; START TRANSACTION /*!*/; # at # @@ -363,7 +363,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=11*//*!*/; START TRANSACTION /*!*/; # at # @@ -381,7 +381,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-12 ddl -/*!100001 SET @@session.gtid_seq_no=12*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=12*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; @@ -389,7 +389,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=13*//*!*/; START TRANSACTION /*!*/; # at # @@ -407,7 +407,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=14*//*!*/; START TRANSACTION /*!*/; # at # @@ -425,7 +425,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*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=15*//*!*/; START TRANSACTION /*!*/; # at # @@ -443,7 +443,7 @@ COMMIT /*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-16 ddl -/*!100001 SET @@session.gtid_seq_no=16*//*!*/; +/*M!100001 SET @@session.gtid_seq_no=16*//*!*/; # at # #010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 SET TIMESTAMP=1000000000/*!*/; diff --git a/sql/field.h b/sql/field.h index 5aa50294b0a..f249c00fb05 100644 --- a/sql/field.h +++ b/sql/field.h @@ -4255,7 +4255,7 @@ private: void sql_type(String &str) const override { Field_varstring::sql_type(str); - str.append(STRING_WITH_LEN(" /*!100301 COMPRESSED*/")); + str.append(STRING_WITH_LEN(" /*M!100301 COMPRESSED*/")); } uint32 max_display_length() const override { return field_length - 1; } uint32 character_octet_length() const override { return field_length - 1; } @@ -4691,7 +4691,7 @@ private: void sql_type(String &str) const override { Field_blob::sql_type(str); - str.append(STRING_WITH_LEN(" /*!100301 COMPRESSED*/")); + str.append(STRING_WITH_LEN(" /*M!100301 COMPRESSED*/")); } /* diff --git a/sql/log_event_client.cc b/sql/log_event_client.cc index 654701afaa0..11fabbbca39 100644 --- a/sql/log_event_client.cc +++ b/sql/log_event_client.cc @@ -3863,7 +3863,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) print_event_info->allow_parallel != !!(flags2 & FL_ALLOW_PARALLEL)) { if (my_b_printf(&cache, - "/*!100101 SET @@session.skip_parallel_replication=%u*/%s\n", + "/*M!100101 SET @@session.skip_parallel_replication=%u*/%s\n", !(flags2 & FL_ALLOW_PARALLEL), print_event_info->delimiter)) goto err; @@ -3875,7 +3875,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) print_event_info->domain_id != domain_id) { if (my_b_printf(&cache, - "/*!100001 SET @@session.gtid_domain_id=%u*/%s\n", + "/*M!100001 SET @@session.gtid_domain_id=%u*/%s\n", domain_id, print_event_info->delimiter)) goto err; print_event_info->domain_id= domain_id; @@ -3885,7 +3885,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) if (!print_event_info->server_id_printed || print_event_info->server_id != server_id) { - if (my_b_printf(&cache, "/*!100001 SET @@session.server_id=%u*/%s\n", + if (my_b_printf(&cache, "/*M!100001 SET @@session.server_id=%u*/%s\n", server_id, print_event_info->delimiter)) goto err; print_event_info->server_id= server_id; @@ -3893,7 +3893,7 @@ Gtid_log_event::print(FILE *file, PRINT_EVENT_INFO *print_event_info) } if (!is_flashback) - if (my_b_printf(&cache, "/*!100001 SET @@session.gtid_seq_no=%s*/%s\n", + if (my_b_printf(&cache, "/*M!100001 SET @@session.gtid_seq_no=%s*/%s\n", buf, print_event_info->delimiter)) goto err; } From d20518168aff435a4843eebb108e5b9df24c19fb Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 17 Jun 2024 15:54:30 +0200 Subject: [PATCH 51/60] also protect the /*!999999 sandbox comment --- client/mysqldump.c | 2 +- mysql-test/main/ddl_i18n_koi8r.result | 12 +- mysql-test/main/ddl_i18n_utf8.result | 12 +- mysql-test/main/lock_view.result | 4 +- mysql-test/main/mysql.result | 4 +- mysql-test/main/mysqldump-compat-102.result | 2 +- mysql-test/main/mysqldump-max.result | 4 +- mysql-test/main/mysqldump-nl.result | 4 +- mysql-test/main/mysqldump-no-binlog.result | 2 +- mysql-test/main/mysqldump-system.result | 6 +- mysql-test/main/mysqldump-timing.result | 4 +- mysql-test/main/mysqldump-utf8mb4.result | 2 +- mysql-test/main/mysqldump.result | 203 +++++++++--------- mysql-test/main/openssl_1.result | 6 +- mysql-test/main/plugin_auth.result | 2 +- mysql-test/main/rpl_mysqldump_slave.result | 34 +-- mysql-test/main/trigger_wl3253.result | 4 +- .../suite/archive/archive_bitfield.result | 2 +- .../r/mysqldump_restore_func_qualified.result | 2 +- .../oracle/r/sp-package-mysqldump.result | 2 +- mysql-test/suite/federated/federatedx.result | 2 +- mysql-test/suite/roles/definer.result | 2 +- mysql-test/suite/s3/mysqldump.result | 4 +- .../suite/sql_sequence/mysqldump.result | 10 +- .../connect/mysql-test/connect/r/mysql.result | 2 +- 25 files changed, 168 insertions(+), 165 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 867bb620b00..65ea08b8774 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -755,7 +755,7 @@ static void write_header(FILE *sql_file, const char *db_name) } else { - fprintf(sql_file, "/*!999999\\- enable the sandbox mode */ \n"); + fprintf(sql_file, "/*M!999999\\- enable the sandbox mode */ \n"); if (!opt_compact) { print_comment(sql_file, 0, diff --git a/mysql-test/main/ddl_i18n_koi8r.result b/mysql-test/main/ddl_i18n_koi8r.result index ab5104123a0..be375e501cd 100644 --- a/mysql-test/main/ddl_i18n_koi8r.result +++ b/mysql-test/main/ddl_i18n_koi8r.result @@ -719,7 +719,7 @@ ca cb utf8_general_ci utf8_general_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -796,7 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.sp.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1725,7 +1725,7 @@ koi8r_general_ci utf8_general_ci koi8r_general_ci koi8r_general_ci utf8_general_ DELETE FROM mysqltest2.log| ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1805,7 +1805,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.triggers.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2489,7 +2489,7 @@ COLLATION( ' END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 koi8r koi8r_general_ci utf8_unicode_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2557,7 +2557,7 @@ DELIMITER ; ---> Dumping mysqltest1 to ddl_i18n_koi8r.events.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; diff --git a/mysql-test/main/ddl_i18n_utf8.result b/mysql-test/main/ddl_i18n_utf8.result index 457f68a33af..ef1b7e62d40 100644 --- a/mysql-test/main/ddl_i18n_utf8.result +++ b/mysql-test/main/ddl_i18n_utf8.result @@ -719,7 +719,7 @@ ca cb utf8_general_ci utf8_general_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -796,7 +796,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_utf8sp.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1725,7 +1725,7 @@ utf8_general_ci utf8_general_ci koi8r_general_ci utf8_general_ci utf8_general_ci DELETE FROM mysqltest2.log| ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -1805,7 +1805,7 @@ ALTER DATABASE `mysqltest1` CHARACTER SET cp866 COLLATE cp866_general_ci ; ---> Dumping mysqltest1 to ddl_i18n_utf8triggers.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2489,7 +2489,7 @@ COLLATION( 'ั‚ะตะบัั‚') AS c4, END ONE TIME 1970-01-02 00:00:00 NULL NULL NULL NULL DISABLED PRESERVE CREATED LAST_ALTERED NULL 1 utf8 utf8_general_ci utf8_unicode_ci ---> Dump of mysqltest1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; @@ -2557,7 +2557,7 @@ DELIMITER ; ---> Dumping mysqltest1 to ddl_i18n_utf8events.mysqltest1.sql ---> Dump of mysqltest2 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET cp866 COLLATE cp866_general_ci */; diff --git a/mysql-test/main/lock_view.result b/mysql-test/main/lock_view.result index 3d710f38936..cd693032d87 100644 --- a/mysql-test/main/lock_view.result +++ b/mysql-test/main/lock_view.result @@ -16,7 +16,7 @@ create definer=definer@localhost view mysqltest3.v3is as select schema_name from create definer=definer@localhost view mysqltest3.v3ps as select user from performance_schema.users where current_connections>0 order by user; create definer=definer@localhost view mysqltest3.v3nt as select 1; create definer=definer@localhost sql security invoker view mysqltest3.v3i as select * from mysqltest1.t1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci */; @@ -236,7 +236,7 @@ create view v1 as select * from (select * from t1) dt; lock table v1 read; disconnect con1; connection default; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE VIEW `v1` AS SELECT diff --git a/mysql-test/main/mysql.result b/mysql-test/main/mysql.result index 0bb447df47a..1e02cd9f595 100644 --- a/mysql-test/main/mysql.result +++ b/mysql-test/main/mysql.result @@ -560,7 +560,7 @@ Table Create Table a1\`b1 CREATE TABLE `a1\``b1` ( `a` int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `a1\``b1` ( @@ -590,7 +590,7 @@ Table Create Table a1\"b1 CREATE TABLE "a1\""b1" ( "a" int(11) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE "a1\""b1" ( diff --git a/mysql-test/main/mysqldump-compat-102.result b/mysql-test/main/mysqldump-compat-102.result index d5ed54570e2..d3cc35d3c19 100644 --- a/mysql-test/main/mysqldump-compat-102.result +++ b/mysql-test/main/mysqldump-compat-102.result @@ -58,7 +58,7 @@ BEGIN log(0, 'Session ' || connection_id() || ' ' || current_user || ' started'); END; $$ -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- MariaDB dump DUMPVERSION Distrib DISTVERSION, for OS -- -- Host: localhost Database: db1_mdev17429 diff --git a/mysql-test/main/mysqldump-max.result b/mysql-test/main/mysqldump-max.result index 28c111d37b7..4a2fe09d44d 100644 --- a/mysql-test/main/mysqldump-max.result +++ b/mysql-test/main/mysqldump-max.result @@ -77,7 +77,7 @@ id name 3 first value 4 first value 5 first value -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -175,7 +175,7 @@ INSERT IGNORE INTO `t6` VALUES (1,'first value'),(2,'first value'),(3,'first val /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-nl.result b/mysql-test/main/mysqldump-nl.result index 1e9928308fc..56e9c56bae2 100644 --- a/mysql-test/main/mysqldump-nl.result +++ b/mysql-test/main/mysqldump-nl.result @@ -12,7 +12,7 @@ create procedure sp() select * from `v1 1v`; flush tables; use test; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- -- Current Database: `mysqltest1 @@ -135,7 +135,7 @@ test\` \! ls # test` -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ -- -- Current Database: `test``` diff --git a/mysql-test/main/mysqldump-no-binlog.result b/mysql-test/main/mysqldump-no-binlog.result index 669675ff21b..995f576e0db 100644 --- a/mysql-test/main/mysqldump-no-binlog.result +++ b/mysql-test/main/mysqldump-no-binlog.result @@ -1,2 +1,2 @@ mariadb-dump: Error: Binlogging on server not active -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ diff --git a/mysql-test/main/mysqldump-system.result b/mysql-test/main/mysqldump-system.result index 98cdd16abef..5bfe363d694 100644 --- a/mysql-test/main/mysqldump-system.result +++ b/mysql-test/main/mysqldump-system.result @@ -38,7 +38,7 @@ CREATE FUNCTION metaphon RETURNS STRING SONAME "UDF_EXAMPLE_LIB"; # # mysqldump of system tables with --system=all # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -163,7 +163,7 @@ UNLOCK TABLES; # # mysqldump of system tables with --system=all --replace # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -309,7 +309,7 @@ UNLOCK TABLES; # # mysqldump of system tables with --system=all --insert-ignore # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-timing.result b/mysql-test/main/mysqldump-timing.result index e70aaf3b0f8..2ac132412f9 100644 --- a/mysql-test/main/mysqldump-timing.result +++ b/mysql-test/main/mysqldump-timing.result @@ -7,7 +7,7 @@ CREATE TABLE t1 (i INT); INSERT INTO t1 VALUES (0); LOCK TABLE t1 WRITE; timeout without t1 contents expected -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -31,7 +31,7 @@ SET @save_max_statement_time=@@max_statement_time; SET GLOBAL max_statement_time=0.1; UNLOCK TABLES;; This would be a race condition otherwise, but default max_statement_time=0 makes it succeed -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump-utf8mb4.result b/mysql-test/main/mysqldump-utf8mb4.result index ce321a59361..dc2ec06554e 100644 --- a/mysql-test/main/mysqldump-utf8mb4.result +++ b/mysql-test/main/mysqldump-utf8mb4.result @@ -32,7 +32,7 @@ Testing XML format output ---- Testing text format output ---- -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result index b69e6168c86..08725299a38 100644 --- a/mysql-test/main/mysqldump.result +++ b/mysql-test/main/mysqldump.result @@ -31,7 +31,7 @@ DROP TABLE t1; CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), ("0987654321098765432109876543210987654321"); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -47,7 +47,7 @@ CREATE TABLE t1 (a double); INSERT IGNORE INTO t1 VALUES ('-9e999999'); Warnings: Warning 1264 Out of range value for column 'a' at row 1 -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -69,7 +69,7 @@ INSERT INTO t1 VALUES ('1.2345', 2.3456); INSERT INTO t1 VALUES ("1.2345", 2.3456); ERROR 42S22: Unknown column '1.2345' in 'field list' SET SQL_MODE=@OLD_SQL_MODE; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -78,7 +78,7 @@ CREATE TABLE `t1` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci; /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( @@ -87,7 +87,7 @@ CREATE TABLE `t1` ( ); /*!40101 SET character_set_client = @saved_cs_client */; INSERT INTO `t1` VALUES (1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456),(1.23450,2.3456); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -123,7 +123,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -200,7 +200,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r; INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -242,7 +242,7 @@ DROP TABLE t1; # CREATE TABLE t1 (a int) ENGINE=MYISAM; INSERT INTO t1 VALUES (1), (2); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -266,7 +266,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -295,7 +295,7 @@ DROP TABLE t1; # Bug#2592 mysqldump doesn't quote "tricky" names correctly # create table ```a` (i int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE ```a` ( @@ -307,7 +307,7 @@ drop table ```a`; # Bug#2591 mysqldump quotes names inconsistently # create table t1(a int); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -341,7 +341,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -368,7 +368,7 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; set global sql_mode='ANSI_QUOTES'; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -402,7 +402,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -435,7 +435,7 @@ drop table t1; # create table t1(a int); insert into t1 values (1),(2),(3); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -468,7 +468,7 @@ drop table t1; # # Bug#6101 create database problem # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -495,7 +495,7 @@ USE `test`; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; create database mysqldump_test_db character set latin2 collate latin2_bin; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -530,7 +530,7 @@ drop database mysqldump_test_db; # if it is explicitly set. CREATE TABLE t1 (a CHAR(10)); INSERT INTO t1 VALUES (_latin1 'ฤึ฿'); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -572,7 +572,7 @@ UNLOCK TABLES; # If the future we can move this command into a separate test with # checking that "mysqldump" is compiled with "latin1" # -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -596,7 +596,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -620,7 +620,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -652,7 +652,7 @@ CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t2 VALUES (4),(5),(6); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -694,7 +694,7 @@ DROP TABLE t2; # CREATE TABLE t1 (`b` blob); INSERT INTO `t1` VALUES (0x602010000280100005E71A); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -736,7 +736,7 @@ DROP TABLE t1; CREATE TABLE t1 (a INT) ENGINE=MyISAM; INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (4),(5),(6); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -771,7 +771,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1141,7 +1141,7 @@ F_cd00692c3bfe59267d5ecfac5310286c int, F_6faa8040da20ef399b63a72d0e4ab575 int, F_fe73f687e5bc5280214e0486b273a5f9 int); insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1511,7 +1511,7 @@ drop table t1; # CREATE TABLE t1 (a int); INSERT INTO t1 VALUES (1),(2),(3); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1562,7 +1562,7 @@ CREATE TABLE t1 ( a INT ); CREATE TABLE t2 ( a INT ); INSERT INTO t1 VALUES (1), (2); INSERT INTO t2 VALUES (1), (2); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1598,7 +1598,7 @@ CREATE TABLE `t2` ( /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1671,35 +1671,35 @@ create table t3(a varchar(30) primary key, b int not null); test_sequence ------ Testing with illegal table names ------ mariadb-dump: Couldn't find table: "\d-2-1.sql" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\t1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\t1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "\\t1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t\1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t\1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "t/1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T%1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T'1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_1" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Couldn't find table: "T_" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ test_sequence ------ Testing with illegal database names ------ mariadb-dump: Got error: 1049: "Unknown database 'mysqldump_test_d'" when selecting the database -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ mariadb-dump: Got error: 1049: "Unknown database 'mysqld\ump_test_db'" when selecting the database -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ drop table t1, t2, t3; drop database mysqldump_test_db; use test; @@ -1761,7 +1761,7 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1793,7 +1793,7 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1912,7 +1912,7 @@ create table t1(a int); create table t2(a int); create table t3(a int); mariadb-dump: Couldn't find table: "non_existing" -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1962,7 +1962,7 @@ drop table t1, t2, t3; create table t1 (a int); mariadb-dump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ `a` FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064) mariadb-dump: Got error: 1064: "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1" when retrieving data from server -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2004,7 +2004,7 @@ CREATE TABLE `t1` ( PRIMARY KEY (`a b`, `c"d`, `e``f`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; insert into t1 values (0815, 4711, 2006); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; @@ -2034,7 +2034,7 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2089,7 +2089,7 @@ INSERT INTO t2 VALUES ('bingo'); INSERT INTO t2 VALUES ('waffle'); INSERT INTO t2 VALUES ('lemon'); create view v2 as select * from t2 where a like 'a%' with check option; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2184,7 +2184,7 @@ drop database db1; use test; create table t1(a int); create view v1 as select * from t1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2255,7 +2255,7 @@ INSERT INTO t2 VALUES ('bingo'); INSERT INTO t2 VALUES ('waffle'); INSERT INTO t2 VALUES ('lemon'); create view v2 as select * from t2 where a like 'a%' with check option; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2321,7 +2321,7 @@ use test; # CREATE TABLE t1 (a char(10)); INSERT INTO t1 VALUES ('\''); -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2368,7 +2368,7 @@ create view v1 as select * from v3 where b in (1, 2, 3, 4, 5, 6, 7); create view v2 as select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2518,7 +2518,7 @@ end if; end AFTER 0000-00-00 00:00:00 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci INSERT INTO t1 (a) VALUES (1),(2),(3),(22); update t1 set a = 4 where a=3; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2648,7 +2648,7 @@ DELIMITER ; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -/*!999999\- enable the sandbox mode */ +/*M!999999\- enable the sandbox mode */ /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -2796,7 +2796,7 @@ Warning 1287 '