Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
40 changed files
with
822 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| CREATE TABLE t1 (i int); | ||
| connect con1,localhost,root,,test; | ||
| RENAME TABLE t1 TO t2; | ||
| connection default; | ||
| FLUSH TABLES; | ||
| connection con1; | ||
| disconnect con1; | ||
| connection default; | ||
| DROP TABLE IF EXISTS t1, t2; | ||
| Warnings: | ||
| Note 1051 Unknown table 'test.t1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; | ||
| VARIABLE_VALUE = 'Synced' | ||
| 1 | ||
| SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
| VARIABLE_VALUE = 2 | ||
| 1 | ||
| CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; | ||
| INSERT INTO t1 VALUES (1); | ||
| SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; | ||
| VARIABLE_VALUE = 'Synced' | ||
| 1 | ||
| SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
| VARIABLE_VALUE = 2 | ||
| 1 | ||
| SELECT COUNT(*) = 1 FROM t1; | ||
| COUNT(*) = 1 | ||
| 1 | ||
| DROP TABLE t1; | ||
| CREATE TABLE `t1` ( | ||
| `col1` int(11) NOT NULL, | ||
| `col2` varchar(64) NOT NULL DEFAULT '', | ||
| `col3` varchar(32) NOT NULL DEFAULT '0', | ||
| `col4` varchar(64) NOT NULL DEFAULT '', | ||
| `col5` tinyint(4) NOT NULL DEFAULT '0', | ||
| `col6` int(11) NOT NULL DEFAULT '0', | ||
| `col7` varchar(64) NOT NULL DEFAULT '', | ||
| `col8` tinyint(4) NOT NULL DEFAULT '0', | ||
| `col9` tinyint(4) NOT NULL DEFAULT '0', | ||
| `col10` text NOT NULL, | ||
| `col11` varchar(255) NOT NULL DEFAULT '', | ||
| `col12` tinyint(4) NOT NULL DEFAULT '1' | ||
| ) ; | ||
| create table t2 (test int); | ||
| insert into t2 values (1); | ||
| drop table t1,t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| !include ../galera_2nodes.cnf | ||
| [mysqld] | ||
|
|
||
| encrypt-tmp-files = 1 | ||
| plugin-load-add= @ENV.FILE_KEY_MANAGEMENT_SO | ||
| file-key-management | ||
| loose-file-key-management-filename= @ENV.MYSQL_TEST_DIR/std_data/keys.txt | ||
| log-bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # This file tests that mariadb cluster should not crash when encrypt_tmp_file | ||
| # is enabled | ||
|
|
||
| --source include/galera_cluster.inc | ||
| --source include/have_innodb.inc | ||
|
|
||
| SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; | ||
| SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
|
|
||
| CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) Engine=InnoDB; | ||
| INSERT INTO t1 VALUES (1); | ||
|
|
||
| --connection node_2 | ||
| SELECT VARIABLE_VALUE = 'Synced' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_state_comment'; | ||
| SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'; | ||
|
|
||
| SELECT COUNT(*) = 1 FROM t1; | ||
|
|
||
| DROP TABLE t1; | ||
|
|
||
| --connection node_1 | ||
|
|
||
| CREATE TABLE `t1` ( | ||
| `col1` int(11) NOT NULL, | ||
| `col2` varchar(64) NOT NULL DEFAULT '', | ||
| `col3` varchar(32) NOT NULL DEFAULT '0', | ||
| `col4` varchar(64) NOT NULL DEFAULT '', | ||
| `col5` tinyint(4) NOT NULL DEFAULT '0', | ||
| `col6` int(11) NOT NULL DEFAULT '0', | ||
| `col7` varchar(64) NOT NULL DEFAULT '', | ||
| `col8` tinyint(4) NOT NULL DEFAULT '0', | ||
| `col9` tinyint(4) NOT NULL DEFAULT '0', | ||
| `col10` text NOT NULL, | ||
| `col11` varchar(255) NOT NULL DEFAULT '', | ||
| `col12` tinyint(4) NOT NULL DEFAULT '1' | ||
| ) ; | ||
|
|
||
| #Although we just need $counter >= 907 for IO_CACHE to use | ||
| #encrypted temp file. Just on safe side I am using $counter | ||
| # = 1100 | ||
| --disable_query_log | ||
| --let $counter=1100 | ||
| --let $query= (1,'test','test','test',0,0,'-1',0,0,'','',-1) | ||
| while($counter) | ||
| { | ||
| --let $query= $query ,(1,'test','test','test',0,0,'-1',0,0,'','',-1) | ||
| --dec $counter | ||
| } | ||
| --let $query= INSERT INTO t1 values $query ; | ||
| --eval $query | ||
| --enable_query_log | ||
| #INSERT INTO `t1` VALUE | ||
|
|
||
| create table t2 (test int); | ||
| insert into t2 values (1); | ||
|
|
||
| drop table t1,t2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| include/master-slave.inc | ||
| [connection master] | ||
| # | ||
| # MDEV-16229 Replication aborts with ER_VIEW_SELECT_TMPTABLE after | ||
| # half-failed RENAME | ||
| # | ||
| CREATE TABLE t1 (a INT); | ||
| CREATE TEMPORARY TABLE t1 (b INT); | ||
| RENAME TABLE t1 TO tmp, tmp TO t1; | ||
| SHOW CREATE TABLE t1; | ||
| Table Create Table | ||
| t1 CREATE TEMPORARY TABLE `t1` ( | ||
| `b` int(11) DEFAULT NULL | ||
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | ||
| CREATE VIEW v AS SELECT * FROM t1; | ||
| ERROR HY000: View's SELECT refers to a temporary table 't1' | ||
| RENAME TABLE t1 TO tmp, t1 TO t2; | ||
| SHOW CREATE TABLE tmp; | ||
| Table Create Table | ||
| tmp CREATE TEMPORARY TABLE `tmp` ( | ||
| `b` int(11) DEFAULT NULL | ||
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | ||
| SHOW CREATE TABLE t2; | ||
| Table Create Table | ||
| t2 CREATE TABLE `t2` ( | ||
| `a` int(11) DEFAULT NULL | ||
| ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | ||
| CREATE VIEW v AS SELECT * FROM tmp; | ||
| ERROR HY000: View's SELECT refers to a temporary table 'tmp' | ||
| CREATE VIEW v AS SELECT * FROM t2; | ||
| connection slave; | ||
| connection master; | ||
| DROP VIEW v; | ||
| DROP TABLE tmp; | ||
| DROP TABLE t2; | ||
| include/rpl_end.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| --source include/have_binlog_format_mixed.inc | ||
| --source include/master-slave.inc | ||
|
|
||
| --echo # | ||
| --echo # MDEV-16229 Replication aborts with ER_VIEW_SELECT_TMPTABLE after | ||
| --echo # half-failed RENAME | ||
| --echo # | ||
|
|
||
| CREATE TABLE t1 (a INT); | ||
| CREATE TEMPORARY TABLE t1 (b INT); | ||
| RENAME TABLE t1 TO tmp, tmp TO t1; | ||
| SHOW CREATE TABLE t1; | ||
| --error ER_VIEW_SELECT_TMPTABLE | ||
| CREATE VIEW v AS SELECT * FROM t1; | ||
|
|
||
| RENAME TABLE t1 TO tmp, t1 TO t2; | ||
| SHOW CREATE TABLE tmp; | ||
| SHOW CREATE TABLE t2; | ||
| --error ER_VIEW_SELECT_TMPTABLE | ||
| CREATE VIEW v AS SELECT * FROM tmp; | ||
| CREATE VIEW v AS SELECT * FROM t2; | ||
|
|
||
| --sync_slave_with_master | ||
|
|
||
| # Cleanup | ||
|
|
||
| --connection master | ||
|
|
||
| DROP VIEW v; | ||
| DROP TABLE tmp; | ||
| DROP TABLE t2; | ||
|
|
||
| --source include/rpl_end.inc |
Oops, something went wrong.