-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
1,749 additions
and
368 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# MDEV-20699 do not cache SP in SHOW CREATE | ||
# Warmup round, this might allocate some memory for session variable | ||
# and the output | ||
SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
CREATE PROCEDURE sp0() SELECT 1; | ||
SHOW CREATE PROCEDURE sp0; | ||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation | ||
sp0 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp0`() | ||
SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci | ||
DROP PROCEDURE sp0; | ||
SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
CREATE PROCEDURE sp1() SELECT 1; | ||
SHOW CREATE PROCEDURE sp1; | ||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation | ||
sp1 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `sp1`() | ||
SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci | ||
SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
VARIABLE_VALUE-@local_mem_used | ||
0 | ||
DROP PROCEDURE sp1; | ||
# | ||
# End of 10.3 tests | ||
# |
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,26 @@ | ||
|
||
--source include/not_valgrind.inc | ||
|
||
--echo # MDEV-20699 do not cache SP in SHOW CREATE | ||
--echo # Warmup round, this might allocate some memory for session variable | ||
--echo # and the output | ||
|
||
SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
CREATE PROCEDURE sp0() SELECT 1; | ||
SHOW CREATE PROCEDURE sp0; | ||
DROP PROCEDURE sp0; | ||
|
||
#Check that CREATE/SHOW does not use memory in caches. | ||
SELECT VARIABLE_VALUE into @global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
SELECT VARIABLE_VALUE into @local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
CREATE PROCEDURE sp1() SELECT 1; | ||
SHOW CREATE PROCEDURE sp1; | ||
SELECT VARIABLE_VALUE-@local_mem_used FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
# FIXME: MDEV-26754 main.sp test fails for embedded server | ||
#SELECT VARIABLE_VALUE-@global_mem_used FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME='MEMORY_USED'; | ||
DROP PROCEDURE sp1; | ||
|
||
--echo # | ||
--echo # End of 10.3 tests | ||
--echo # |
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
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,30 @@ | ||
connection node_1; | ||
connection node_2; | ||
connection node_1; | ||
call mtr.add_suppression("WSREP: TO isolation failed for: "); | ||
CREATE TABLE t2(a int not null auto_increment primary key, b int, key(b)) engine=innodb; | ||
INSERT INTO t2 values (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6); | ||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
connection node_1a; | ||
BEGIN; | ||
UPDATE t2 set b = b + 20 where b BETWEEN 2 and 5;; | ||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
connection node_1b; | ||
connection node_2; | ||
Killing server ... | ||
connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1; | ||
connection node_1c; | ||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; | ||
Got one of the listed errors | ||
Got one of the listed errors | ||
CREATE UNIQUE INDEX b2 ON t2(b); | ||
Got one of the listed errors | ||
connection node_1; | ||
disconnect node_1a; | ||
disconnect node_1b; | ||
disconnect node_1c; | ||
connection node_2; | ||
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; | ||
DROP TABLE t2; | ||
disconnect node_2; | ||
disconnect node_1; |
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,71 @@ | ||
# | ||
# Confirm that with two nodes, killing one causes the other to stop accepting connections | ||
# | ||
|
||
--source include/galera_cluster.inc | ||
--source include/have_innodb.inc | ||
|
||
# Save original auto_increment_offset values. | ||
--let $node_1=node_1 | ||
--let $node_2=node_2 | ||
--source include/auto_increment_offset_save.inc | ||
|
||
--connection node_1 | ||
call mtr.add_suppression("WSREP: TO isolation failed for: "); | ||
--let $wsrep_cluster_address_orig = `SELECT @@wsrep_cluster_address` | ||
|
||
CREATE TABLE t2(a int not null auto_increment primary key, b int, key(b)) engine=innodb; | ||
INSERT INTO t2 values (NULL,1),(NULL,2),(NULL,3),(NULL,4),(NULL,5),(NULL,6); | ||
|
||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
--connection node_1a | ||
BEGIN; | ||
--send UPDATE t2 set b = b + 20 where b BETWEEN 2 and 5; | ||
|
||
# | ||
# Take thread id for above query | ||
# | ||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
--connection node_1b | ||
--let $k_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'root' AND COMMAND = 'Sleep' LIMIT 1` | ||
|
||
--connection node_2 | ||
--source include/kill_galera.inc | ||
|
||
--connect node_1c, 127.0.0.1, root, , test, $NODE_MYPORT_1 | ||
--connection node_1c | ||
--error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR | ||
CREATE TABLE t1 (f1 INTEGER NOT NULL PRIMARY KEY) ENGINE=InnoDB; | ||
|
||
--disable_query_log | ||
--error ER_LOCK_DEADLOCK, ER_CANNOT_USER,ER_KILL_QUERY_DENIED_ERROR | ||
--eval KILL QUERY $k_thread; | ||
--enable_query_log | ||
|
||
# Reset the master and restart the slave so that post-test checks can run | ||
--error ER_LOCK_DEADLOCK,ER_UNKNOWN_COM_ERROR | ||
CREATE UNIQUE INDEX b2 ON t2(b); | ||
|
||
--connection node_1 | ||
--disconnect node_1a | ||
--disconnect node_1b | ||
--disconnect node_1c | ||
|
||
--connection node_2 | ||
--source include/start_mysqld.inc | ||
--source include/wait_until_connected_again.inc | ||
|
||
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size' | ||
--source include/wait_condition.inc | ||
|
||
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2 | ||
--source include/wait_until_connected_again.inc | ||
|
||
DROP TABLE t2; | ||
|
||
# Restore original auto_increment_offset values. | ||
--let $node_2=node_2a | ||
--source include/auto_increment_offset_restore.inc | ||
|
||
--source include/galera_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
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
Oops, something went wrong.