From d966e55c0a31dcd823656671abf3cedda8a7287a Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 2 Apr 2024 00:11:34 +0300 Subject: [PATCH 1/6] MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions When INSERT does auto-create for t1 all its handler instances are closed by alter_close_table(). At this time down the stack maria_close() clears share->state_history. Later when we unlock the tables Aria transaction manager accesses old share instance (the one before t1 was closed) and tries to reset its state_history. The problem is maria_close() didn't remove table from transaction's list (used_tables). The fix does _ma_remove_table_from_trnman() which is triggered by HA_EXTRA_PREPARE_FOR_RENAME. --- .../suite/versioning/r/partition.result | 18 ++++++++++++++++ mysql-test/suite/versioning/t/partition.test | 21 +++++++++++++++++++ sql/sql_partition.cc | 2 +- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index 4c1486d0738..fb9244c223c 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -3447,4 +3447,22 @@ ERROR HY000: Maybe missing parameters: no rotation condition for multiple HISTOR # # End of 10.5 tests # +# +# MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions +# +set timestamp= unix_timestamp('2000-01-01 00:00:00'); +create table t1 (x int) engine=aria with system versioning partition by system_time interval 1 hour auto partitions 3; +insert into t1 values (1); +create table t2 (x int) engine=aria; +create trigger tr after insert on t2 for each row update t1 set x= x + 11; +lock tables t1 write, t2 write; +update t1 set x= x + 1; +set timestamp= unix_timestamp('2000-01-01 13:00:00'); +insert into t2 values (5); +unlock tables; +drop table t1, t2; +set timestamp= default; +# +# End of 10.9 tests +# set global innodb_stats_persistent= @save_persistent; diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index 3699ac286c8..280b45c5328 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -2673,5 +2673,26 @@ create table t (a int) with system versioning partition by system_time partition --echo # End of 10.5 tests --echo # +--echo # +--echo # MDEV-31903 Server crashes in _ma_reset_history upon UNLOCK table with auto-create history partitions +--echo # +set timestamp= unix_timestamp('2000-01-01 00:00:00'); +create table t1 (x int) engine=aria with system versioning partition by system_time interval 1 hour auto partitions 3; +insert into t1 values (1); + +create table t2 (x int) engine=aria; +create trigger tr after insert on t2 for each row update t1 set x= x + 11; +lock tables t1 write, t2 write; +update t1 set x= x + 1; +set timestamp= unix_timestamp('2000-01-01 13:00:00'); +insert into t2 values (5); +unlock tables; +drop table t1, t2; +set timestamp= default; + +--echo # +--echo # End of 10.9 tests +--echo # + set global innodb_stats_persistent= @save_persistent; --source suite/versioning/common_finish.inc diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 483ea1566c5..590c2a508f4 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -7753,7 +7753,7 @@ uint fast_alter_partition_table(THD *thd, TABLE *table, ERROR_INJECT("add_partition_1") || mysql_write_frm(lpt, WFRM_WRITE_SHADOW) || ERROR_INJECT("add_partition_2") || - wait_while_table_is_used(thd, table, HA_EXTRA_NOT_USED) || + wait_while_table_is_used(thd, table, HA_EXTRA_PREPARE_FOR_RENAME) || ERROR_INJECT("add_partition_3") || write_log_add_change_partition(lpt) || ERROR_INJECT("add_partition_4") || From c477697422b1ba8cac5e3b85c46969b160f4ad5a Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 2 Apr 2024 00:11:35 +0300 Subject: [PATCH 2/6] MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition Delayed_insert has its own THD (initialized at mysql_insert()) and hence its own LEX. Delayed_insert initalizes a very few parameters for LEX and 'duplicates' is not in this list. Now we copy this missing parameter from parser LEX (as well as sql_command). --- mysql-test/suite/versioning/r/partition.result | 5 +++++ mysql-test/suite/versioning/t/partition.test | 17 +++++++++++++++++ sql/sql_insert.cc | 9 +++++---- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/mysql-test/suite/versioning/r/partition.result b/mysql-test/suite/versioning/r/partition.result index fb9244c223c..02cecea692e 100644 --- a/mysql-test/suite/versioning/r/partition.result +++ b/mysql-test/suite/versioning/r/partition.result @@ -3463,6 +3463,11 @@ unlock tables; drop table t1, t2; set timestamp= default; # +# MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition +# +create table t (a int) with system versioning partition by system_time limit 100 partitions 3; +drop table t; +# # End of 10.9 tests # set global innodb_stats_persistent= @save_persistent; diff --git a/mysql-test/suite/versioning/t/partition.test b/mysql-test/suite/versioning/t/partition.test index 280b45c5328..5707746f96c 100644 --- a/mysql-test/suite/versioning/t/partition.test +++ b/mysql-test/suite/versioning/t/partition.test @@ -2690,6 +2690,23 @@ unlock tables; drop table t1, t2; set timestamp= default; +--echo # +--echo # MDEV-29872 MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition +--echo # +create table t (a int) with system versioning partition by system_time limit 100 partitions 3; +let $emb= `select if(version() like '%embedded%', 1, 0)`; +if (!$emb) +{ + --disable_result_log + --disable_query_log + --error ER_DELAYED_NOT_SUPPORTED + insert delayed into t () values (); + --enable_query_log + --enable_result_log +} +# cleanup +drop table t; + --echo # --echo # End of 10.9 tests --echo # diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c579ad17550..875a7964de4 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2401,7 +2401,7 @@ public: passed from connection thread to the handler thread. */ MDL_request grl_protection; - Delayed_insert(SELECT_LEX *current_select) + Delayed_insert(LEX *lex) :locks_in_memory(0), thd(next_thread_id()), table(0),tables_in_use(0), stacked_inserts(0), status(0), retry(0), handler_thread_initialized(FALSE), group_count(0) @@ -2414,8 +2414,9 @@ public: strmake_buf(thd.security_ctx->priv_user, thd.security_ctx->user); thd.current_tablenr=0; thd.set_command(COM_DELAYED_INSERT); - thd.lex->current_select= current_select; - thd.lex->sql_command= SQLCOM_INSERT; // For innodb::store_lock() + thd.lex->current_select= lex->current_select; + thd.lex->sql_command= lex->sql_command; // For innodb::store_lock() + thd.lex->duplicates= lex->duplicates; /* Prevent changes to global.lock_wait_timeout from affecting delayed insert threads as any timeouts in delayed inserts @@ -2591,7 +2592,7 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request, */ if (! (di= find_handler(thd, table_list))) { - if (!(di= new Delayed_insert(thd->lex->current_select))) + if (!(di= new Delayed_insert(thd->lex))) goto end_create; /* From 099ca49cc2f13587a3ed7004c3c3aa7d3860344d Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Tue, 2 Apr 2024 00:14:17 +0300 Subject: [PATCH 3/6] Columnstore empty submodule fix CMake doesn't set ${PLUGIN_COLUMNSTORE} to anything. --- storage/columnstore/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/columnstore/CMakeLists.txt b/storage/columnstore/CMakeLists.txt index ebb138c70f0..8e8859c8b68 100644 --- a/storage/columnstore/CMakeLists.txt +++ b/storage/columnstore/CMakeLists.txt @@ -1,6 +1,7 @@ #set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine") -if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}") +if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}" OR + NOT DEFINED ${PLUGIN_COLUMNSTORE}) return() endif() From 40973d855ce902c882831cad108a26ca9a37e912 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 2 Apr 2024 13:40:21 +0200 Subject: [PATCH 4/6] MDEV-32926 mysql_install_db_win fails on buildbot In mysql_install_db_win_admin test, dump bootstrap output in case of bootstrap failure. --- mysql-test/main/mysql_install_db_win_admin.result | 6 ------ mysql-test/main/mysql_install_db_win_admin.test | 5 ++++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/mysql-test/main/mysql_install_db_win_admin.result b/mysql-test/main/mysql_install_db_win_admin.result index 06d3d677977..dd0e4e3b260 100644 --- a/mysql-test/main/mysql_install_db_win_admin.result +++ b/mysql-test/main/mysql_install_db_win_admin.result @@ -1,10 +1,4 @@ use mysql; -Running bootstrap -Creating my.ini file -Removing default user -Allowing remote access for user root -Setting root password -Creation of the database was successful # Kill the server # restart: --datadir=MYSQLTEST_VARDIR/tmp/ddir connect root,localhost,root,wrongpass,mysql; diff --git a/mysql-test/main/mysql_install_db_win_admin.test b/mysql-test/main/mysql_install_db_win_admin.test index a6b98f97058..28a2356c465 100644 --- a/mysql-test/main/mysql_install_db_win_admin.test +++ b/mysql-test/main/mysql_install_db_win_admin.test @@ -6,12 +6,15 @@ # and start server from this directory. let $ddir= $MYSQLTEST_VARDIR/tmp/ddir; use mysql; -exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R; +--disable_result_log +exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo --verbose-bootstrap -R; +--enable_result_log --source include/kill_mysqld.inc let $restart_parameters=--datadir=$ddir; --source include/start_mysqld.inc # Check that connect with wrong password succeeds +# (because it can alternatively connect with GSSAPI as admin) connect (root,localhost,root,wrongpass,mysql); --source include/kill_mysqld.inc From baec63e3048ccca592b290daaa809b90bb1229d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 2 Apr 2024 09:41:49 +0200 Subject: [PATCH 5/6] MDEV-33787 : Fix Galera test failures on 10.11 --- mysql-test/suite/galera/r/MDEV-25731.result | 8 +--- .../galera/r/galera_wan_restart_sst.result | 9 ++++- mysql-test/suite/galera/t/MDEV-25731.test | 4 +- .../t/galera_ist_mariabackup_verify_ca.cnf | 2 + .../galera/t/galera_wan_restart_sst.test | 40 +++++++++++++++++-- ...riadb_clone_slave_using_mariadb-backup.cnf | 9 +++++ .../galera_3nodes/r/galera_allowlist.result | 3 ++ .../galera_3nodes/t/galera_allowlist.test | 9 +++++ .../suite/galera_3nodes_sr/r/GCF-832.result | 10 ++++- .../galera_sr_kill_slave_before_apply.result | 1 + .../suite/galera_3nodes_sr/t/GCF-832.test | 17 +++++++- .../t/galera_sr_kill_slave_before_apply.test | 3 ++ 12 files changed, 99 insertions(+), 16 deletions(-) diff --git a/mysql-test/suite/galera/r/MDEV-25731.result b/mysql-test/suite/galera/r/MDEV-25731.result index 92e1704e658..c750affda3e 100644 --- a/mysql-test/suite/galera/r/MDEV-25731.result +++ b/mysql-test/suite/galera/r/MDEV-25731.result @@ -4,9 +4,7 @@ connection node_1; SET GLOBAL wsrep_load_data_splitting=ON; Warnings: Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release -SET GLOBAL wsrep_replicate_myisam=ON; -Warnings: -Warning 1287 '@@wsrep_replicate_myisam' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=REPLICATE_MYISAM' instead +SET GLOBAL wsrep_mode=REPLICATE_MYISAM; CREATE TABLE t1 (c1 int) ENGINE=MYISAM; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n'; Warnings: @@ -33,6 +31,4 @@ DROP TABLE t1; SET GLOBAL wsrep_load_data_splitting=OFF; Warnings: Warning 1287 '@@wsrep_load_data_splitting' is deprecated and will be removed in a future release -SET GLOBAL wsrep_replicate_myisam=OFF; -Warnings: -Warning 1287 '@@wsrep_replicate_myisam' is deprecated and will be removed in a future release. Please use '@@wsrep_mode=REPLICATE_MYISAM' instead +SET GLOBAL wsrep_mode=DEFAULT; diff --git a/mysql-test/suite/galera/r/galera_wan_restart_sst.result b/mysql-test/suite/galera/r/galera_wan_restart_sst.result index 2433a1d9c48..edaefe0e563 100644 --- a/mysql-test/suite/galera/r/galera_wan_restart_sst.result +++ b/mysql-test/suite/galera/r/galera_wan_restart_sst.result @@ -10,7 +10,7 @@ SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VA EXPECT_4 4 connection node_1; -CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1); connection node_2; INSERT INTO t1 VALUES (2); @@ -20,6 +20,8 @@ connection node_4; INSERT INTO t1 VALUES (4); connection node_3; INSERT INTO t1 VALUES (13); +connection node_1; +connection node_3; Killing server ... connection node_1; INSERT INTO t1 VALUES (11); @@ -29,8 +31,11 @@ connection node_4; INSERT INTO t1 VALUES (14); connection node_3; INSERT INTO t1 VALUES (131); +connection node_1; connection node_2; INSERT INTO t1 VALUES (22); +connection node_1; +connection node_2; Killing server ... connection node_1; INSERT INTO t1 VALUES (21); @@ -42,6 +47,8 @@ connection node_2; INSERT INTO t1 VALUES (221); connection node_4; INSERT INTO t1 VALUES (34); +connection node_1; +connection node_4; Killing server ... connection node_1; INSERT INTO t1 VALUES (31); diff --git a/mysql-test/suite/galera/t/MDEV-25731.test b/mysql-test/suite/galera/t/MDEV-25731.test index c26fad2fa6a..8f5439704e8 100644 --- a/mysql-test/suite/galera/t/MDEV-25731.test +++ b/mysql-test/suite/galera/t/MDEV-25731.test @@ -3,7 +3,7 @@ --connection node_1 SET GLOBAL wsrep_load_data_splitting=ON; -SET GLOBAL wsrep_replicate_myisam=ON; +SET GLOBAL wsrep_mode=REPLICATE_MYISAM; CREATE TABLE t1 (c1 int) ENGINE=MYISAM; LOAD DATA INFILE '../../std_data/mdev-25731.dat' IGNORE INTO TABLE t1 LINES TERMINATED BY '\n'; SELECT COUNT(*) AS EXPECT_6 FROM t1; @@ -22,6 +22,6 @@ SELECT COUNT(*) AS EXPECT_12 FROM t1; --connection node_1 DROP TABLE t1; SET GLOBAL wsrep_load_data_splitting=OFF; -SET GLOBAL wsrep_replicate_myisam=OFF; +SET GLOBAL wsrep_mode=DEFAULT; diff --git a/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf b/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf index f2187b83486..ffd2306bfb3 100644 --- a/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf +++ b/mysql-test/suite/galera/t/galera_ist_mariabackup_verify_ca.cnf @@ -10,9 +10,11 @@ ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem [mysqld.1] wsrep_provider_options='base_port=@mysqld.1.#galera_port;pc.ignore_sb=true' +innodb-log-file-buffering [mysqld.2] wsrep_provider_options='base_port=@mysqld.2.#galera_port;pc.ignore_sb=true' +innodb-log-file-buffering [sst] ssl-mode=VERIFY_CA diff --git a/mysql-test/suite/galera/t/galera_wan_restart_sst.test b/mysql-test/suite/galera/t/galera_wan_restart_sst.test index 7a8c0df4946..e904f46c06a 100644 --- a/mysql-test/suite/galera/t/galera_wan_restart_sst.test +++ b/mysql-test/suite/galera/t/galera_wan_restart_sst.test @@ -11,6 +11,7 @@ --source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc +--source include/force_restart.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 --connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4 @@ -27,7 +28,7 @@ SELECT VARIABLE_VALUE AS EXPECT_4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; --connection node_1 -CREATE TABLE t1 (f1 INTEGER); +CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=INNODB; INSERT INTO t1 VALUES (1); --connection node_2 @@ -45,10 +46,20 @@ INSERT INTO t1 VALUES (4); --connection node_3 INSERT INTO t1 VALUES (13); - ---source include/kill_galera.inc +--let $wait_condition = SELECT COUNT(*) = 5 FROM t1; +--source include/wait_condition.inc --connection node_1 +--let $wait_condition = SELECT COUNT(*) = 5 FROM t1; +--source include/wait_condition.inc + +--connection node_3 +--source include/kill_galera.inc +--remove_file $MYSQLTEST_VARDIR/mysqld.3/data/grastate.dat + +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc INSERT INTO t1 VALUES (11); --connection node_2 @@ -62,6 +73,10 @@ INSERT INTO t1 VALUES (14); INSERT INTO t1 VALUES (131); +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + # # Restart node #2 # @@ -69,9 +84,17 @@ INSERT INTO t1 VALUES (131); --connection node_2 INSERT INTO t1 VALUES (22); +--connection node_1 +--let $wait_condition = SELECT COUNT(*) = 10 FROM t1; +--source include/wait_condition.inc + +--connection node_2 --source include/kill_galera.inc +--remove_file $MYSQLTEST_VARDIR/mysqld.2/data/grastate.dat --connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc INSERT INTO t1 VALUES (21); --connection node_3 @@ -90,11 +113,21 @@ INSERT INTO t1 VALUES (221); # --connection node_4 +--let $wait_condition = SELECT VARIABLE_VALUE = 4 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc INSERT INTO t1 VALUES (34); +--connection node_1 +--let $wait_condition = SELECT COUNT(*) = 15 FROM t1; +--source include/wait_condition.inc + +--connection node_4 --source include/kill_galera.inc +--remove_file $MYSQLTEST_VARDIR/mysqld.4/data/grastate.dat --connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc INSERT INTO t1 VALUES (31); --connection node_2 @@ -105,6 +138,7 @@ INSERT INTO t1 VALUES (33); --connection node_4 --source include/start_mysqld.inc +--remove_file $MYSQLTEST_VARDIR/mysqld.4/data/grastate.dat INSERT INTO t1 VALUES (341); diff --git a/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf b/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf index 52fd3093931..ebe1d47f200 100644 --- a/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf +++ b/mysql-test/suite/galera/t/rpl_galera_to_mariadb_clone_slave_using_mariadb-backup.cnf @@ -1 +1,10 @@ !include ../galera_2nodes_as_master.cnf + +[mysqld.1] +innodb-log-file-buffering + +[mysqld.2] +innodb-log-file-buffering + +[mysqld.3] +innodb-log-file-buffering diff --git a/mysql-test/suite/galera_3nodes/r/galera_allowlist.result b/mysql-test/suite/galera_3nodes/r/galera_allowlist.result index 471444d8c08..a3fb6cf7db5 100644 --- a/mysql-test/suite/galera_3nodes/r/galera_allowlist.result +++ b/mysql-test/suite/galera_3nodes/r/galera_allowlist.result @@ -7,6 +7,9 @@ connection node_2; SELECT COUNT(*) = 3 FROM mysql.wsrep_allowlist; COUNT(*) = 3 1 +connection node_1; +connection node_2; +connection node_3; connection node_3; SET @@global.wsrep_desync = 1; SET SESSION wsrep_sync_wait = 0; diff --git a/mysql-test/suite/galera_3nodes/t/galera_allowlist.test b/mysql-test/suite/galera_3nodes/t/galera_allowlist.test index 74fff61c4f8..de80965a584 100644 --- a/mysql-test/suite/galera_3nodes/t/galera_allowlist.test +++ b/mysql-test/suite/galera_3nodes/t/galera_allowlist.test @@ -12,6 +12,12 @@ SELECT COUNT(*) = 3 FROM mysql.wsrep_allowlist; --let $galera_server_number = 3 --source include/galera_connect.inc +# Save original auto_increment_offset values. +--let $node_1=node_1 +--let $node_2=node_2 +--let $node_3=node_3 +--source ../galera/include/auto_increment_offset_save.inc + --connection node_3 # Desync and disconnect node 3 from the PC: SET @@global.wsrep_desync = 1; @@ -64,3 +70,6 @@ CALL mtr.add_suppression('WSREP: Connection not allowed'); --connection node_3 CALL mtr.add_suppression('WSREP: Ignoring lack of quorum'); + +# Restore original auto_increment_offset values. +--source ../galera/include/auto_increment_offset_restore.inc diff --git a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result index 9043c66840d..ef21e4ca347 100644 --- a/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result +++ b/mysql-test/suite/galera_3nodes_sr/r/GCF-832.result @@ -6,20 +6,26 @@ connection node_2; connection node_3; connection node_2; SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal"; -CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 VARCHAR(30) not null primary key) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; SET SESSION wsrep_trx_fragment_size=1; START TRANSACTION; -INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('primary1'),('primary2'),('primary3'),('primary4'),('primary5'); COMMIT; Got one of the listed errors +connection node_1; +connection node_2; # restart connection node_1; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; COUNT(*) = 0 1 +SELECT * FROM t1; +f1 connection node_2; SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; COUNT(*) = 0 1 +SELECT * FROM t1; +f1 DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result index ef2bd7a45e1..08e3fc6c3e3 100644 --- a/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result +++ b/mysql-test/suite/galera_3nodes_sr/r/galera_sr_kill_slave_before_apply.result @@ -44,6 +44,7 @@ connection node_2; SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; EXPECT_0 0 +call mtr.add_suppression("WSREP: node uuid:.*"); connection node_1; DROP TABLE t1; DROP TABLE t2; diff --git a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test index 5da080a6c2c..2ecf5931b2a 100644 --- a/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test +++ b/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test @@ -4,6 +4,7 @@ # --source include/galera_cluster.inc --source include/have_debug_sync.inc +--source include/force_restart.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 # Save original auto_increment_offset values. @@ -13,30 +14,42 @@ --source ../galera/include/auto_increment_offset_save.inc --connection node_2 +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + SET GLOBAL debug_dbug="d,crash_last_fragment_commit_after_fragment_removal"; --let $_expect_file_name= `select regexp_replace(@@tmpdir, '^.*/','')` --let $_expect_file_name= $MYSQLTEST_VARDIR/tmp/$_expect_file_name.expect --exec echo "wait" > $_expect_file_name -CREATE TABLE t1 (f1 VARCHAR(30)) ENGINE=InnoDB; +CREATE TABLE t1 (f1 VARCHAR(30) not null primary key) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; SET SESSION wsrep_trx_fragment_size=1; START TRANSACTION; -INSERT INTO t1 VALUES ('primary'),('primary'),('primary'),('primary'),('primary'); +INSERT INTO t1 VALUES ('primary1'),('primary2'),('primary3'),('primary4'),('primary5'); --error 2013,2026 COMMIT; +--connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc + +--connection node_2 --source include/start_mysqld.inc --connection node_1 +--let $wait_condition = SELECT VARIABLE_VALUE = 3 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +SELECT * FROM t1; --connection node_2 --enable_reconnect SELECT COUNT(*) = 0 FROM mysql.wsrep_streaming_log; +SELECT * FROM t1; DROP TABLE t1; diff --git a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test index 355db2de456..58d744e704d 100644 --- a/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test +++ b/mysql-test/suite/galera_3nodes_sr/t/galera_sr_kill_slave_before_apply.test @@ -6,6 +6,7 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +--source include/force_restart.inc --connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3 # Save original auto_increment_offset values. @@ -86,6 +87,8 @@ SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; --connection node_2 SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log; +# As noted above sometimes node delivers the same view twice +call mtr.add_suppression("WSREP: node uuid:.*"); --connection node_1 DROP TABLE t1; From af4df93cf855228f094f2a19f7dd0bdc005035cf Mon Sep 17 00:00:00 2001 From: Aleksey Midenkov Date: Wed, 3 Apr 2024 16:39:36 +0300 Subject: [PATCH 6/6] Columnstore empty submodule fix 2 Original problem was error when configuring without initialized submodule Columnstore: The source directory /home/midenok/src/mariadb/10.6c/src/storage/columnstore/columnstore does not contain a CMakeLists.txt file. The original fix disabled Columnstore build when PLUGIN_COLUMNSTORE was not defined, but this seems to be wrong and any plugin should be built if it is not explicitly disabled. This is expected by buildbots. Thanks to Vladislav Vaintroub for the fix --- storage/columnstore/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/columnstore/CMakeLists.txt b/storage/columnstore/CMakeLists.txt index 8e8859c8b68..3767d5da0f2 100644 --- a/storage/columnstore/CMakeLists.txt +++ b/storage/columnstore/CMakeLists.txt @@ -1,7 +1,7 @@ #set(PLUGIN_COLUMNSTORE "NO" CACHE STRING "Enable ColumnStore engine") if("NO" STREQUAL "${PLUGIN_COLUMNSTORE}" OR - NOT DEFINED ${PLUGIN_COLUMNSTORE}) + (NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/columnstore/CMakeLists.txt)) return() endif()