From fc1798785f4daf878e2c9f4c28ed35ca1af6dcba Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Mon, 17 Oct 2016 12:10:12 -0400 Subject: Adjust test to adapt to a recent change in mysqltest. --- mysql-test/suite/galera/t/galera_concurrent_ctas.test | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/t/galera_concurrent_ctas.test b/mysql-test/suite/galera/t/galera_concurrent_ctas.test index f0dcf8e4900..8b9b461d0fd 100644 --- a/mysql-test/suite/galera/t/galera_concurrent_ctas.test +++ b/mysql-test/suite/galera/t/galera_concurrent_ctas.test @@ -43,10 +43,10 @@ let $run=10; while($run) { --error 0,1 - exec $MYSQL --user=root --host=127.0.0.1 --port=$NODE_MYPORT_1 test - < $MYSQLTEST_VARDIR/tmp/galera_concurrent.sql & - $MYSQL --user=root --host=127.0.0.1 --port=$NODE_MYPORT_2 test - < $MYSQLTEST_VARDIR/tmp/galera_concurrent.sql; + exec $MYSQL --user=root --host=127.0.0.1 --port=$NODE_MYPORT_1 test \ + < $MYSQLTEST_VARDIR/tmp/galera_concurrent.sql & \ + $MYSQL --user=root --host=127.0.0.1 --port=$NODE_MYPORT_2 test \ + < $MYSQLTEST_VARDIR/tmp/galera_concurrent.sql; dec $run; } -- cgit v1.2.1 From 72fd15f7c31aa3e3705ae1b005a3247a985c5bb3 Mon Sep 17 00:00:00 2001 From: SachinSetiya Date: Thu, 1 Dec 2016 12:16:13 +0530 Subject: MDEV-11016 wsrep_node_is_ready() check is too strict Problem:- The condition that checks for node readiness is too strict as it does not allow SELECTs even if these selects do not access any tables. For example,if we run SELECT 1; OR SELECT @@max_allowed_packet; Solution:- We need not to report this error when all_tables(lex->query_tables) is NULL: --- mysql-test/suite/galera/r/galera_var_dirty_reads.result | 13 +++++++++++++ mysql-test/suite/galera/t/galera_var_dirty_reads.test | 7 +++++++ 2 files changed, 20 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result index 6d703c8cf95..6a2aa1eb5e7 100644 --- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result +++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result @@ -18,6 +18,19 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i 1 +SET @@session.wsrep_dirty_reads=OFF; +SELECT 2; +2 +2 +SELECT @@max_allowed_packet; +@@max_allowed_packet +4194304 +SELECT 2+2 from DUAL; +2+2 +4 +SELECT sysdate() from DUAL; +sysdate() +2016-10-28 23:13:06 SELECT * FROM t1; i 1 diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test index 9eea8efdaf3..dd7bc88cb1c 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -39,6 +39,13 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; +#Select query which does not access table should be allowed MDEV-11016 +SET @@session.wsrep_dirty_reads=OFF; +SELECT 2; +SELECT @@max_allowed_packet; +SELECT 2+2 from DUAL; +SELECT sysdate() from DUAL; + --disable_query_log --eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved' --enable_query_log -- cgit v1.2.1 From 313a14f79e6de43acd5c2ceffbcc01af2506d800 Mon Sep 17 00:00:00 2001 From: Nirbhay Choubey Date: Fri, 9 Dec 2016 12:24:08 -0500 Subject: Fix test failures. --- mysql-test/suite/galera/r/galera_var_dirty_reads.result | 15 +++++++++------ mysql-test/suite/galera/suite.pm | 1 + mysql-test/suite/galera/t/galera_var_dirty_reads.test | 12 +++++++++--- 3 files changed, 19 insertions(+), 9 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result index 6a2aa1eb5e7..c0ffb2d4860 100644 --- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result +++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result @@ -18,19 +18,22 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i 1 +# +# MDEV-11016: wsrep_node_is_ready() check is too strict +# SET @@session.wsrep_dirty_reads=OFF; SELECT 2; 2 2 -SELECT @@max_allowed_packet; -@@max_allowed_packet -4194304 SELECT 2+2 from DUAL; 2+2 4 -SELECT sysdate() from DUAL; -sysdate() -2016-10-28 23:13:06 +SET @VAR=1; +SELECT @VAR; +@VAR +1 +SELECT @@max_allowed_packet; +SELECT SYSDATE() from DUAL; SELECT * FROM t1; i 1 diff --git a/mysql-test/suite/galera/suite.pm b/mysql-test/suite/galera/suite.pm index fdaf64580c7..a790e951762 100644 --- a/mysql-test/suite/galera/suite.pm +++ b/mysql-test/suite/galera/suite.pm @@ -37,6 +37,7 @@ push @::global_suppressions, qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|, qr|WSREP: no nodes coming from prim view, prim not possible|, qr(WSREP: SYNC message from member .* in non-primary configuration. Ignored.), + qr(WSREP: discarding established .*), ); diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test index dd7bc88cb1c..48fbe37139c 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -39,12 +39,18 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; -#Select query which does not access table should be allowed MDEV-11016 +--echo # +--echo # MDEV-11016: wsrep_node_is_ready() check is too strict +--echo # SET @@session.wsrep_dirty_reads=OFF; SELECT 2; -SELECT @@max_allowed_packet; SELECT 2+2 from DUAL; -SELECT sysdate() from DUAL; +SET @VAR=1; +SELECT @VAR; +--disable_result_log +SELECT @@max_allowed_packet; +SELECT SYSDATE() from DUAL; +--enable_result_log --disable_query_log --eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved' -- cgit v1.2.1 From 95422c445db7db60fca688711d98955e59e009e2 Mon Sep 17 00:00:00 2001 From: Sachin Setiya Date: Wed, 14 Dec 2016 15:58:14 +0530 Subject: Revert " MDEV-11016 wsrep_node_is_ready() check is too strict" This reverts commit 72fd15f7c31aa3e3705ae1b005a3247a985c5bb3. # Conflicts: # mysql-test/suite/galera/r/galera_var_dirty_reads.result # mysql-test/suite/galera/t/galera_var_dirty_reads.test --- mysql-test/suite/galera/r/galera_var_dirty_reads.result | 16 ---------------- mysql-test/suite/galera/t/galera_var_dirty_reads.test | 13 ------------- 2 files changed, 29 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result index c0ffb2d4860..6d703c8cf95 100644 --- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result +++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result @@ -18,22 +18,6 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i 1 -# -# MDEV-11016: wsrep_node_is_ready() check is too strict -# -SET @@session.wsrep_dirty_reads=OFF; -SELECT 2; -2 -2 -SELECT 2+2 from DUAL; -2+2 -4 -SET @VAR=1; -SELECT @VAR; -@VAR -1 -SELECT @@max_allowed_packet; -SELECT SYSDATE() from DUAL; SELECT * FROM t1; i 1 diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test index 48fbe37139c..9eea8efdaf3 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -39,19 +39,6 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; ---echo # ---echo # MDEV-11016: wsrep_node_is_ready() check is too strict ---echo # -SET @@session.wsrep_dirty_reads=OFF; -SELECT 2; -SELECT 2+2 from DUAL; -SET @VAR=1; -SELECT @VAR; ---disable_result_log -SELECT @@max_allowed_packet; -SELECT SYSDATE() from DUAL; ---enable_result_log - --disable_query_log --eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved' --enable_query_log -- cgit v1.2.1 From 5ddd8149e44122feb0989b9944113d2b92d6f84a Mon Sep 17 00:00:00 2001 From: Sachin Setiya Date: Wed, 14 Dec 2016 17:14:42 +0530 Subject: MDEV-11479 Improved wsrep_dirty_reads Tasks:- Changes in wsrep_dirty_reads variable 1.) Global + Session scope (Current: session-only) 2.) Can be set using command line. 3.) Allow all commands that do not change data (besides SELECT) 4.) Allow prepared Statements that do not change data 5.) Works with wsrep_sync_wait enabled --- .../suite/galera/r/galera_var_dirty_reads.result | 70 ++++++++++++++++++++++ .../suite/galera/t/galera_var_dirty_reads.test | 68 +++++++++++++++++++++ .../sys_vars/r/wsrep_dirty_reads_basic.result | 23 ++++++- .../suite/sys_vars/t/wsrep_dirty_reads_basic.test | 17 +++++- 4 files changed, 174 insertions(+), 4 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/galera_var_dirty_reads.result b/mysql-test/suite/galera/r/galera_var_dirty_reads.result index 6d703c8cf95..8a3175912c7 100644 --- a/mysql-test/suite/galera/r/galera_var_dirty_reads.result +++ b/mysql-test/suite/galera/r/galera_var_dirty_reads.result @@ -3,6 +3,10 @@ INSERT INTO t1 VALUES(1); SELECT * FROM t1; i 1 +create user user1; +grant all privileges on *.* to user1; +create user user2; +grant all privileges on *.* to user2; SET @@global.wsrep_cluster_address = ''; SET @@session.wsrep_dirty_reads=OFF; SET SESSION wsrep_sync_wait=0; @@ -18,8 +22,74 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; i 1 +connect con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2; +SET SESSION wsrep_sync_wait=0; +set session wsrep_dirty_reads=1; +prepare stmt_show from 'select 1'; +prepare stmt_select from 'select * from t1'; +prepare stmt_insert from 'insert into t1 values(1)'; +set session wsrep_dirty_reads=0; +execute stmt_show; +ERROR 08S01: WSREP has not yet prepared node for application use +execute stmt_select; +ERROR 08S01: WSREP has not yet prepared node for application use +execute stmt_insert; +ERROR 08S01: WSREP has not yet prepared node for application use +SET wsrep_dirty_reads=ON; +select @@session.wsrep_dirty_reads; +@@session.wsrep_dirty_reads +1 +execute stmt_show; +1 +1 +execute stmt_select; +i +1 +execute stmt_insert; +ERROR 08S01: WSREP has not yet prepared node for application use +SET @@global.wsrep_dirty_reads=ON; +connect con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2; +select @@session.wsrep_dirty_reads; +@@session.wsrep_dirty_reads +1 +prepare stmt_show from 'select 1'; +prepare stmt_select from 'select * from t1'; +prepare stmt_insert from 'insert into t1 values(1)'; +execute stmt_show; +1 +1 +execute stmt_select; +i +1 +execute stmt_insert; +ERROR 08S01: WSREP has not yet prepared node for application use +SET SESSION wsrep_sync_wait=1; +execute stmt_show; +1 +1 +execute stmt_select; +i +1 +execute stmt_insert; +ERROR 08S01: WSREP has not yet prepared node for application use +SET SESSION wsrep_sync_wait=7; +execute stmt_show; +1 +1 +execute stmt_select; +i +1 +execute stmt_insert; +ERROR 08S01: WSREP has not yet prepared node for application use +connection node_2; +SET @@global.wsrep_dirty_reads=OFF; +connection node_1; SELECT * FROM t1; i 1 DROP TABLE t1; +drop user user1; +drop user user2; +disconnect node_2; +disconnect node_1; # End of test diff --git a/mysql-test/suite/galera/t/galera_var_dirty_reads.test b/mysql-test/suite/galera/t/galera_var_dirty_reads.test index 9eea8efdaf3..8fd3b1d22f2 100644 --- a/mysql-test/suite/galera/t/galera_var_dirty_reads.test +++ b/mysql-test/suite/galera/t/galera_var_dirty_reads.test @@ -20,6 +20,11 @@ CREATE TABLE t1(i INT) ENGINE=INNODB; INSERT INTO t1 VALUES(1); SELECT * FROM t1; +create user user1; +grant all privileges on *.* to user1; +create user user2; +grant all privileges on *.* to user2; + SET @@global.wsrep_cluster_address = ''; SET @@session.wsrep_dirty_reads=OFF; @@ -39,6 +44,67 @@ SET @@session.wsrep_dirty_reads=ON; SELECT * FROM t1; +--enable_connect_log +--connect (con1, localhost, user1,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2) +#Just test the session behavior +SET SESSION wsrep_sync_wait=0; + +set session wsrep_dirty_reads=1; +#Prepared statement creation should be allowed MDEV-11479 +prepare stmt_show from 'select 1'; +prepare stmt_select from 'select * from t1'; +prepare stmt_insert from 'insert into t1 values(1)'; +set session wsrep_dirty_reads=0; + +#No Preapare stmt/proceure will be allowed +--error ER_UNKNOWN_COM_ERROR +execute stmt_show; +--error ER_UNKNOWN_COM_ERROR +execute stmt_select; +--error ER_UNKNOWN_COM_ERROR +execute stmt_insert; + +SET wsrep_dirty_reads=ON; +select @@session.wsrep_dirty_reads; +#Only prepare statement which does not change data should be allowed +execute stmt_show; +execute stmt_select; +--error ER_UNKNOWN_COM_ERROR +execute stmt_insert; +SET @@global.wsrep_dirty_reads=ON; + +--connect (con2, localhost, user2,,test,$NODE_MYPORT_2,$NODE_MYSOCK_2) +#Just test the session behavior +select @@session.wsrep_dirty_reads; + +prepare stmt_show from 'select 1'; +prepare stmt_select from 'select * from t1'; +prepare stmt_insert from 'insert into t1 values(1)'; + +#Only prepare statement which does not change data should be allowed +execute stmt_show; +execute stmt_select; +--error ER_UNKNOWN_COM_ERROR +execute stmt_insert; + +#wsrep_dirty_read should work when wsrep_sync_wait is 1 or non zero +#because we already are disconnected , So It does not make any sense +#to wait for other nodes +SET SESSION wsrep_sync_wait=1; +execute stmt_show; +execute stmt_select; +--error ER_UNKNOWN_COM_ERROR +execute stmt_insert; + +SET SESSION wsrep_sync_wait=7; +execute stmt_show; +execute stmt_select; +--error ER_UNKNOWN_COM_ERROR +execute stmt_insert; + +--connection node_2 +SET @@global.wsrep_dirty_reads=OFF; + --disable_query_log --eval SET @@global.wsrep_cluster_address = '$wsrep_cluster_address_saved' --enable_query_log @@ -48,6 +114,8 @@ SELECT * FROM t1; SELECT * FROM t1; # Cleanup DROP TABLE t1; +drop user user1; +drop user user2; --disable_query_log # Restore original auto_increment_offset values. diff --git a/mysql-test/suite/sys_vars/r/wsrep_dirty_reads_basic.result b/mysql-test/suite/sys_vars/r/wsrep_dirty_reads_basic.result index d2a62d6136f..1968103873a 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_dirty_reads_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_dirty_reads_basic.result @@ -5,12 +5,13 @@ SET @wsrep_dirty_reads_session_saved = @@session.wsrep_dirty_reads; # default SELECT @@global.wsrep_dirty_reads; -ERROR HY000: Variable 'wsrep_dirty_reads' is a SESSION variable +@@global.wsrep_dirty_reads +0 SELECT @@session.wsrep_dirty_reads; @@session.wsrep_dirty_reads 0 -# scope and valid values +# valid values for session SET @@session.wsrep_dirty_reads=OFF; SELECT @@session.wsrep_dirty_reads; @@session.wsrep_dirty_reads @@ -24,11 +25,29 @@ SELECT @@session.wsrep_dirty_reads; @@session.wsrep_dirty_reads 0 +# valid values for global +SET @@global.wsrep_dirty_reads=OFF; +SELECT @@global.wsrep_dirty_reads; +@@global.wsrep_dirty_reads +0 +SET @@global.wsrep_dirty_reads=ON; +SELECT @@global.wsrep_dirty_reads; +@@global.wsrep_dirty_reads +1 +SET @@global.wsrep_dirty_reads=default; +SELECT @@global.wsrep_dirty_reads; +@@global.wsrep_dirty_reads +0 + # invalid values SET @@session.wsrep_dirty_reads=NULL; ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'NULL' SET @@session.wsrep_dirty_reads='junk'; ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'junk' +SET @@global.wsrep_dirty_reads=NULL; +ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'NULL' +SET @@global.wsrep_dirty_reads='junk'; +ERROR 42000: Variable 'wsrep_dirty_reads' can't be set to the value of 'junk' # restore the initial values SET @@session.wsrep_dirty_reads = @wsrep_dirty_reads_session_saved; diff --git a/mysql-test/suite/sys_vars/t/wsrep_dirty_reads_basic.test b/mysql-test/suite/sys_vars/t/wsrep_dirty_reads_basic.test index a47524fcfe3..ffe767a051b 100644 --- a/mysql-test/suite/sys_vars/t/wsrep_dirty_reads_basic.test +++ b/mysql-test/suite/sys_vars/t/wsrep_dirty_reads_basic.test @@ -8,12 +8,12 @@ SET @wsrep_dirty_reads_session_saved = @@session.wsrep_dirty_reads; --echo # default ---error ER_INCORRECT_GLOBAL_LOCAL_VAR + SELECT @@global.wsrep_dirty_reads; SELECT @@session.wsrep_dirty_reads; --echo ---echo # scope and valid values +--echo # valid values for session SET @@session.wsrep_dirty_reads=OFF; SELECT @@session.wsrep_dirty_reads; SET @@session.wsrep_dirty_reads=ON; @@ -21,12 +21,25 @@ SELECT @@session.wsrep_dirty_reads; SET @@session.wsrep_dirty_reads=default; SELECT @@session.wsrep_dirty_reads; +--echo +--echo # valid values for global +SET @@global.wsrep_dirty_reads=OFF; +SELECT @@global.wsrep_dirty_reads; +SET @@global.wsrep_dirty_reads=ON; +SELECT @@global.wsrep_dirty_reads; +SET @@global.wsrep_dirty_reads=default; +SELECT @@global.wsrep_dirty_reads; + --echo --echo # invalid values --error ER_WRONG_VALUE_FOR_VAR SET @@session.wsrep_dirty_reads=NULL; --error ER_WRONG_VALUE_FOR_VAR SET @@session.wsrep_dirty_reads='junk'; +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_dirty_reads=NULL; +--error ER_WRONG_VALUE_FOR_VAR +SET @@global.wsrep_dirty_reads='junk'; --echo --echo # restore the initial values -- cgit v1.2.1 From b0bae66b8ef95844b5d94a72c35d2a5fe6460275 Mon Sep 17 00:00:00 2001 From: Sachin Setiya Date: Thu, 20 Apr 2017 18:33:20 +0530 Subject: FIX test failures --- mysql-test/suite/galera/disabled.def | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 mysql-test/suite/galera/disabled.def (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def new file mode 100644 index 00000000000..c91654c2023 --- /dev/null +++ b/mysql-test/suite/galera/disabled.def @@ -0,0 +1,2 @@ +galera_var_dirty_reads : MDEV-12539 +query_cache : MDEV-12539 -- cgit v1.2.1 From e5c488a49ba54aee596f4ff0080f3a855461b911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Fri, 21 Jul 2017 08:29:52 +0300 Subject: Fix failing test case. --- mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result b/mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result index 1e7b9364570..0df3dff8990 100644 --- a/mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result +++ b/mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result @@ -34,11 +34,9 @@ SELECT @@session.wsrep_sync_wait; @@session.wsrep_sync_wait 7 SET @@session.wsrep_sync_wait=8; -Warnings: -Warning 1292 Truncated incorrect wsrep_sync_wait value: '8' SELECT @@session.wsrep_sync_wait; @@session.wsrep_sync_wait -7 +8 # invalid values SET @@global.wsrep_sync_wait=NULL; -- cgit v1.2.1 From 8822b30f1e258a5f0efc124043f42970e600c5d4 Mon Sep 17 00:00:00 2001 From: sjaakola Date: Tue, 10 Oct 2017 23:39:48 +0300 Subject: MW-416 Replicating DDL after ACL check, 5.6 version Re-implemented the fix for MW-416 according to 5.7 version --- mysql-test/suite/galera/r/MW-416.result | 114 +++++++++++++++++++++++++++ mysql-test/suite/galera/t/MW-416.test | 132 ++++++++++++++++++++++++++++++++ 2 files changed, 246 insertions(+) create mode 100644 mysql-test/suite/galera/r/MW-416.result create mode 100644 mysql-test/suite/galera/t/MW-416.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/MW-416.result b/mysql-test/suite/galera/r/MW-416.result new file mode 100644 index 00000000000..05399b213a8 --- /dev/null +++ b/mysql-test/suite/galera/r/MW-416.result @@ -0,0 +1,114 @@ +CREATE USER 'userMW416'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +Variable_name Value +wsrep_replicated 2 +ALTER DATABASE db CHARACTER SET = utf8; +ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'db' +ALTER EVENT ev1 RENAME TO ev2; +ERROR 42000: Access denied for user 'userMW416'@'localhost' to database 'test' +ALTER FUNCTION fun1 COMMENT 'foo'; +ERROR 42000: alter routine command denied to user 'userMW416'@'localhost' for routine 'test.fun1' +ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; +Got one of the listed errors +ALTER PROCEDURE proc1 COMMENT 'foo'; +Got one of the listed errors +ALTER SERVER srv OPTIONS (USER 'sally'); +Got one of the listed errors +ALTER TABLE tbl DROP COLUMN col; +Got one of the listed errors +ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; +Got one of the listed errors +ALTER VIEW vw AS SELECT 1; +Got one of the listed errors +CREATE DATABASE db; +Got one of the listed errors +CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; +Got one of the listed errors +CREATE FUNCTION fun1() RETURNS int RETURN(1); +Got one of the listed errors +CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; +Got one of the listed errors +CREATE PROCEDURE proc1() BEGIN END; +Got one of the listed errors +CREATE INDEX idx ON tbl(id); +Got one of the listed errors +CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; +Got one of the listed errors +CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); +Got one of the listed errors +CREATE TABLE t (i int); +Got one of the listed errors +CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; +Got one of the listed errors +CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; +Got one of the listed errors +CREATE VIEW vw AS SELECT 1; +Got one of the listed errors +DROP DATABASE db; +Got one of the listed errors +DROP EVENT ev; +Got one of the listed errors +DROP FUNCTION fun1; +Got one of the listed errors +DROP INDEX idx ON t0; +Got one of the listed errors +DROP LOGFILE GROUP lfg; +Got one of the listed errors +DROP PROCEDURE proc1; +Got one of the listed errors +DROP SERVEr srv; +Got one of the listed errors +DROP TABLE t0; +Got one of the listed errors +DROP TABLESPACE tblspc; +Got one of the listed errors +DROP TRIGGER trg; +Got one of the listed errors +DROP VIEW vw; +Got one of the listed errors +RENAME TABLE t0 TO t1; +Got one of the listed errors +TRUNCATE TABLE t0; +Got one of the listed errors +ALTER USER myuser PASSWORD EXPIRE; +Got one of the listed errors +CREATE USER myuser IDENTIFIED BY 'pass'; +Got one of the listed errors +DROP USER myuser; +Got one of the listed errors +GRANT ALL ON *.* TO 'myuser'; +Got one of the listed errors +RENAME USER myuser TO mariauser; +Got one of the listed errors +REVOKE SELECT ON test FROM myuser; +Got one of the listed errors +REVOKE ALL, GRANT OPTION FROM myuser; +Got one of the listed errors +REVOKE PROXY ON myuser FROM myuser; +Got one of the listed errors +ANALYZE TABLE db.tbl; +Got one of the listed errors +CHECK TABLE db.tbl; +Got one of the listed errors +CHECKSUM TABLE db.tbl; +Got one of the listed errors +OPTIMIZE TABLE db.tbl; +Got one of the listed errors +REPAIR TABLE db.tbl; +Got one of the listed errors +INSTALL PLUGIN plg SONAME 'plg.so'; +Got one of the listed errors +UNINSTALL PLUGIN plg; +Got one of the listed errors +DROP USER 'userMW416'@'localhost'; +SHOW DATABASES; +Database +information_schema +mtr +mysql +performance_schema +test +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; +Variable_name Value +wsrep_replicated 3 diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test new file mode 100644 index 00000000000..ebc15438adc --- /dev/null +++ b/mysql-test/suite/galera/t/MW-416.test @@ -0,0 +1,132 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +CREATE USER 'userMW416'@'localhost'; +GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; + +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; + +--connect userMW416, localhost, userMW416,, test, $NODE_MYPORT_1 +--connection userMW416 + +# DDL + +--error 1044 +ALTER DATABASE db CHARACTER SET = utf8; +--error 1044 +ALTER EVENT ev1 RENAME TO ev2; +--error 1370 +ALTER FUNCTION fun1 COMMENT 'foo'; +#--error 1044,1227 +#ALTER INSTANCE ROTATE INNODB MASTER KEY; +--error 1044,1227 +ALTER LOGFILE GROUP lfg ADD UNDOFILE 'file' ENGINE=InnoDB; +--error 1044,1227,1370 +ALTER PROCEDURE proc1 COMMENT 'foo'; +--error 1044,1227,1370 +ALTER SERVER srv OPTIONS (USER 'sally'); +--error 1044,1142,1227,1370 +ALTER TABLE tbl DROP COLUMN col; +--error 1044,1227,1370 +ALTER TABLESPACE tblspc DROP DATAFILE 'file' ENGINE=innodb; +--error 1044,1142,1227,1370 +ALTER VIEW vw AS SELECT 1; + +--error 1044,1227,1370 +CREATE DATABASE db; +--error 1044,1227,1370 +CREATE EVENT ev1 ON SCHEDULE AT CURRENT_TIMESTAMP DO SELECT 1; +--error 1044,1227,1370 +CREATE FUNCTION fun1() RETURNS int RETURN(1); +--error 1044,1227,1370 +CREATE FUNCTION fun1 RETURNS STRING SONAME 'funlib.so'; +--error 1044,1227,1370 +CREATE PROCEDURE proc1() BEGIN END; +--error 1044,1142,1227,1370 +CREATE INDEX idx ON tbl(id); +--error 1044,1142,1227,1370 +CREATE LOGFILE GROUP lfg ADD UNDOFILE 'undofile' ENGINE innodb; +--error 1044,1142,1227,1370 +CREATE SERVER srv FOREIGN DATA WRAPPER 'fdw' OPTIONS (USER 'user'); +--error 1044,1142,1227,1370 +CREATE TABLE t (i int); +--error 1044,1142,1227,1370 +CREATE TABLESPACE tblspc ADD DATAFILE 'file' ENGINE=innodb; +--error 1044,1142,1227,1370 +CREATE TRIGGER trg BEFORE UPDATE ON t FOR EACH ROW BEGIN END; +--error 1044,1142,1227,1370 +CREATE VIEW vw AS SELECT 1; + + + +--error 1044,1142,1227,1370 +DROP DATABASE db; +--error 1044,1142,1227,1370 +DROP EVENT ev; +--error 1044,1142,1227,1370 +DROP FUNCTION fun1; +--error 1044,1142,1227,1370 +DROP INDEX idx ON t0; +--error 1044,1142,1227,1370 +DROP LOGFILE GROUP lfg; +--error 1044,1142,1227,1370 +DROP PROCEDURE proc1; +--error 1044,1142,1227,1370 +DROP SERVEr srv; +--error 1044,1142,1227,1370 +DROP TABLE t0; +--error 1044,1142,1227,1370 +DROP TABLESPACE tblspc; +--error 1044,1142,1227,1360,1370 +DROP TRIGGER trg; +--error 1044,1142,1227,1370 +DROP VIEW vw; + +--error 1044,1142,1227,1370 +RENAME TABLE t0 TO t1; + +--error 1044,1142,1227,1370 +TRUNCATE TABLE t0; + +# DCL + +# account management +--error 1044,1142,1227,1370 +ALTER USER myuser PASSWORD EXPIRE; +--error 1044,1142,1227,1370 +CREATE USER myuser IDENTIFIED BY 'pass'; +--error 1044,1142,1227,1370 +DROP USER myuser; +--error 1044,1045,1142,1227,1370 +GRANT ALL ON *.* TO 'myuser'; +--error 1044,1142,1227,1370 +RENAME USER myuser TO mariauser; +--error 1044,1142,1227,1370 +REVOKE SELECT ON test FROM myuser; +--error 1044,1142,1227,1370,1698 +REVOKE ALL, GRANT OPTION FROM myuser; +--error 1044,1142,1227,1370,1698 +REVOKE PROXY ON myuser FROM myuser; + +# table maintenance +--error 1044,1142,1227,1370 +ANALYZE TABLE db.tbl; +--error 1044,1142,1227,1370 +CHECK TABLE db.tbl; +--error 1044,1142,1227,1370 +CHECKSUM TABLE db.tbl; +--error 1044,1142,1227,1370 +OPTIMIZE TABLE db.tbl; +--error 1044,1142,1227,1370 +REPAIR TABLE db.tbl; + +# plugin and user defined functions +--error 1044,1142,1227,1370 +INSTALL PLUGIN plg SONAME 'plg.so'; +--error 1044,1142,1227,1370 +UNINSTALL PLUGIN plg; + +--connection node_1 +DROP USER 'userMW416'@'localhost'; +SHOW DATABASES; +SHOW GLOBAL STATUS LIKE 'wsrep_replicated'; -- cgit v1.2.1 From 181f3015bf62bccc108aacd4df55065e0158b060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 19 Oct 2017 11:06:55 +0300 Subject: MariaDB adjustments. Add missing COND variable and disable test that fail. --- mysql-test/suite/galera/disabled.def | 2 ++ mysql-test/suite/galera/t/MW-416.test | 8 +++++--- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def index c91654c2023..ad966ebab0d 100644 --- a/mysql-test/suite/galera/disabled.def +++ b/mysql-test/suite/galera/disabled.def @@ -1,2 +1,4 @@ galera_var_dirty_reads : MDEV-12539 query_cache : MDEV-12539 +MW-421 : MDEV-12539 +galera_concurrent_ctas : MDEV-12539 diff --git a/mysql-test/suite/galera/t/MW-416.test b/mysql-test/suite/galera/t/MW-416.test index ebc15438adc..df4fa35abc7 100644 --- a/mysql-test/suite/galera/t/MW-416.test +++ b/mysql-test/suite/galera/t/MW-416.test @@ -1,6 +1,8 @@ --source include/galera_cluster.inc --source include/have_innodb.inc +--source include/wait_until_ready.inc + CREATE USER 'userMW416'@'localhost'; GRANT SELECT, INSERT, UPDATE ON test.* TO 'userMW416'@'localhost'; @@ -67,7 +69,7 @@ DROP EVENT ev; DROP FUNCTION fun1; --error 1044,1142,1227,1370 DROP INDEX idx ON t0; ---error 1044,1142,1227,1370 +--error 1044,1142,1227,1370,1064 DROP LOGFILE GROUP lfg; --error 1044,1142,1227,1370 DROP PROCEDURE proc1; @@ -75,7 +77,7 @@ DROP PROCEDURE proc1; DROP SERVEr srv; --error 1044,1142,1227,1370 DROP TABLE t0; ---error 1044,1142,1227,1370 +--error 1044,1142,1227,1370,1064 DROP TABLESPACE tblspc; --error 1044,1142,1227,1360,1370 DROP TRIGGER trg; @@ -91,7 +93,7 @@ TRUNCATE TABLE t0; # DCL # account management ---error 1044,1142,1227,1370 +--error 1044,1142,1227,1370,1064 ALTER USER myuser PASSWORD EXPIRE; --error 1044,1142,1227,1370 CREATE USER myuser IDENTIFIED BY 'pass'; -- cgit v1.2.1 From 016785f6aa9c56b731b612363e7d52488735ee98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 19 Oct 2017 15:02:14 +0300 Subject: Fix test failure on perfschema.all_instances. --- mysql-test/suite/perfschema/r/all_instances.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/perfschema/r/all_instances.result b/mysql-test/suite/perfschema/r/all_instances.result index 3b0b4db4541..bfe50b881da 100644 --- a/mysql-test/suite/perfschema/r/all_instances.result +++ b/mysql-test/suite/perfschema/r/all_instances.result @@ -152,6 +152,7 @@ wait/synch/cond/sql/Relay_log_info::sleep_cond wait/synch/cond/sql/Relay_log_info::start_cond wait/synch/cond/sql/Relay_log_info::stop_cond wait/synch/cond/sql/THD::COND_wakeup_ready +wait/synch/cond/sql/THD::COND_wsrep_thd select event_name from file_instances group by event_name; event_name wait/io/file/aria/control -- cgit v1.2.1 From 09b25f85966f44aae933e86b84b4ebe59ded47c3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 1 Mar 2018 16:35:46 +0100 Subject: only allow SUPER user to modify wsrep_on --- mysql-test/suite/wsrep/r/variables.result | 7 +++++++ mysql-test/suite/wsrep/t/variables.test | 14 ++++++++++++++ 2 files changed, 21 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/wsrep/r/variables.result b/mysql-test/suite/wsrep/r/variables.result index 5117dd1b048..72ea8eacfbf 100644 --- a/mysql-test/suite/wsrep/r/variables.result +++ b/mysql-test/suite/wsrep/r/variables.result @@ -73,6 +73,13 @@ Threads_connected 1 SHOW STATUS LIKE 'wsrep_thread_count'; Variable_name Value wsrep_thread_count 11 +set wsrep_on=0; +set wsrep_on=1; +create user test@localhost; +set auto_increment_increment=10; +set wsrep_on=0; +ERROR 42000: Access denied; you need (at least one of) the SUPER privilege(s) for this operation +drop user test@localhost; # # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash # diff --git a/mysql-test/suite/wsrep/t/variables.test b/mysql-test/suite/wsrep/t/variables.test index 3093d8ba942..e148152fc22 100644 --- a/mysql-test/suite/wsrep/t/variables.test +++ b/mysql-test/suite/wsrep/t/variables.test @@ -68,6 +68,20 @@ sleep 3; SHOW STATUS LIKE 'threads_connected'; SHOW STATUS LIKE 'wsrep_thread_count'; +# +# privileges for wsrep_on +# +set wsrep_on=0; +set wsrep_on=1; +create user test@localhost; +connect con1,localhost,test; +set auto_increment_increment=10; +--error ER_SPECIFIC_ACCESS_DENIED_ERROR +set wsrep_on=0; +disconnect con1; +connection default; +drop user test@localhost; + --echo # --echo # MDEV#6411: Setting set @@global.wsrep_sst_auth=NULL causes crash --echo # -- cgit v1.2.1 From 0088fb91f36574ea79a575282951e956ab7f15f8 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Fri, 2 Feb 2018 14:18:39 +0100 Subject: Fix sporadic failure of MTR test galera.galera_many_tables_pk The test relies on the false assumption that node_1 is always "assigned" autoincrement value 1 for a given key. However that is no necessarily the case when wsrep autoincrement control is enabled. This patch changed the test so that it does not make use of a autoincrement key, which is not fundamental for the test itself. codership/mysql-wsrep#322 --- mysql-test/suite/galera/t/galera_many_tables_pk.test | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/t/galera_many_tables_pk.test b/mysql-test/suite/galera/t/galera_many_tables_pk.test index 72c7e08bcc3..0af7160d4d8 100644 --- a/mysql-test/suite/galera/t/galera_many_tables_pk.test +++ b/mysql-test/suite/galera/t/galera_many_tables_pk.test @@ -16,7 +16,7 @@ while ($count) { --disable_query_log - --let $ddl_var = `SELECT CONCAT("CREATE TABLE t", $count, " (f1 INTEGER AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB")` + --let $ddl_var = `SELECT CONCAT("CREATE TABLE t", $count, " (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB")` --eval $ddl_var --enable_query_log --dec $count @@ -37,7 +37,7 @@ START TRANSACTION; while ($count) { --disable_query_log - --let $ddl_var = `SELECT CONCAT("INSERT INTO t", $count, " VALUES (DEFAULT)")` + --let $ddl_var = `SELECT CONCAT("INSERT INTO t", $count, " VALUES (1)")` --eval $ddl_var --enable_query_log --dec $count -- cgit v1.2.1 From b1fabb2c0aecc4518a04341325abdbf26e341754 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 7 Feb 2018 14:14:21 +0100 Subject: Galera MTR Tests: missing wsrep_sync_wait in test galera_evs_suspect_timeout --- mysql-test/suite/galera_3nodes/r/galera_evs_suspect_timeout.result | 1 + mysql-test/suite/galera_3nodes/t/galera_evs_suspect_timeout.test | 1 + 2 files changed, 2 insertions(+) (limited to 'mysql-test/suite') 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 1464222a079..7e0d282ec7f 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 @@ -11,6 +11,7 @@ SET SESSION wsrep_sync_wait = 0; SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; VARIABLE_VALUE = 2 1 +SET SESSION wsrep_sync_wait = DEFAULT; SELECT COUNT(*) = 1 FROM t1; COUNT(*) = 1 1 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 a87f19ac94e..03236a3cb93 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 @@ -50,6 +50,7 @@ SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_N --enable_query_log --source include/wait_until_connected_again.inc +SET SESSION wsrep_sync_wait = DEFAULT; SELECT COUNT(*) = 1 FROM t1; DROP TABLE t1; -- cgit v1.2.1 From ba07581c811a3991116605f51143a5f3e3dd8b7f Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Wed, 7 Feb 2018 14:16:50 +0100 Subject: Galera MTR tests: remove unused config files in galera suite --- .../suite/galera/galera_2nodes_as_master_slave.cnf | 83 --------------------- .../galera_2nodes_as_master_with_repl_filter.cnf | 87 ---------------------- 2 files changed, 170 deletions(-) delete mode 100644 mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf delete mode 100644 mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf deleted file mode 100644 index f68fe524904..00000000000 --- a/mysql-test/suite/galera/galera_2nodes_as_master_slave.cnf +++ /dev/null @@ -1,83 +0,0 @@ - -# -# Let's understand the topology. -# * Independent Master with server-id = 1 -# * Galera cluster with 2 nodes: node#1 and node#2 with server-id = 2, 3 -# node#1 act as slave to Independent Master with server-id = 1 -# * Independent Slave with server-id = 4 replicating from galera node#2 -# - -# Use default setting for mysqld processes -!include include/default_mysqld.cnf - -[mysqld] -log-slave-updates -log-bin=mysqld-bin -binlog-format=row -gtid-mode=on -enforce-gtid-consistency=true - -[mysqld.1] -server-id=1 - -[mysqld.2] -server-id=2 - -wsrep_provider=@ENV.WSREP_PROVIDER -wsrep_cluster_address='gcomm://' -wsrep_provider_options='base_port=@mysqld.2.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts=1;' - -# enforce read-committed characteristics across the cluster -wsrep_causal_reads=ON -wsrep_sync_wait = 15 - -wsrep_node_address=127.0.0.1 -wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port -wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port - -# Required for Galera -innodb_autoinc_lock_mode=2 - -innodb_flush_log_at_trx_commit=2 - -[mysqld.3] -server-id=3 - -wsrep_provider=@ENV.WSREP_PROVIDER -wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port' -wsrep_provider_options='base_port=@mysqld.3.#galera_port;evs.install_timeout = PT15S; evs.max_install_timeouts = 1;' - -# enforce read-committed characteristics across the cluster -wsrep_causal_reads=ON -wsrep_sync_wait = 15 - -wsrep_node_address=127.0.0.1 -wsrep_sst_receive_address=127.0.0.2:@mysqld.3.#sst_port -wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port - -# Required for Galera -innodb_autoinc_lock_mode=2 - -innodb_flush_log_at_trx_commit=2 - -[mysqld.4] -server-id=4 - -[ENV] -NODE_MYPORT_1= @mysqld.1.port -NODE_MYSOCK_1= @mysqld.1.socket - -NODE_MYPORT_2= @mysqld.2.port -NODE_MYSOCK_2= @mysqld.2.socket - -NODE_MYPORT_3= @mysqld.3.port -NODE_MYSOCK_3= @mysqld.3.socket - -NODE_MYPORT_4= @mysqld.4.port -NODE_MYSOCK_4= @mysqld.4.socket - -NODE_GALERAPORT_2= @mysqld.2.#galera_port -NODE_GALERAPORT_3= @mysqld.3.#galera_port - -NODE_SSTPORT_2= @mysqld.2.#sst_port -NODE_SSTPORT_3= @mysqld.3.#sst_port diff --git a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf b/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf deleted file mode 100644 index d5490280ab2..00000000000 --- a/mysql-test/suite/galera/galera_2nodes_as_master_with_repl_filter.cnf +++ /dev/null @@ -1,87 +0,0 @@ -# -# This .cnf file creates a setup with a 2-node Galera cluster and one stand-alone MySQL server, to be used as a slave -# - -# Use default setting for mysqld processes -!include include/default_mysqld.cnf - -[mysqld] -default-storage-engine=InnoDB - -[mysqld.1] -server-id=1 -binlog-format=row -log-bin=mysqld-bin -log_slave_updates -gtid-mode=on -enforce-gtid-consistency=true -event-scheduler=1 - -wsrep_provider=@ENV.WSREP_PROVIDER -wsrep_cluster_address='gcomm://' -wsrep_provider_options='base_port=@mysqld.1.#galera_port' - -# enforce read-committed characteristics across the cluster -wsrep_causal_reads=ON -wsrep_sync_wait = 15 - -wsrep_node_address=127.0.0.1 -wsrep_sst_receive_address=127.0.0.2:@mysqld.1.#sst_port -wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port - -# Required for Galera -innodb_autoinc_lock_mode=2 - -innodb_flush_log_at_trx_commit=2 - -[mysqld.2] -server-id=2 -binlog-format=row -log-bin=mysqld-bin -log_slave_updates -gtid-mode=on -enforce-gtid-consistency=true -event-scheduler=1 - -wsrep_provider=@ENV.WSREP_PROVIDER -wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port' -wsrep_provider_options='base_port=@mysqld.2.#galera_port' - -# enforce read-committed characteristics across the cluster -wsrep_causal_reads=ON -wsrep_sync_wait = 15 - -wsrep_node_address=127.0.0.1 -wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port -wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port - -# Required for Galera -innodb_autoinc_lock_mode=2 - -innodb_flush_log_at_trx_commit=2 - -[mysqld.3] -server-id=3 -replicate-ignore-db=test -replicate-wild-ignore-table=test.% -log-bin=mysqld-bin -log_slave_updates -gtid-mode=on -enforce-gtid-consistency=true -event-scheduler=1 - -[ENV] -NODE_MYPORT_1= @mysqld.1.port -NODE_MYSOCK_1= @mysqld.1.socket - -NODE_MYPORT_2= @mysqld.2.port -NODE_MYSOCK_2= @mysqld.2.socket - -NODE_MYPORT_3= @mysqld.3.port -NODE_MYSOCK_3= @mysqld.3.socket - -NODE_GALERAPORT_1= @mysqld.1.#galera_port -NODE_GALERAPORT_2= @mysqld.2.#galera_port - -NODE_SSTPORT_1= @mysqld.1.#sst_port -NODE_SSTPORT_2= @mysqld.2.#sst_port -- cgit v1.2.1 From 7274bed257420d85fe07c986b57f864fc6052e24 Mon Sep 17 00:00:00 2001 From: Daniele Sciascia Date: Thu, 22 Feb 2018 11:14:16 +0100 Subject: Fix MTR test galera.galera_gcache_recover_manytrx The kills the two nodes that compose the cluster and then recovers them. The first node that is recovered is expected to recover its gcache, so that when the second node is recovered, it is expected that it rejoins the cluster via IST. However, it is possible that if the second node is killed while it is applying in TOI mode, its local state is marked unsafe. In which case, SST is the only option to rejoin the cluster. codership/mysql-wsrep#323 --- .../suite/galera/t/galera_gcache_recover_manytrx.test | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') 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 3bfcdc9f117..08165f30f7d 100644 --- a/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test +++ b/mysql-test/suite/galera/t/galera_gcache_recover_manytrx.test @@ -5,6 +5,7 @@ --source include/galera_cluster.inc --source include/big_test.inc +--source include/have_log_bin.inc SET SESSION wsrep_sync_wait = 0; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY AUTO_INCREMENT, f2 LONGBLOB) ENGINE=InnoDB; @@ -93,6 +94,8 @@ END| DELIMITER ;| +--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'` + --connect node_1_insert_simple, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connect node_1_insert_multi, 127.0.0.1, root, , test, $NODE_MYPORT_1 --connect node_1_insert_transaction, 127.0.0.1, root, , test, $NODE_MYPORT_1 @@ -124,6 +127,13 @@ DELIMITER ;| --connection node_2 SET SESSION wsrep_sync_wait = 0; + +# Make sure that node_2 is not killed while TOIs are applied. +# Otherwhise we risk that grastate file is marked unsafe, and +# as a consequence the node cannot rejoin with IST. +--let $wait_condition = SELECT VARIABLE_VALUE > $wsrep_last_committed_before FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed' +--source include/wait_condition.inc + --source include/kill_galera.inc --sleep 10 @@ -172,9 +182,8 @@ SET SESSION wsrep_sync_wait = 0; --source include/start_mysqld.inc --connection node_1 ---source include/wait_until_connected_again.inc ---source include/galera_wait_ready.inc --let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; +--source include/wait_condition.inc --let $diff_servers = 1 2 --source include/diff_servers.inc -- cgit v1.2.1 From f8ea96b80c3eb79c45b646b61ff4472e1326ec18 Mon Sep 17 00:00:00 2001 From: Teemu Ollakka Date: Tue, 27 Feb 2018 04:52:55 +0200 Subject: codership/galera#500 MTR test for proper Galera provider tear down Added a test which verifies that if the gcomm background thread is forced to quit via exception, the error is propagated all the way up the stack and wsrep_ready becomes 0. --- mysql-test/suite/galera/r/galera#500.result | 10 ++++++++ mysql-test/suite/galera/t/galera#500.test | 37 +++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera#500.result create mode 100644 mysql-test/suite/galera/t/galera#500.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/galera#500.result b/mysql-test/suite/galera/r/galera#500.result new file mode 100644 index 00000000000..6a07d0359a4 --- /dev/null +++ b/mysql-test/suite/galera/r/galera#500.result @@ -0,0 +1,10 @@ +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options="gmcast.isolate=2"; +SET SESSION wsrep_sync_wait = 0; +SHOW STATUS LIKE 'wsrep_cluster_status'; +Variable_name Value +wsrep_cluster_status non-Primary +SET SESSION wsrep_sync_wait = default; +SET GLOBAL wsrep_provider_options="pc.bootstrap=1"; +SET SESSION wsrep_on=0; +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/t/galera#500.test b/mysql-test/suite/galera/t/galera#500.test new file mode 100644 index 00000000000..a313d5778d3 --- /dev/null +++ b/mysql-test/suite/galera/t/galera#500.test @@ -0,0 +1,37 @@ +# +# The purpose of this test is to verify that if an exception is +# thrown from gcomm background thread, the provider terminates properly +# and wsrep_ready becomes 0. +# + +--source include/have_innodb.inc +--source include/galera_cluster.inc + +# Force node_2 gcomm background thread to terminate via exception. +--connection node_2 +--let $wsrep_cluster_address = `SELECT @@wsrep_cluster_address` +# Setting gmcast.isolate=2 will force gcomm background thread to +# throw exception. +SET SESSION wsrep_sync_wait = 0; +SET GLOBAL wsrep_provider_options="gmcast.isolate=2"; + +# Wait until wsrep_ready becomes 0. +--let $wait_condition = SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_ready' +--source include/wait_condition.inc + +# Wait until node_1 ends up in non-prim and rebootstrap the cluster. +--connection node_1 +SET SESSION wsrep_sync_wait = 0; +--let $wait_condition = SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME ='wsrep_cluster_size' +--source include/wait_condition.inc +SHOW STATUS LIKE 'wsrep_cluster_status'; +SET SESSION wsrep_sync_wait = default; +SET GLOBAL wsrep_provider_options="pc.bootstrap=1"; + +# Restart node_2 +--connection node_2 +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."); -- cgit v1.2.1 From 2e5681a450627709512138a7d15b8ee035a29c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Tue, 8 May 2018 09:33:48 +0300 Subject: Test requires galera debug library. --- mysql-test/suite/galera/t/galera#500.test | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/t/galera#500.test b/mysql-test/suite/galera/t/galera#500.test index a313d5778d3..3c8490b6907 100644 --- a/mysql-test/suite/galera/t/galera#500.test +++ b/mysql-test/suite/galera/t/galera#500.test @@ -6,6 +6,7 @@ --source include/have_innodb.inc --source include/galera_cluster.inc +--source include/galera_have_debug_sync.inc # Force node_2 gcomm background thread to terminate via exception. --connection node_2 -- cgit v1.2.1 From 3627dd7f6a1cf5bd7151ff23290d64cb6dffea90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 7 Jun 2018 10:31:39 +0300 Subject: MDEV-16416 Crash on IMPORT TABLESPACE of a ROW_FORMAT=COMPRESSED table fil_iterate(): Invoke fil_encrypt_buf() correctly when a ROW_FORMAT=COMPRESSED table with a physical page size of innodb_page_size is being imported. Also, validate the page checksum before decryption, and reduce the scope of some variables. AbstractCallback::operator()(): Remove the parameter 'offset'. The check for it in FetchIndexRootPages::operator() was basically redundant and dead code since the previous refactoring. --- .../encryption/r/innodb-discard-import.result | 6 ++++ .../suite/encryption/t/innodb-discard-import.test | 32 ++++++++-------------- 2 files changed, 17 insertions(+), 21 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/encryption/r/innodb-discard-import.result b/mysql-test/suite/encryption/r/innodb-discard-import.result index 06f4abab9f4..406460d0a23 100644 --- a/mysql-test/suite/encryption/r/innodb-discard-import.result +++ b/mysql-test/suite/encryption/r/innodb-discard-import.result @@ -1,5 +1,8 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); +SET @innodb_file_format_orig = @@GLOBAL.innodb_file_format; +SET @innodb_file_per_table_orig = @@GLOBAL.innodb_file_per_table; +SET @innodb_compression_algo = @@GLOBAL.innodb_compression_algorithm; SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_compression_algorithm = 1; @@ -134,3 +137,6 @@ NOT FOUND /tmpres/ in t3.ibd NOT FOUND /mysql/ in t4.ibd DROP PROCEDURE innodb_insert_proc; DROP TABLE t1,t2,t3,t4; +SET GLOBAL innodb_file_format = @innodb_file_format_orig; +SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; +SET GLOBAL innodb_compression_algorithm = @innodb_compression_algo; diff --git a/mysql-test/suite/encryption/t/innodb-discard-import.test b/mysql-test/suite/encryption/t/innodb-discard-import.test index 9feaacc41e5..54471ae3bae 100644 --- a/mysql-test/suite/encryption/t/innodb-discard-import.test +++ b/mysql-test/suite/encryption/t/innodb-discard-import.test @@ -1,10 +1,6 @@ -- source include/have_innodb.inc +-- source include/innodb_page_size_small.inc -- source include/have_file_key_management_plugin.inc -# embedded does not support restart --- source include/not_embedded.inc --- source include/not_valgrind.inc -# Avoid CrashReporter popup on Mac --- source include/not_crashrep.inc # # MDEV-8770: Incorrect error message when importing page compressed tablespace @@ -13,17 +9,13 @@ call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded."); call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue."); ---disable_query_log -let $innodb_file_format_orig = `SELECT @@innodb_file_format`; -let $innodb_file_per_table_orig = `SELECT @@innodb_file_per_table`; -let $innodb_compression_algo = `SELECT @@innodb_compression_algorithm`; ---enable_query_log +SET @innodb_file_format_orig = @@GLOBAL.innodb_file_format; +SET @innodb_file_per_table_orig = @@GLOBAL.innodb_file_per_table; +SET @innodb_compression_algo = @@GLOBAL.innodb_compression_algorithm; ---disable_warnings SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; SET GLOBAL innodb_compression_algorithm = 1; ---enable_warnings --let $MYSQLD_TMPDIR = `SELECT @@tmpdir` --let $MYSQLD_DATADIR = `SELECT @@datadir` @@ -37,7 +29,9 @@ create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes en show warnings; create table t2(c1 bigint not null, b char(200)) engine=innodb page_compressed=1 encrypted=yes encryption_key_id=4; show warnings; -create table t3(c1 bigint not null, b char(200)) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4; +let $kbs= `select floor(@@global.innodb_page_size/1024)`; +--replace_regex / key_block_size=\d+//i +eval create table t3(c1 bigint not null, b char(200)) engine=innodb row_format=compressed encrypted=yes encryption_key_id=4 key_block_size=$kbs; show warnings; create table t4(c1 bigint not null, b char(200)) engine=innodb page_compressed=1; show warnings; @@ -98,6 +92,7 @@ ALTER TABLE t2 IMPORT TABLESPACE; SHOW CREATE TABLE t2; SELECT COUNT(*) FROM t2; ALTER TABLE t3 IMPORT TABLESPACE; +--replace_regex / key_block_size=\d+//i SHOW CREATE TABLE t3; SELECT COUNT(*) FROM t3; ALTER TABLE t4 IMPORT TABLESPACE; @@ -125,11 +120,6 @@ SELECT COUNT(*) FROM t4; DROP PROCEDURE innodb_insert_proc; DROP TABLE t1,t2,t3,t4; -# reset system ---disable_warnings ---disable_query_log -EVAL SET GLOBAL innodb_file_per_table = $innodb_file_per_table_orig; -EVAL SET GLOBAL innodb_file_format = $innodb_file_format_orig; -EVAL SET GLOBAL innodb_compression_algorithm = $innodb_compression_algo; ---enable_query_log ---enable_warnings +SET GLOBAL innodb_file_format = @innodb_file_format_orig; +SET GLOBAL innodb_file_per_table = @innodb_file_per_table_orig; +SET GLOBAL innodb_compression_algorithm = @innodb_compression_algo; -- cgit v1.2.1 From d39629f01ebdd5b89186e6c8a4a8d3dd528bd26a Mon Sep 17 00:00:00 2001 From: Teodor Mircea Ionita Date: Mon, 7 May 2018 22:40:27 +0300 Subject: MDEV-16075: Workaround to run MTR test suite for make test Assign all tests added via MY_ADD_TEST to a bogus default_ignore target, so that they are not ran by default when doing bare make test. Add default test named MTR that calls mysql-test-run suite, which is now the single test run by make test. In consequence, modified unit/suite.pm to exclude the MTR test and run the real ctests flagged for default_ignore target, thus no circular loop. --- mysql-test/suite/unit/suite.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm index 78d82ccb31d..43eaa970350 100644 --- a/mysql-test/suite/unit/suite.pm +++ b/mysql-test/suite/unit/suite.pm @@ -31,7 +31,7 @@ sub start_test { return "Not run for embedded server" if $::opt_embedded_server; return "Not configured to run ctest" unless -f "../CTestTestfile.cmake"; my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : ""; - my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`; + my (@ctest_list)= `cd .. && ctest $opt_vs_config -E MTR -C default_ignore --show-only --verbose`; return "No ctest" if $?; my ($command, %tests); -- cgit v1.2.1 From e7ca377cb73a64e40832e9306194412fb07b8fa5 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 5 Jun 2018 15:21:45 +0200 Subject: MDEV-16342 SHOW ENGINES: MyISAM description is useless rewrite tautological engine descriptions --- mysql-test/suite/federated/have_federatedx.inc | 2 +- mysql-test/suite/funcs_1/r/is_engines_archive.result | 2 +- mysql-test/suite/funcs_1/r/is_engines_csv.result | 2 +- mysql-test/suite/funcs_1/r/is_engines_federated.result | 2 +- mysql-test/suite/funcs_1/r/is_engines_myisam.result | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/federated/have_federatedx.inc b/mysql-test/suite/federated/have_federatedx.inc index 56ce31f5b2f..2250dd205bd 100644 --- a/mysql-test/suite/federated/have_federatedx.inc +++ b/mysql-test/suite/federated/have_federatedx.inc @@ -1,5 +1,5 @@ if (!`SELECT count(*) FROM information_schema.plugins WHERE plugin_name = 'federated' AND plugin_status = 'active' AND - plugin_description LIKE '%FederatedX%'`){ + plugin_description LIKE '%transactions%'`){ skip Need FederatedX engine; } diff --git a/mysql-test/suite/funcs_1/r/is_engines_archive.result b/mysql-test/suite/funcs_1/r/is_engines_archive.result index 2772992495c..52802b17acd 100644 --- a/mysql-test/suite/funcs_1/r/is_engines_archive.result +++ b/mysql-test/suite/funcs_1/r/is_engines_archive.result @@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines WHERE ENGINE = 'ARCHIVE'; ENGINE ARCHIVE SUPPORT YES -COMMENT Archive storage engine +COMMENT gzip-compresses tables for a low storage footprint TRANSACTIONS NO XA NO SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_csv.result b/mysql-test/suite/funcs_1/r/is_engines_csv.result index 2a7e61ee4d3..7e413b9af6f 100644 --- a/mysql-test/suite/funcs_1/r/is_engines_csv.result +++ b/mysql-test/suite/funcs_1/r/is_engines_csv.result @@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines WHERE ENGINE = 'CSV'; ENGINE CSV SUPPORT YES -COMMENT CSV storage engine +COMMENT Stores tables as CSV files TRANSACTIONS NO XA NO SAVEPOINTS NO diff --git a/mysql-test/suite/funcs_1/r/is_engines_federated.result b/mysql-test/suite/funcs_1/r/is_engines_federated.result index 8057a0266c5..20926458ed0 100644 --- a/mysql-test/suite/funcs_1/r/is_engines_federated.result +++ b/mysql-test/suite/funcs_1/r/is_engines_federated.result @@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines WHERE ENGINE = 'FEDERATED'; ENGINE FEDERATED SUPPORT YES -COMMENT FederatedX pluggable storage engine +COMMENT Allows to access tables on other MariaDB servers, supports transactions and more TRANSACTIONS YES XA NO SAVEPOINTS YES diff --git a/mysql-test/suite/funcs_1/r/is_engines_myisam.result b/mysql-test/suite/funcs_1/r/is_engines_myisam.result index 7e42c864187..d307ce4be6a 100644 --- a/mysql-test/suite/funcs_1/r/is_engines_myisam.result +++ b/mysql-test/suite/funcs_1/r/is_engines_myisam.result @@ -2,7 +2,7 @@ SELECT * FROM information_schema.engines WHERE ENGINE = 'MyISAM'; ENGINE MyISAM SUPPORT DEFAULT -COMMENT MyISAM storage engine +COMMENT Non-transactional engine with good performance and small data footprint TRANSACTIONS NO XA NO SAVEPOINTS NO -- cgit v1.2.1 From 6da8192174f033c2958ddafb2a15c14360bb1ecc Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 10 Jun 2018 17:23:53 +0200 Subject: mysqltest: Allow HANDLER READ in --ps-protocol tests adjust tests --- mysql-test/suite/handler/handler.inc | 2 ++ mysql-test/suite/handler/interface.result | 2 +- mysql-test/suite/handler/interface.test | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/handler/handler.inc b/mysql-test/suite/handler/handler.inc index 5b2dd5ef7e9..bfc21a3b2c3 100644 --- a/mysql-test/suite/handler/handler.inc +++ b/mysql-test/suite/handler/handler.inc @@ -377,7 +377,9 @@ send optimize table t1; # client 1 --echo proceed with the normal connection connection default; +--disable_ps_protocol handler t1 read next; +--enable_ps_protocol handler t1 close; # client 2 --echo read the result from the other connection diff --git a/mysql-test/suite/handler/interface.result b/mysql-test/suite/handler/interface.result index fb633bb94c4..c9cffba33f7 100644 --- a/mysql-test/suite/handler/interface.result +++ b/mysql-test/suite/handler/interface.result @@ -269,7 +269,7 @@ handler t1 open; lock table t1 write; alter table t1 engine=csv; handler t1 read a next; -ERROR HY000: Table storage engine for 't1' doesn't have this option +Got one of the listed errors handler t1 close; unlock tables; drop table t1; diff --git a/mysql-test/suite/handler/interface.test b/mysql-test/suite/handler/interface.test index 2ef617c3ce7..06797ed6980 100644 --- a/mysql-test/suite/handler/interface.test +++ b/mysql-test/suite/handler/interface.test @@ -326,7 +326,7 @@ let $wait_condition= info = "alter table t1 engine=csv"; --source include/wait_condition.inc connection default; ---error ER_ILLEGAL_HA +--error ER_ILLEGAL_HA,ER_KEY_DOES_NOT_EXITS handler t1 read a next; handler t1 close; connection con1; -- cgit v1.2.1 From ca733d03c82b02cd842ff2a226fee7b12eb86f8d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sun, 10 Jun 2018 21:19:11 +0200 Subject: MDEV-15729 Server crashes in Field::make_field upon HANDLER READ executed with PS protocol update table->pos_in_table_list during prepare, just like it's done in normal execution. otherwise it'll be a dangling pointer --- mysql-test/suite/handler/ps.result | 9 +++++++++ mysql-test/suite/handler/ps.test | 11 +++++++++++ 2 files changed, 20 insertions(+) create mode 100644 mysql-test/suite/handler/ps.result create mode 100644 mysql-test/suite/handler/ps.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/handler/ps.result b/mysql-test/suite/handler/ps.result new file mode 100644 index 00000000000..54685f9156b --- /dev/null +++ b/mysql-test/suite/handler/ps.result @@ -0,0 +1,9 @@ +create table t1 (i int); +handler test.t1 open handler_a; +flush status; +handler handler_a read first; +i +show status like 'Com_stmt_prepare%'; +Variable_name Value +Com_stmt_prepare OK +drop table t1; diff --git a/mysql-test/suite/handler/ps.test b/mysql-test/suite/handler/ps.test new file mode 100644 index 00000000000..68091190c85 --- /dev/null +++ b/mysql-test/suite/handler/ps.test @@ -0,0 +1,11 @@ +# +# MDEV-15729 Server crashes in Field::make_field upon HANDLER READ executed with PS protocol +# +create table t1 (i int); +handler test.t1 open handler_a; +flush status; +handler handler_a read first; +# handler...read must be prepared in --ps-protocol mode +--replace_result $PS_PROTOCOL OK +show status like 'Com_stmt_prepare%'; +drop table t1; -- cgit v1.2.1 From 0ad9c3a0160d1dd46139b3e6b6b05d0fba01540b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 11 Jun 2018 13:02:47 +0300 Subject: MDEV-16456 InnoDB error "returned OS error 71" complains about wrong path When attempting to rename a table to a non-existing database, InnoDB would misleadingly report "OS error 71" when in fact the error code is InnoDB's own (OS_FILE_NOT_FOUND), and not report both pathnames. Errors on rename could occur due to reasons connected to either pathname. os_file_handle_rename_error(): New function, to report errors in renaming files. --- mysql-test/suite/innodb/r/rename_table.result | 5 +++++ mysql-test/suite/innodb/t/innodb-mdev7046.test | 7 ++++--- mysql-test/suite/innodb/t/rename_table.test | 11 +++++++++++ 3 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 mysql-test/suite/innodb/r/rename_table.result create mode 100644 mysql-test/suite/innodb/t/rename_table.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/rename_table.result b/mysql-test/suite/innodb/r/rename_table.result new file mode 100644 index 00000000000..b2e15c87348 --- /dev/null +++ b/mysql-test/suite/innodb/r/rename_table.result @@ -0,0 +1,5 @@ +call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +RENAME TABLE t1 TO non_existing_db.t1; +ERROR HY000: Error on rename of './test/t1' to './non_existing_db/t1' (errno: -1 "Internal error < 0 (Not system error)") +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/innodb-mdev7046.test b/mysql-test/suite/innodb/t/innodb-mdev7046.test index b4085228e02..85a257a1739 100644 --- a/mysql-test/suite/innodb/t/innodb-mdev7046.test +++ b/mysql-test/suite/innodb/t/innodb-mdev7046.test @@ -9,9 +9,10 @@ # Ignore OS errors -call mtr.add_suppression("InnoDB: File ./test/t1*"); -call mtr.add_suppression("InnoDB: Error number*"); -call mtr.add_suppression("InnoDB: File ./test/t1#p#p1#sp#p1sp0.ibd: 'rename' returned OS error*"); +call mtr.add_suppression("InnoDB: File ./test/t1"); +call mtr.add_suppression("InnoDB: Error number"); +call mtr.add_suppression("InnoDB: Cannot rename file '.*/test/t1#[Pp]#p1#[Ss][Pp]#p1sp0\\.ibd' to"); +call mtr.add_suppression("InnoDB: Operating system error number .* in a file operation."); # MDEV-7046: MySQL#74480 - Failing assertion: os_file_status(newpath, &exists, &type) # after Operating system error number 36 in a file operation diff --git a/mysql-test/suite/innodb/t/rename_table.test b/mysql-test/suite/innodb/t/rename_table.test new file mode 100644 index 00000000000..60df8b5d2ec --- /dev/null +++ b/mysql-test/suite/innodb/t/rename_table.test @@ -0,0 +1,11 @@ +--source include/have_innodb.inc + +call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +--replace_result "\\" "/" +--error ER_ERROR_ON_RENAME +RENAME TABLE t1 TO non_existing_db.t1; + +# Cleanup +DROP TABLE t1; -- cgit v1.2.1 From 7bbe324fc17d9734833f717921629c36d1d0c996 Mon Sep 17 00:00:00 2001 From: Andrei Elkin Date: Fri, 8 Jun 2018 22:01:05 +0300 Subject: MDEV-13577 slave_parallel_mode=optimistic should not report the mode's specific temporary errors The optimistic parallel slave's worker thread could face a run-time error due to the algorithm's specifics which allows for conflicts like the reported "Can't find record in 'table'". A typical stack is like {noformat} #0 handler::print_error (this=0x61c00008f8a0, error=149, errflag=0) at handler.cc:3650 #1 0x0000555555e95361 in write_record (thd=thd@entry=0x62a0000a2208, table=table@entry=0x61f00008ce88, info=info@entry=0x7fffdee356d0) at sql_insert.cc:1944 #2 0x0000555555ea7767 in mysql_insert (thd=thd@entry=0x62a0000a2208, table_list=0x61b00012ada0, fields=..., values_list=..., update_fields=..., update_values=..., duplic=, ignore=) at sql_insert.cc:1039 #3 0x0000555555efda90 in mysql_execute_command (thd=thd@entry=0x62a0000a2208) at sql_parse.cc:3927 #4 0x0000555555f0cc50 in mysql_parse (thd=0x62a0000a2208, rawbuf=, length=, parser_state=) at sql_parse.cc:7449 #5 0x00005555566d4444 in Query_log_event::do_apply_event (this=0x61200005b9c8, rgi=, query_arg=, q_len_arg=) at log_event.cc:4508 #6 0x00005555566d639e in Query_log_event::do_apply_event (this=, rgi=) at log_event.cc:4185 #7 0x0000555555d738cf in Log_event::apply_event (rgi=0x61d0001ea080, this=0x61200005b9c8) at log_event.h:1343 #8 apply_event_and_update_pos_apply (ev=ev@entry=0x61200005b9c8, thd=thd@entry=0x62a0000a2208, rgi=rgi@entry=0x61d0001ea080, reason=) at slave.cc:3479 #9 0x0000555555d8596b in apply_event_and_update_pos_for_parallel (ev=ev@entry=0x61200005b9c8, thd=thd@entry=0x62a0000a2208, rgi=rgi@entry=0x61d0001ea080) at slave.cc:3623 #10 0x00005555562aca83 in rpt_handle_event (qev=qev@entry=0x6190000fa088, rpt=rpt@entry=0x62200002bd68) at rpl_parallel.cc:50 #11 0x00005555562bd04e in handle_rpl_parallel_thread (arg=arg@entry=0x62200002bd68) at rpl_parallel.cc:1258 {noformat} Here {{handler::print_error}} computes whether to error log the current error when --log-warnings > 1. The decision flag is consulted bu {{my_message_sql()}} which can be eventually called. In the bug case the decision is to log. However in the optimistic mode slave applier case any conflict is attempted to resolve with rollback and retry to success. Hence the logging is at least extraneous. The case is fixed with adding a new flag {{ME_LOG_AS_WARN}} which {{handler::print_error}} may propagate further on through {{my_error}} when the error comes from an optimistically running slave worker thread. The new flag effectively requests the warning level for the errlog record, while the thread's DA records the actual error (which is regarded as temporary one by the parallel slave error handler). --- .../suite/rpl/r/rpl_parallel_optimistic.result | 23 ++++++++ .../suite/rpl/t/rpl_parallel_optimistic.test | 64 +++++++++++++++++++++- 2 files changed, 86 insertions(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index 0177e65b10f..a6da3399fab 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -1,4 +1,6 @@ include/rpl_init.inc [topology=1->2] +call mtr.add_suppression("Warning.*Deadlock found when trying to get lock; try restarting transaction"); +call mtr.add_suppression("Warning.*mysqld: Can't find record in 't2'"); ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; @@ -543,6 +545,27 @@ a b 57 7 58 8 59 9 +DELETE FROM t1; +DELETE FROM t2; +include/save_master_gtid.inc +include/sync_with_master_gtid.inc +BEGIN; +INSERT INTO t1 SET a=1; +SET @save.binlog_format=@@session.binlog_format; +SET @@SESSION.binlog_format=row; +BEGIN; +INSERT INTO t1 SET a=1; +INSERT INTO t2 SET a=1; +COMMIT; +BEGIN; +DELETE FROM t2; +COMMIT; +ROLLBACK; +SET @@SESSION.binlog_format= @save.binlog_format; +DELETE FROM t1; +DELETE FROM t2; +include/save_master_gtid.inc +include/sync_with_master_gtid.inc include/stop_slave.inc SET GLOBAL slave_parallel_mode=@old_parallel_mode; SET GLOBAL slave_parallel_threads=@old_parallel_threads; diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index 41fb6ebb72e..28bf4a77fd4 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -4,6 +4,11 @@ --let $rpl_topology=1->2 --source include/rpl_init.inc +--connection server_2 +call mtr.add_suppression("Warning.*Deadlock found when trying to get lock; try restarting transaction"); +# The following instruction is a part of the proof of MDEV-13577 fixes, below. +call mtr.add_suppression("Warning.*mysqld: Can't find record in 't2'"); + --connection server_1 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; @@ -480,8 +485,65 @@ SELECT * FROM t2 WHERE a >= 40 ORDER BY a; SELECT * FROM t1 WHERE a >= 40 ORDER BY a; SELECT * FROM t2 WHERE a >= 40 ORDER BY a; -# Clean up. +# partial cleanup to reuse the tables by following tests +--connection server_1 +DELETE FROM t1; +DELETE FROM t2; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc +# +# MDEV-13577 optimistic parallel slave errors out to error log unnecessary +# + +# The 1st of the following two trx:s a blocker on slave +--connection server_2 +BEGIN; +INSERT INTO t1 SET a=1; + +--connection server_1 +SET @save.binlog_format=@@session.binlog_format; +SET @@SESSION.binlog_format=row; + +BEGIN; + INSERT INTO t1 SET a=1; + INSERT INTO t2 SET a=1; +COMMIT; + +# This transaction is going to win optimistical race with above INSERT +# on slave while being depend on it. That means it will face a kind of temporary error +# and then will retry to succeed. +BEGIN; + DELETE FROM t2; +COMMIT; + +# First make sure DELETE raced indeed to get stuck at retrying stage +# where it runs "realistically" now. There is nomore optimistic error +# in the errorlog, which is downgraded to the warning level (when +# --log-warnings > 1), see above suppression. +--connection server_2 +--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE state = "Waiting for prior transaction to commit" +--source include/wait_condition.inc + +# Next release the 1st trx to commit. +--connection server_2 +ROLLBACK; + +# MDEV-13577 local cleanup: +--connection server_1 +SET @@SESSION.binlog_format= @save.binlog_format; +DELETE FROM t1; +DELETE FROM t2; +--source include/save_master_gtid.inc + +--connection server_2 +--source include/sync_with_master_gtid.inc + +# +# Clean up. +# --connection server_2 --source include/stop_slave.inc SET GLOBAL slave_parallel_mode=@old_parallel_mode; -- cgit v1.2.1 From d2e1ed8b936a78ceeec0e64231997d7ed18a4daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Wed, 13 Jun 2018 08:33:25 +0300 Subject: Fix innodb.rename_table for embedded An embedded run will output the full path name instead of a relative one. Update results to cover both cases. --- mysql-test/suite/innodb/r/rename_table.result | 2 +- mysql-test/suite/innodb/t/rename_table.test | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/rename_table.result b/mysql-test/suite/innodb/r/rename_table.result index b2e15c87348..49ce3254091 100644 --- a/mysql-test/suite/innodb/r/rename_table.result +++ b/mysql-test/suite/innodb/r/rename_table.result @@ -1,5 +1,5 @@ call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); CREATE TABLE t1 (a INT) ENGINE=InnoDB; RENAME TABLE t1 TO non_existing_db.t1; -ERROR HY000: Error on rename of './test/t1' to './non_existing_db/t1' (errno: -1 "Internal error < 0 (Not system error)") +ERROR HY000: Error on rename of '**path-to-t1**' to '**path-to-non-existing-db-t1**' (errno: -1 "Internal error < 0 (Not system error)") DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/rename_table.test b/mysql-test/suite/innodb/t/rename_table.test index 60df8b5d2ec..695c0915d14 100644 --- a/mysql-test/suite/innodb/t/rename_table.test +++ b/mysql-test/suite/innodb/t/rename_table.test @@ -3,7 +3,7 @@ call mtr.add_suppression("InnoDB: (Operating system error|The error means|Cannot rename file)"); CREATE TABLE t1 (a INT) ENGINE=InnoDB; ---replace_result "\\" "/" +--replace_regex /\'.*t1\' to/'**path-to-t1**' to/ /to \'.*non.*t1\'/to '**path-to-non-existing-db-t1**'/ --error ER_ERROR_ON_RENAME RENAME TABLE t1 TO non_existing_db.t1; -- cgit v1.2.1 From 72005b7a1c42cb31294ead822b812909e5885f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 13 Jun 2018 08:26:46 +0300 Subject: MDEV-13103: Improve 'cannot be decrypted' error message buf_page_check_corrupt(): Display the file name. --- .../suite/encryption/r/innodb-bad-key-change.result | 8 ++++---- .../suite/encryption/r/innodb-bad-key-change2.result | 5 ++--- .../suite/encryption/r/innodb-bad-key-change4.result | 2 +- .../suite/encryption/r/innodb-compressed-blob.result | 3 +-- .../suite/encryption/r/innodb-encryption-disable.result | 3 +-- .../suite/encryption/r/innodb-force-corrupt.result | 8 ++------ mysql-test/suite/encryption/r/innodb-missing-key.result | 4 +--- mysql-test/suite/encryption/r/innodb-redo-badkey.result | 17 +++++++---------- mysql-test/suite/encryption/r/innodb-redo-nokeys.result | 13 +++++-------- .../suite/encryption/t/innodb-bad-key-change.test | 9 +++++---- .../suite/encryption/t/innodb-bad-key-change2.test | 5 ++--- .../suite/encryption/t/innodb-bad-key-change4.test | 2 +- .../suite/encryption/t/innodb-compressed-blob.test | 3 +-- .../suite/encryption/t/innodb-encryption-disable.test | 3 +-- mysql-test/suite/encryption/t/innodb-force-corrupt.test | 8 ++------ mysql-test/suite/encryption/t/innodb-missing-key.test | 4 +--- mysql-test/suite/encryption/t/innodb-redo-badkey.test | 17 +++++++---------- mysql-test/suite/encryption/t/innodb-redo-nokeys.test | 13 +++++-------- 18 files changed, 49 insertions(+), 78 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result index d581b98513d..51fc7a8cbc4 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result @@ -1,7 +1,7 @@ -call mtr.add_suppression("InnoDB: The page .*"); -call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* "); -call mtr.add_suppression("Plugin 'file_key_management' .*"); -call mtr.add_suppression("mysqld: File .*"); +call mtr.add_suppression("Plugin 'file_key_management' init function returned error"); +call mtr.add_suppression("Plugin 'file_key_management' registration.*failed"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("mysqld: File .*keysbad3.txt' not found "); # Start server with keys2.txt SET GLOBAL innodb_file_format = `Barracuda`; diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result index 94ed922a0ec..1ed78a9efd2 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change2.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change2.result @@ -1,6 +1,5 @@ -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1new cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("Couldn't load plugins from 'file_key_management.*"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); call mtr.add_suppression("InnoDB: Table \'\"test\".\"t1\"\' tablespace is set as discarded."); SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result index 227b8cc3deb..a491b084764 100644 --- a/mysql-test/suite/encryption/r/innodb-bad-key-change4.result +++ b/mysql-test/suite/encryption/r/innodb-bad-key-change4.result @@ -1,4 +1,4 @@ -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test.t1\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("InnoDB: Cannot open table .*"); call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*"); call mtr.add_suppression("Couldn't load plugins from 'file_key_management.*"); diff --git a/mysql-test/suite/encryption/r/innodb-compressed-blob.result b/mysql-test/suite/encryption/r/innodb-compressed-blob.result index 15c2a410948..ce73b80820f 100644 --- a/mysql-test/suite/encryption/r/innodb-compressed-blob.result +++ b/mysql-test/suite/encryption/r/innodb-compressed-blob.result @@ -1,5 +1,4 @@ -call mtr.add_suppression("InnoDB: However key management plugin or used key_version .*"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-3] cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '..test.t[1-3]\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("Unable to decompress space ..test.t[1-3].ibd \\[[1-9][0-9]*:[0-9]+\\]"); # Restart mysqld --file-key-management-filename=keys2.txt SET GLOBAL innodb_file_format = `Barracuda`; diff --git a/mysql-test/suite/encryption/r/innodb-encryption-disable.result b/mysql-test/suite/encryption/r/innodb-encryption-disable.result index dd2b025553e..4d15098d936 100644 --- a/mysql-test/suite/encryption/r/innodb-encryption-disable.result +++ b/mysql-test/suite/encryption/r/innodb-encryption-disable.result @@ -1,5 +1,4 @@ -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t5 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("Couldn't load plugins from 'file_key_management*"); create table t5 ( `intcol1` int(32) DEFAULT NULL, diff --git a/mysql-test/suite/encryption/r/innodb-force-corrupt.result b/mysql-test/suite/encryption/r/innodb-force-corrupt.result index 3f3a2afb02d..7d63f47d17e 100644 --- a/mysql-test/suite/encryption/r/innodb-force-corrupt.result +++ b/mysql-test/suite/encryption/r/innodb-force-corrupt.result @@ -1,9 +1,5 @@ -CALL mtr.add_suppression("InnoDB: Database page corruption on disk or a failed .*"); -CALL mtr.add_suppression("InnoDB: Corruption: Block in space_id .*"); -CALL mtr.add_suppression("InnoDB: However key management plugin or used key_version .*"); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[0-9]+ page \[page id: space=[0-9]+, page number=[0-9]+\]. You may have to recover from a backup."); SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; set global innodb_compression_algorithm = 1; diff --git a/mysql-test/suite/encryption/r/innodb-missing-key.result b/mysql-test/suite/encryption/r/innodb-missing-key.result index 2f2cc025973..53ca0845c25 100644 --- a/mysql-test/suite/encryption/r/innodb-missing-key.result +++ b/mysql-test/suite/encryption/r/innodb-missing-key.result @@ -1,6 +1,4 @@ -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); # Start server with keys2.txt CREATE TABLE t1(a int not null primary key auto_increment, b varchar(128)) engine=innodb ENCRYPTED=YES ENCRYPTION_KEY_ID=19; diff --git a/mysql-test/suite/encryption/r/innodb-redo-badkey.result b/mysql-test/suite/encryption/r/innodb-redo-badkey.result index e12dad6d0d7..ed578d80b3a 100644 --- a/mysql-test/suite/encryption/r/innodb-redo-badkey.result +++ b/mysql-test/suite/encryption/r/innodb-redo-badkey.result @@ -1,16 +1,13 @@ call mtr.add_suppression("InnoDB: Block in space_id .* in file .* encrypted."); -call mtr.add_suppression("Plugin 'file_key_management' .*"); +call mtr.add_suppression("Plugin 'file_key_management' "); call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("InnoDB: Read operation failed for tablespace .*"); -call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*"); -call mtr.add_suppression("InnoDB: Recovery read page .*"); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE .*"); -call mtr.add_suppression("InnoDB: Plugin initialization aborted .*"); +call mtr.add_suppression("InnoDB: Read operation failed for tablespace "); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed"); +call mtr.add_suppression("InnoDB: Recovery read page "); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1234]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE "); +call mtr.add_suppression("InnoDB: Plugin initialization aborted "); call mtr.add_suppression("InnoDB: ############### CORRUPT LOG RECORD FOUND ##################"); # Restart mysqld --file-key-management-filename=keys2.txt # Wait max 10 min for key encryption threads to encrypt all spaces diff --git a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result index dcbe1f5a395..1ea706dbde4 100644 --- a/mysql-test/suite/encryption/r/innodb-redo-nokeys.result +++ b/mysql-test/suite/encryption/r/innodb-redo-nokeys.result @@ -1,13 +1,10 @@ -call mtr.add_suppression("InnoDB: Block in space_id .*"); -call mtr.add_suppression("mysqld: File .*"); -call mtr.add_suppression("Plugin 'file_key_management' .*"); +call mtr.add_suppression("InnoDB: Block in space_id "); +call mtr.add_suppression("mysqld: File "); +call mtr.add_suppression("Plugin 'file_key_management' "); call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available"); -call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\."); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1234]\\.ibd' cannot be decrypted\\."); # Restart mysqld --file-key-management-filename=keys2.txt SET GLOBAL innodb_file_format = `Barracuda`; SET GLOBAL innodb_file_per_table = ON; diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test index 6fa5fc9847f..9d61770f543 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test @@ -8,10 +8,11 @@ # table exists and encryption service is not available. # -call mtr.add_suppression("InnoDB: The page .*"); -call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* "); -call mtr.add_suppression("Plugin 'file_key_management' .*"); -call mtr.add_suppression("mysqld: File .*"); +call mtr.add_suppression("Plugin 'file_key_management' init function returned error"); +call mtr.add_suppression("Plugin 'file_key_management' registration.*failed"); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("mysqld: File .*keysbad3.txt' not found "); + --echo --echo # Start server with keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test index 52ee442c725..0c312f1f449 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change2.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change2.test @@ -8,10 +8,9 @@ # MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys # MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key # -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1new cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\."); # Suppression for builds where file_key_management plugin is linked statically -call mtr.add_suppression("Couldn't load plugins from 'file_key_management.*"); +call mtr.add_suppression("Couldn't load plugins from 'file_key_management"); call mtr.add_suppression("InnoDB: Table \'\"test\".\"t1\"\' tablespace is set as discarded."); --let $restart_parameters=--plugin-load-add=file_key_management.so --file-key-management --file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test index 14d88614f55..0c52bfe3fe6 100644 --- a/mysql-test/suite/encryption/t/innodb-bad-key-change4.test +++ b/mysql-test/suite/encryption/t/innodb-bad-key-change4.test @@ -7,7 +7,7 @@ # MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys # -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '.*test.t1\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("InnoDB: Cannot open table .*"); call mtr.add_suppression("InnoDB: .ibd file is missing for table test/.*"); # Suppression for builds where file_key_management plugin is linked statically diff --git a/mysql-test/suite/encryption/t/innodb-compressed-blob.test b/mysql-test/suite/encryption/t/innodb-compressed-blob.test index cb69f22f745..4a81dae5a0f 100644 --- a/mysql-test/suite/encryption/t/innodb-compressed-blob.test +++ b/mysql-test/suite/encryption/t/innodb-compressed-blob.test @@ -4,8 +4,7 @@ # embedded does not support restart -- source include/not_embedded.inc -call mtr.add_suppression("InnoDB: However key management plugin or used key_version .*"); -call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file test/t[1-3] cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[0-9]+\\] in file '..test.t[1-3]\\.ibd' cannot be decrypted\\."); call mtr.add_suppression("Unable to decompress space ..test.t[1-3].ibd \\[[1-9][0-9]*:[0-9]+\\]"); --echo # Restart mysqld --file-key-management-filename=keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-encryption-disable.test b/mysql-test/suite/encryption/t/innodb-encryption-disable.test index 38f36076c73..6ade8d6e3b2 100644 --- a/mysql-test/suite/encryption/t/innodb-encryption-disable.test +++ b/mysql-test/suite/encryption/t/innodb-encryption-disable.test @@ -7,8 +7,7 @@ # MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table # -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t5 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[15]\\.ibd' cannot be decrypted\\."); # Suppression for builds where file_key_management plugin is linked statically call mtr.add_suppression("Couldn't load plugins from 'file_key_management*"); diff --git a/mysql-test/suite/encryption/t/innodb-force-corrupt.test b/mysql-test/suite/encryption/t/innodb-force-corrupt.test index dd4ee51b1eb..cb6440127cc 100644 --- a/mysql-test/suite/encryption/t/innodb-force-corrupt.test +++ b/mysql-test/suite/encryption/t/innodb-force-corrupt.test @@ -7,12 +7,8 @@ # Don't test under embedded -- source include/not_embedded.inc -CALL mtr.add_suppression("InnoDB: Database page corruption on disk or a failed .*"); -CALL mtr.add_suppression("InnoDB: Corruption: Block in space_id .*"); -CALL mtr.add_suppression("InnoDB: However key management plugin or used key_version .*"); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed file read of tablespace test/t[0-9]+ page \[page id: space=[0-9]+, page number=[0-9]+\]. You may have to recover from a backup."); --disable_warnings SET GLOBAL innodb_file_format = `Barracuda`; diff --git a/mysql-test/suite/encryption/t/innodb-missing-key.test b/mysql-test/suite/encryption/t/innodb-missing-key.test index 07a2b16211c..6ea0528825b 100644 --- a/mysql-test/suite/encryption/t/innodb-missing-key.test +++ b/mysql-test/suite/encryption/t/innodb-missing-key.test @@ -7,9 +7,7 @@ # MDEV-11004: Unable to start (Segfault or os error 2) when encryption key missing # -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\."); --echo --echo # Start server with keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-redo-badkey.test b/mysql-test/suite/encryption/t/innodb-redo-badkey.test index 159646541c7..69de4f0f921 100644 --- a/mysql-test/suite/encryption/t/innodb-redo-badkey.test +++ b/mysql-test/suite/encryption/t/innodb-redo-badkey.test @@ -4,18 +4,15 @@ -- source include/not_embedded.inc call mtr.add_suppression("InnoDB: Block in space_id .* in file .* encrypted."); -call mtr.add_suppression("Plugin 'file_key_management' .*"); +call mtr.add_suppression("Plugin 'file_key_management' "); call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("InnoDB: Read operation failed for tablespace .*"); -call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed.*"); -call mtr.add_suppression("InnoDB: Recovery read page .*"); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); -call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE .*"); -call mtr.add_suppression("InnoDB: Plugin initialization aborted .*"); +call mtr.add_suppression("InnoDB: Read operation failed for tablespace "); +call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed"); +call mtr.add_suppression("InnoDB: Recovery read page "); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1234]\\.ibd' cannot be decrypted\\."); +call mtr.add_suppression("InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE "); +call mtr.add_suppression("InnoDB: Plugin initialization aborted "); call mtr.add_suppression("InnoDB: ############### CORRUPT LOG RECORD FOUND ##################"); --echo # Restart mysqld --file-key-management-filename=keys2.txt diff --git a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test index e55e2ade153..68d831fcd17 100644 --- a/mysql-test/suite/encryption/t/innodb-redo-nokeys.test +++ b/mysql-test/suite/encryption/t/innodb-redo-nokeys.test @@ -3,16 +3,13 @@ # embedded does not support restart -- source include/not_embedded.inc -call mtr.add_suppression("InnoDB: Block in space_id .*"); -call mtr.add_suppression("mysqld: File .*"); -call mtr.add_suppression("Plugin 'file_key_management' .*"); +call mtr.add_suppression("InnoDB: Block in space_id "); +call mtr.add_suppression("mysqld: File "); +call mtr.add_suppression("Plugin 'file_key_management' "); call mtr.add_suppression("InnoDB: cannot enable encryption, encryption plugin is not available"); -call mtr.add_suppression("Plugin 'InnoDB' init function returned error."); +call mtr.add_suppression("Plugin 'InnoDB' init function returned error\\."); call mtr.add_suppression("Plugin 'InnoDB' registration as a STORAGE ENGINE failed."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t2 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t3 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t4 cannot be decrypted."); -call mtr.add_suppression("InnoDB: The page \[page id: space=[0-9]+, page number=[0-9]+\] in file test/t1 cannot be decrypted."); +call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1234]\\.ibd' cannot be decrypted\\."); --echo # Restart mysqld --file-key-management-filename=keys2.txt -- let $restart_parameters=--file-key-management-filename=$MYSQL_TEST_DIR/std_data/keys2.txt -- cgit v1.2.1 From 51254da52c144781695250a98f365fbc090ef619 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 12 Jun 2018 12:37:28 +0200 Subject: MDEV-15359 Thread stay in "cleaning up" status after finishing make thd_get_error_context_description() to show not just thd->proc_info, but exactly the same thread state that SHOW PROCESSLIST shows. --- mysql-test/suite/plugins/r/processlist.result | 8 ++++++++ mysql-test/suite/plugins/t/processlist.test | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 mysql-test/suite/plugins/r/processlist.result create mode 100644 mysql-test/suite/plugins/t/processlist.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/plugins/r/processlist.result b/mysql-test/suite/plugins/r/processlist.result new file mode 100644 index 00000000000..d08ea9d3523 --- /dev/null +++ b/mysql-test/suite/plugins/r/processlist.result @@ -0,0 +1,8 @@ +create table t1 (a int) engine=innodb; +start transaction; +insert t1 values (1); +state from show engine innodb status + +state from show processlist + +drop table t1; diff --git a/mysql-test/suite/plugins/t/processlist.test b/mysql-test/suite/plugins/t/processlist.test new file mode 100644 index 00000000000..5aacef317b9 --- /dev/null +++ b/mysql-test/suite/plugins/t/processlist.test @@ -0,0 +1,18 @@ +# +# MDEV-15359 Thread stay in "cleaning up" status after finishing +# +source include/have_innodb.inc; + +create table t1 (a int) engine=innodb; +start transaction; +insert t1 values (1); +let id=`select connection_id()`; +connect con2,localhost,root; +let s=query_get_value(show engine innodb status,Status,1); +disable_query_log; +eval select regexp_replace("$s", '(?s)^.*MySQL thread id $id,.*root([^\n]*)\n.*', '\\\\1') as `state from show engine innodb status`; +eval select state as `state from show processlist` from information_schema.processlist where id = $id; +enable_query_log; +disconnect con2; +connection default; +drop table t1; -- cgit v1.2.1 From f5eb37129f24893ab095e78c6fd2ef87e2c460cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 13 Jun 2018 16:15:21 +0300 Subject: MDEV-13103 Deal with page_compressed page corruption fil_page_decompress(): Replaces fil_decompress_page(). Allow the caller detect errors. Remove duplicated code. Use the "safe" instead of "fast" variants of decompression routines. fil_page_compress(): Replaces fil_compress_page(). The length of the input buffer always was srv_page_size (innodb_page_size). Remove printouts, and remove the fil_space_t* parameter. buf_tmp_buffer_t::reserved: Make private; the accessors acquire() and release() will use atomic memory access. buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter. Do not acquire any mutex. Remove the allocation of the buffers. buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf(): Refactored away from buf_pool_reserve_tmp_slot(). buf_page_decrypt_after_read(): Make static, and simplify the logic. Use the encryption buffer also for decompressing. buf_page_io_complete(), buf_dblwr_process(): Check more failures. fil_space_encrypt(): Simplify the debug checks. fil_space_t::printed_compression_failure: Remove. fil_get_compression_alg_name(): Remove. fil_iterate(): Allocate a buffer for compression and decompression only once, instead of allocating and freeing it for every page that uses compression, during IMPORT TABLESPACE. fil_node_get_space_id(), fil_page_is_index_page(), fil_page_is_lzo_compressed(): Remove (unused code). --- mysql-test/suite/innodb/r/innodb-page_compression_default.result | 1 - mysql-test/suite/innodb/r/innodb-page_compression_snappy.result | 1 - mysql-test/suite/innodb/t/innodb-page_compression_default.test | 2 -- mysql-test/suite/innodb/t/innodb-page_compression_snappy.test | 2 -- 4 files changed, 6 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_default.result b/mysql-test/suite/innodb/r/innodb-page_compression_default.result index 18f7fb5e04a..19d0a875ce6 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_default.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_default.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+."); set global innodb_file_format = `Barracuda`; set global innodb_file_per_table = on; create table innodb_normal (c1 int not null auto_increment primary key, b char(200)) engine=innodb; diff --git a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result index 74cfa9bce3a..824b671eea3 100644 --- a/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result +++ b/mysql-test/suite/innodb/r/innodb-page_compression_snappy.result @@ -1,4 +1,3 @@ -call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+."); set global innodb_compression_algorithm = snappy; set global innodb_file_format = `Barracuda`; set global innodb_file_per_table = on; diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_default.test b/mysql-test/suite/innodb/t/innodb-page_compression_default.test index 1cc6c917548..34b1829485e 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_default.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_default.test @@ -1,8 +1,6 @@ --source include/have_innodb.inc --source include/not_embedded.inc -call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+."); - # All page compression test use the same --source include/innodb-page-compression.inc diff --git a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test index 532ec294d28..0186c24ef2e 100644 --- a/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test +++ b/mysql-test/suite/innodb/t/innodb-page_compression_snappy.test @@ -2,8 +2,6 @@ -- source include/have_innodb_snappy.inc --source include/not_embedded.inc -call mtr.add_suppression("InnoDB: Compression failed for space [0-9]+ name test/innodb_page_compressed[0-9] len [0-9]+ err 2 write_size [0-9]+."); - # snappy set global innodb_compression_algorithm = snappy; -- cgit v1.2.1 From c69357d8d4592b746a2dd7074c8fb6a437098b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Thu, 14 Jun 2018 15:47:39 +0300 Subject: MDEV-15611 Due to the failure of foreign key detection, Galera slave node killed himself. Merge following change from 10.2 revision-id: d52cff9f10aeea208a1058f7b5527e602125584c (mariadb-10.2.14-25-gd52cff9) parent(s): bc2501453c3ab9a2cf3516bc3557de8665bc2776 author: Sachin Setiya committer: Sachin Setiya timestamp: 2018-04-04 12:26:06 +0530 message: MDEV-15611 Due to the failure of foreign key detection, Galera... slave node killed himself. Problem:- If we try to delete table with foreign key and table whom it is referring with wsrep_slave_threads>1 then galera tries to execute both Delete_rows_log-event in parallel, which should not happen. Solution:- This is happening because we do not have foreign key info in write set. Upto version 10.2.7 it used to work fine. Actually it happening because of issue in commit 2f342c4. wsrep_must_process_fk should be used with negation. --- mysql-test/suite/galera/r/galera_mdev_15611.result | 15 +++++++++++ mysql-test/suite/galera/t/galera_mdev_15611.cnf | 5 ++++ mysql-test/suite/galera/t/galera_mdev_15611.test | 30 ++++++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_mdev_15611.result create mode 100644 mysql-test/suite/galera/t/galera_mdev_15611.cnf create mode 100644 mysql-test/suite/galera/t/galera_mdev_15611.test (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/galera/r/galera_mdev_15611.result b/mysql-test/suite/galera/r/galera_mdev_15611.result new file mode 100644 index 00000000000..677ed98202d --- /dev/null +++ b/mysql-test/suite/galera/r/galera_mdev_15611.result @@ -0,0 +1,15 @@ +CREATE TABLE t1 ( +id int primary key +); +CREATE TABLE t2 ( +id int primary key , +f_id int DEFAULT NULL, FOREIGN KEY(f_id) REFERENCES t1 (id) +); +insert into t1 select 1; +#Running 200 insert in t2 table +select count(*) from t2; +count(*) +200 +delete from t2; +delete from t1; +drop table t2,t1; diff --git a/mysql-test/suite/galera/t/galera_mdev_15611.cnf b/mysql-test/suite/galera/t/galera_mdev_15611.cnf new file mode 100644 index 00000000000..b6f601c56b1 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_mdev_15611.cnf @@ -0,0 +1,5 @@ +!include ../galera_2nodes.cnf +[mysqld.1] + +[mysqld.2] +wsrep_slave_threads=6 diff --git a/mysql-test/suite/galera/t/galera_mdev_15611.test b/mysql-test/suite/galera/t/galera_mdev_15611.test new file mode 100644 index 00000000000..d32d7e75262 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_mdev_15611.test @@ -0,0 +1,30 @@ +--source include/galera_cluster.inc +--source include/have_innodb.inc + +--connection node_1 +CREATE TABLE t1 ( + id int primary key +); + +CREATE TABLE t2 ( + id int primary key , + f_id int DEFAULT NULL, FOREIGN KEY(f_id) REFERENCES t1 (id) +); + +insert into t1 select 1; + +--disable_query_log +--let $count=200 +--echo #Running 200 insert in t2 table +while($count) +{ + #Repeatedly execute the following SQL until you generate thousands of data + --eval insert into t2 values ($count, 1); + --dec $count +} +--enable_query_log + +select count(*) from t2; +delete from t2; +delete from t1; +drop table t2,t1; -- cgit v1.2.1 From 7fdb7d4058e5a41687057a4b56c5a7698521ba99 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 15 Jun 2018 18:20:36 +0200 Subject: more sst test failures * xtrabackup no longer support --compact * wsrep_sst_mysqldump wasn't always using --default-file * wsrep_sst.cc overquoted --default-file for wsrep_sst_mysqldump also remove redundant lines config and test lines, compiler warnings, and mark big tests as big. --- .../suite/galera/r/galera_sst_mysqldump_with_key.result | 4 ++-- mysql-test/suite/galera/t/galera_sst_mariabackup.test | 1 + mysql-test/suite/galera/t/galera_sst_mysqldump.test | 1 + .../suite/galera/t/galera_sst_mysqldump_with_key.cnf | 4 ---- .../suite/galera/t/galera_sst_mysqldump_with_key.test | 14 ++++++-------- mysql-test/suite/galera/t/galera_sst_rsync.test | 1 + .../suite/galera/t/galera_sst_xtrabackup-v2-options.cnf | 2 +- mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test | 1 + 8 files changed, 13 insertions(+), 15 deletions(-) (limited to 'mysql-test/suite') 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 227e1c15444..074481afc2d 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,4 +1,6 @@ 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"); CREATE USER 'sst'; GRANT ALL PRIVILEGES ON *.* TO 'sst'; SET GLOBAL wsrep_sst_auth = 'sst:'; @@ -105,5 +107,3 @@ 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"); DROP USER sslsst; -SET GLOBAL general_log = ON; -SET GLOBAL slow_query_log = ON; diff --git a/mysql-test/suite/galera/t/galera_sst_mariabackup.test b/mysql-test/suite/galera/t/galera_sst_mariabackup.test index 0e7ac487700..bcb9ade3a25 100644 --- a/mysql-test/suite/galera/t/galera_sst_mariabackup.test +++ b/mysql-test/suite/galera/t/galera_sst_mariabackup.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc --source include/have_mariabackup.inc diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump.test b/mysql-test/suite/galera/t/galera_sst_mysqldump.test index 390e9815b20..835fac94a68 100644 --- a/mysql-test/suite/galera/t/galera_sst_mysqldump.test +++ b/mysql-test/suite/galera/t/galera_sst_mysqldump.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source suite/galera/include/galera_sst_set_mysqldump.inc diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf index e108484b248..44e5573b3e6 100644 --- a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf +++ b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.cnf @@ -12,10 +12,6 @@ wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore [mysqld] wsrep_debug=ON -ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem -ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem -ssl-key=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem - [client] ssl-ca=@ENV.MYSQL_TEST_DIR/std_data/cacert.pem ssl-cert=@ENV.MYSQL_TEST_DIR/std_data/client-cert.pem diff --git a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test index c813e04169f..0dbc63b531c 100644 --- a/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test +++ b/mysql-test/suite/galera/t/galera_sst_mysqldump_with_key.test @@ -5,9 +5,12 @@ --source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc ---source include/have_openssl.inc +--source include/have_ssl_communication.inc --source suite/galera/include/galera_sst_set_mysqldump.inc +--let $node_1=node_1 +--let $node_2=node_2 +--source include/auto_increment_offset_save.inc --connection node_1 CREATE USER sslsst; @@ -18,12 +21,7 @@ SET GLOBAL wsrep_sst_auth = 'sslsst:'; --source suite/galera/include/galera_st_disconnect_slave.inc +--source include/auto_increment_offset_restore.inc --source suite/galera/include/galera_sst_restore.inc -DROP USER sslsst; - ---connection node_2 -# We have to manually restore global_log and slow_query_log due to mysql-wsrep#108 -# Otherwise MTR's check_testcases complains -SET GLOBAL general_log = ON; -SET GLOBAL slow_query_log = ON; +DROP USER sslsst; diff --git a/mysql-test/suite/galera/t/galera_sst_rsync.test b/mysql-test/suite/galera/t/galera_sst_rsync.test index f796356cac7..5c08707e870 100644 --- a/mysql-test/suite/galera/t/galera_sst_rsync.test +++ b/mysql-test/suite/galera/t/galera_sst_rsync.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --let $node_1=node_1 diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf index 1e29673c0ff..3abf2549aae 100644 --- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2-options.cnf @@ -8,7 +8,7 @@ wsrep_debug=ON [xtrabackup] backup-locks close-files -compact +#compact - disabled in xtrabackup 2.4, https://bugs.launchpad.net/percona-xtrabackup/+bug/1192834/comments/29 # compression requires qpress from the Percona repositories # compress # compress-threads=2 diff --git a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test index f1fd0f3ddf3..c270e4d0b19 100644 --- a/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test +++ b/mysql-test/suite/galera/t/galera_sst_xtrabackup-v2.test @@ -1,3 +1,4 @@ +--source include/big_test.inc --source include/galera_cluster.inc --source include/have_innodb.inc --source include/have_xtrabackup.inc -- cgit v1.2.1 From 15b92915ed93661a56f40430204d18bf7b7cf1fc Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Tue, 19 Jun 2018 13:02:02 +0400 Subject: MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe --- mysql-test/suite/vcol/r/vcol_misc.result | 10 ++++++++++ mysql-test/suite/vcol/t/vcol_misc.test | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result index 0a8d87dc2f7..92be94cbb81 100644 --- a/mysql-test/suite/vcol/r/vcol_misc.result +++ b/mysql-test/suite/vcol/r/vcol_misc.result @@ -354,5 +354,15 @@ a b c DROP TABLE t1; SET sql_mode=DEFAULT; # +# MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe +# +SHOW TABLES; +Tables_in_test +t1 +SHOW CREATE TABLE t1; +ERROR HY000: Incorrect information in file: './test/t1.frm' +ALTER TABLE t1; +ERROR HY000: Incorrect information in file: './test/t1.frm' +# # End of 5.5 tests # diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test index 1ac0b4f80b7..a123d21d574 100644 --- a/mysql-test/suite/vcol/t/vcol_misc.test +++ b/mysql-test/suite/vcol/t/vcol_misc.test @@ -1,5 +1,7 @@ --source include/have_ucs2.inc +let $MYSQLD_DATADIR= `select @@datadir`; + --disable_warnings drop table if exists t1,t2; --enable_warnings @@ -318,6 +320,20 @@ SELECT * FROM t1; DROP TABLE t1; SET sql_mode=DEFAULT; + +--echo # +--echo # MDEV-15834 The code in TABLE_SHARE::init_from_binary_frm_image() is not safe +--echo # + +--copy_file std_data/frm/t1.frm $MYSQLD_DATADIR/test/t1.frm +SHOW TABLES; +--error ER_NOT_FORM_FILE +SHOW CREATE TABLE t1; +--error ER_NOT_FORM_FILE +ALTER TABLE t1; +--remove_file $MYSQLD_DATADIR/test/t1.frm + + --echo # --echo # End of 5.5 tests --echo # -- cgit v1.2.1 From bb24663f5ad955a615172512c04779d219bb6645 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Jun 2018 10:45:57 +0200 Subject: MDEV-13577 slave_parallel_mode=optimistic should not report the mode's specific temporary errors Revert 7bbe324fc17 Fix the bug differently (in log_event.cc) Fix the test case to actually fail without the bug fix --- mysql-test/suite/rpl/r/rpl_parallel_optimistic.result | 4 ++-- mysql-test/suite/rpl/t/rpl_parallel_optimistic.test | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result index a6da3399fab..3cd4f8231bf 100644 --- a/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result +++ b/mysql-test/suite/rpl/r/rpl_parallel_optimistic.result @@ -1,6 +1,4 @@ include/rpl_init.inc [topology=1->2] -call mtr.add_suppression("Warning.*Deadlock found when trying to get lock; try restarting transaction"); -call mtr.add_suppression("Warning.*mysqld: Can't find record in 't2'"); ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; SET @old_parallel_threads=@@GLOBAL.slave_parallel_threads; @@ -549,6 +547,7 @@ DELETE FROM t1; DELETE FROM t2; include/save_master_gtid.inc include/sync_with_master_gtid.inc +set global log_warnings=2; BEGIN; INSERT INTO t1 SET a=1; SET @save.binlog_format=@@session.binlog_format; @@ -567,6 +566,7 @@ DELETE FROM t2; include/save_master_gtid.inc include/sync_with_master_gtid.inc include/stop_slave.inc +set global log_warnings=default; SET GLOBAL slave_parallel_mode=@old_parallel_mode; SET GLOBAL slave_parallel_threads=@old_parallel_threads; include/start_slave.inc diff --git a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test index 28bf4a77fd4..9f6669279db 100644 --- a/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test +++ b/mysql-test/suite/rpl/t/rpl_parallel_optimistic.test @@ -4,11 +4,6 @@ --let $rpl_topology=1->2 --source include/rpl_init.inc ---connection server_2 -call mtr.add_suppression("Warning.*Deadlock found when trying to get lock; try restarting transaction"); -# The following instruction is a part of the proof of MDEV-13577 fixes, below. -call mtr.add_suppression("Warning.*mysqld: Can't find record in 't2'"); - --connection server_1 ALTER TABLE mysql.gtid_slave_pos ENGINE=InnoDB; CREATE TABLE t1 (a int PRIMARY KEY, b INT) ENGINE=InnoDB; @@ -500,6 +495,7 @@ DELETE FROM t2; # The 1st of the following two trx:s a blocker on slave --connection server_2 +set global log_warnings=2; BEGIN; INSERT INTO t1 SET a=1; @@ -546,6 +542,7 @@ DELETE FROM t2; # --connection server_2 --source include/stop_slave.inc +set global log_warnings=default; SET GLOBAL slave_parallel_mode=@old_parallel_mode; SET GLOBAL slave_parallel_threads=@old_parallel_threads; --source include/start_slave.inc -- cgit v1.2.1 From 170b43c1568ba6b9a772e8bdfbe90bd06cc2a345 Mon Sep 17 00:00:00 2001 From: Alexander Barkov Date: Wed, 20 Jun 2018 16:36:46 +0400 Subject: MDEV-16534 PPC64: Unexpected error with a negative value into auto-increment columns in HEAP, MyISAM, ARIA --- mysql-test/suite/heap/heap_auto_increment.result | 29 ++++++++++++++++++++++++ mysql-test/suite/heap/heap_auto_increment.test | 25 ++++++++++++++++++++ mysql-test/suite/maria/maria.result | 29 ++++++++++++++++++++++++ mysql-test/suite/maria/maria.test | 25 ++++++++++++++++++++ 4 files changed, 108 insertions(+) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/heap/heap_auto_increment.result b/mysql-test/suite/heap/heap_auto_increment.result index 5b04a77e9eb..ab0c852f253 100644 --- a/mysql-test/suite/heap/heap_auto_increment.result +++ b/mysql-test/suite/heap/heap_auto_increment.result @@ -39,3 +39,32 @@ _rowid _rowid skey sval 1 1 1 hello 2 2 2 hey drop table t1; +# +# Start of 5.5 tests +# +# +# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA +# +CREATE TABLE t1 ( +id TINYINT NOT NULL AUTO_INCREMENT, +name CHAR(30) NOT NULL, +PRIMARY KEY (id) +) ENGINE=MEMORY; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` tinyint(4) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=MEMORY DEFAULT CHARSET=latin1 +INSERT INTO t1 (name) VALUES ('dog'); +UPDATE t1 SET id=-1 WHERE id=1; +INSERT INTO t1 (name) VALUES ('cat'); +SELECT * FROM t1; +id name +-1 dog +2 cat +DROP TABLE t1; +# +# End of 5.5 tests +# diff --git a/mysql-test/suite/heap/heap_auto_increment.test b/mysql-test/suite/heap/heap_auto_increment.test index 016bc946209..bd4a0eaa886 100644 --- a/mysql-test/suite/heap/heap_auto_increment.test +++ b/mysql-test/suite/heap/heap_auto_increment.test @@ -33,3 +33,28 @@ select _rowid,t1._rowid,skey,sval from t1; drop table t1; # End of 4.1 tests + +--echo # +--echo # Start of 5.5 tests +--echo # + +--echo # +--echo # MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA +--echo # + +CREATE TABLE t1 ( + id TINYINT NOT NULL AUTO_INCREMENT, + name CHAR(30) NOT NULL, + PRIMARY KEY (id) +) ENGINE=MEMORY; +SHOW CREATE TABLE t1; +INSERT INTO t1 (name) VALUES ('dog'); +UPDATE t1 SET id=-1 WHERE id=1; +INSERT INTO t1 (name) VALUES ('cat'); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # End of 5.5 tests +--echo # + diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result index 7f8badb78ae..2aca47538cb 100644 --- a/mysql-test/suite/maria/maria.result +++ b/mysql-test/suite/maria/maria.result @@ -2697,3 +2697,32 @@ ALTER TABLE t1 DISABLE KEYS; INSERT INTO t1 (b) VALUES (''); ALTER TABLE t1 ENABLE KEYS; DROP TABLE t1; +# +# Start of 5.5 tests +# +# +# MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA +# +CREATE TABLE t1 ( +id TINYINT NOT NULL AUTO_INCREMENT, +name CHAR(30) NOT NULL, +PRIMARY KEY (id) +) ENGINE=ARIA; +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `id` tinyint(4) NOT NULL AUTO_INCREMENT, + `name` char(30) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=1 +INSERT INTO t1 (name) VALUES ('dog'); +UPDATE t1 SET id=-1 WHERE id=1; +INSERT INTO t1 (name) VALUES ('cat'); +SELECT * FROM t1; +id name +-1 dog +2 cat +DROP TABLE t1; +# +# End of 5.5 tests +# diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test index 39a9a06c4c2..ab8e72dc321 100644 --- a/mysql-test/suite/maria/maria.test +++ b/mysql-test/suite/maria/maria.test @@ -1990,3 +1990,28 @@ aria_page_checksum=$default_checksum, aria_log_file_size=$default_log_file_size; --enable_result_log --enable_query_log + + +--echo # +--echo # Start of 5.5 tests +--echo # + +--echo # +--echo # MDEV-16534 PPC64: Unexpected error with a negative values into auto-increment columns in HEAP, MyISAM, ARIA +--echo # + +CREATE TABLE t1 ( + id TINYINT NOT NULL AUTO_INCREMENT, + name CHAR(30) NOT NULL, + PRIMARY KEY (id) +) ENGINE=ARIA; +SHOW CREATE TABLE t1; +INSERT INTO t1 (name) VALUES ('dog'); +UPDATE t1 SET id=-1 WHERE id=1; +INSERT INTO t1 (name) VALUES ('cat'); +SELECT * FROM t1; +DROP TABLE t1; + +--echo # +--echo # End of 5.5 tests +--echo # -- cgit v1.2.1 From 0a9d78f51d74be7708f2efd940311bf7b33108e9 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Jun 2018 23:27:23 +0200 Subject: Revert "MDEV-16075: Workaround to run MTR test suite for make test" This reverts commit d39629f01ebdd5b89186e6c8a4a8d3dd528bd26a. Because running mtr for many hours with no output whatsoever is not really what we should do. And in 5.5 `make test` just works anyway, nothing to fix here. --- mysql-test/suite/unit/suite.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm index 43eaa970350..78d82ccb31d 100644 --- a/mysql-test/suite/unit/suite.pm +++ b/mysql-test/suite/unit/suite.pm @@ -31,7 +31,7 @@ sub start_test { return "Not run for embedded server" if $::opt_embedded_server; return "Not configured to run ctest" unless -f "../CTestTestfile.cmake"; my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : ""; - my (@ctest_list)= `cd .. && ctest $opt_vs_config -E MTR -C default_ignore --show-only --verbose`; + my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`; return "No ctest" if $?; my ($command, %tests); -- cgit v1.2.1 From 2b8f2b3e882f7ea93c6743f2ad717f968bd245fe Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 20 Jun 2018 23:30:49 +0200 Subject: Fix unit suite on Windows and in out-of-source builds --- mysql-test/suite/unit/suite.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'mysql-test/suite') diff --git a/mysql-test/suite/unit/suite.pm b/mysql-test/suite/unit/suite.pm index 78d82ccb31d..ce7ccefe926 100644 --- a/mysql-test/suite/unit/suite.pm +++ b/mysql-test/suite/unit/suite.pm @@ -28,10 +28,11 @@ sub start_test { } { + my $bin=$ENV{MTR_BINDIR} || '..'; return "Not run for embedded server" if $::opt_embedded_server; - return "Not configured to run ctest" unless -f "../CTestTestfile.cmake"; - my ($ctest_vs)= $opt_vs_config ? "--build-config $opt_vs_config" : ""; - my (@ctest_list)= `cd .. && ctest $opt_vs_config --show-only --verbose`; + return "Not configured to run ctest" unless -f "$bin/CTestTestfile.cmake"; + my ($ctest_vs)= $::opt_vs_config ? "-C ".substr($::opt_vs_config,1) : ""; + my (@ctest_list)= `cd $bin && ctest $ctest_vs --show-only --verbose`; return "No ctest" if $?; my ($command, %tests); -- cgit v1.2.1