Loading mysql-test/r/binlog_format_basic.result +12 −16 Original line number Diff line number Diff line '#---------------------BS_STVARS_002_01----------------------#' SET @start_value= @@global.binlog_format; SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) 1 Loading @@ -9,19 +10,13 @@ COUNT(@@SESSION.binlog_format) 1 Expected '#---------------------BS_STVARS_002_02----------------------#' SET @@GLOBAL.binlog_format=1; Expected error 'Read only variable' Bug: Writeable static variable SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) 1 1 Expected SELECT @@GLOBAL.binlog_format; @@GLOBAL.binlog_format STATEMENT SET @@SESSION.binlog_format=1; Expected error 'Read only variable' Bug: Writeable static variable SELECT COUNT(@@SESSION.binlog_format); COUNT(@@SESSION.binlog_format) 1 1 Expected SELECT @@SESSION.binlog_format; @@SESSION.binlog_format STATEMENT '#---------------------BS_STVARS_002_03----------------------#' SELECT @@GLOBAL.binlog_format = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES Loading Loading @@ -73,3 +68,4 @@ SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) 1 1 Expected SET @@global.binlog_format= @start_value; mysql-test/r/character_set_connection_func.result +2 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ utf8 '#--------------------FN_DYNVARS_011_02-------------------------#' 'connection default' DROP TABLE IF EXISTS t1; CREATE TABLE t1(b CHAR(40) character set utf8); CREATE TABLE t1(b CHAR(40) CHARACTER SET utf8); '--verify that character_set_connection converts character_set_client--' SET @@session.character_set_client = utf8; SET @@session.character_set_results = utf8; Loading Loading @@ -53,3 +53,4 @@ SET @@global.character_set_connection = @global_character_set_connection; SET @@session.character_set_connection = @session_character_set_connection; SET @@session.character_set_client = @session_character_set_client; SET @@session.character_set_results = @session_character_set_results; DROP TABLE t1; mysql-test/r/completion_type_func.result +23 −22 Original line number Diff line number Diff line drop table if exists t1; DROP TABLE IF EXISTS t1; ## Creating new table ## CREATE TABLE t1 ( id INT NOT NULL auto_increment, id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), name varchar(30) name VARCHAR(30) ) ENGINE = INNODB; '#--------------------FN_DYNVARS_017_01-------------------------#' ## Creating new connection ## INSERT into t1(name) values('Record_1'); INSERT INTO t1(name) VALUES('Record_1'); SET @@autocommit = 0; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 ## Setting value of variable to 0 ## SET @@session.completion_type = 0; ## Here commit & rollback should work normally ## START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 INSERT into t1(name) values('Record_2'); INSERT into t1(name) values('Record_3'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_2'); INSERT INTO t1(name) VALUES('Record_3'); SELECT * FROM t1; id name 1 Record_1 2 Record_2 3 Record_3 DELETE FROM t1 where id = 2; SELECT * from t1; DELETE FROM t1 WHERE id = 2; SELECT * FROM t1; id name 1 Record_1 3 Record_3 START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 3 Record_3 INSERT into t1(name) values('Record_4'); INSERT into t1(name) values('Record_5'); INSERT INTO t1(name) VALUES('Record_4'); INSERT INTO t1(name) VALUES('Record_5'); COMMIT; '#--------------------FN_DYNVARS_017_02-------------------------#' SET @@session.completion_type = 2; ## Here commit should work as COMMIT RELEASE ## START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 3 Record_3 4 Record_4 5 Record_5 INSERT into t1(name) values('Record_6'); INSERT into t1(name) values('Record_7'); INSERT INTO t1(name) VALUES('Record_6'); INSERT INTO t1(name) VALUES('Record_7'); COMMIT; ## Inserting rows should give error here because connection should ## ## disconnect after using COMMIT ## INSERT into t1(name) values('Record_4'); INSERT INTO t1(name) VALUES('Record_4'); Got one of the listed errors ## Creating new connection test_con2 ## SET @@session.completion_type = 2; ## Inserting rows and using Rollback which should Rollback & release ## START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 3 Record_3 Loading @@ -69,8 +69,9 @@ id name 5 Record_5 6 Record_6 7 Record_7 INSERT into t1(name) values('Record_8'); INSERT into t1(name) values('Record_9'); INSERT INTO t1(name) VALUES('Record_8'); INSERT INTO t1(name) VALUES('Record_9'); ROLLBACK; INSERT into t1(name) values('Record_4'); INSERT INTO t1(name) VALUES('Record_4'); Got one of the listed errors DROP TABLE t1; mysql-test/r/concurrent_insert_func.result +73 −25 Original line number Diff line number Diff line drop table if exists t1; DROP TABLE IF EXISTS t1; ## Creating new table ## CREATE TABLE t1 ( name varchar(30) name VARCHAR(30) ); '#--------------------FN_DYNVARS_018_01-------------------------#' SET @start_value= @@global.concurrent_insert; ## Setting initial value of variable to 1 ## SET @@global.concurrent_insert = 1; INSERT into t1(name) values('Record_1'); INSERT into t1(name) values('Record_2'); INSERT into t1(name) values('Record_3'); INSERT INTO t1(name) VALUES('Record_1'); INSERT INTO t1(name) VALUES('Record_2'); INSERT INTO t1(name) VALUES('Record_3'); ## locking table ## lock table t1 read local; LOCK TABLE t1 READ LOCAL; ## Creating new connection to insert some rows in table ## connection test_con1; ## New records should come at the end of all rows ## INSERT into t1(name) values('Record_4'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_4'); SELECT * FROM t1; name Record_1 Record_2 Record_3 Record_4 ## unlocking tables ## unlock tables; connection default; UNLOCK TABLES; ## deleting record to create hole in table ## DELETE from t1 where name ='Record_2'; DELETE FROM t1 WHERE name ='Record_2'; '#--------------------FN_DYNVARS_018_02-------------------------#' LOCK TABLE t1 READ LOCAL; connection test_con1; SET @@global.concurrent_insert=1; ## send INSERT which should be blocked until unlock of the table ## INSERT INTO t1(name) VALUES('Record_7'); connection default; ## show processlist info and state ## SELECT state,info FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state= "Locked" AND info LIKE "INSERT INTO t1%"; state info Locked INSERT INTO t1(name) VALUES('Record_7') ## table contents befor UNLOCK ## SELECT * FROM t1; name Record_1 Record_3 Record_4 UNLOCK TABLES; ## table contens after UNLOCK ## SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 INSERT INTO t1(name) VALUES('Record_6'); connection test_con1; SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 Record_6 connection default; '#--------------------FN_DYNVARS_018_03-------------------------#' ## lock table and connect with connection1 ## lock table t1 read local; LOCK TABLE t1 READ LOCAL; connection test_con1; ## setting value of concurrent_insert to 2 ## SET @@global.concurrent_insert=2; ## Inserting record in table, record should go at the end of the table ## INSERT into t1(name) values('Record_5'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_5'); SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 Record_6 Record_5 SELECT @@concurrent_insert; @@concurrent_insert 2 ## Switching to default connection ## connection default; ## Unlocking table ## unlock tables; SELECT * from t1; UNLOCK TABLES; SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 Record_6 Record_5 ## Inserting new row, this should go in the hole ## INSERT into t1(name) values('Record_6'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_6'); SELECT * FROM t1; name Record_1 Record_6 Record_7 Record_3 Record_4 Record_6 Record_5 Record_6 ## connection test_con1 ## DELETE from t1 where name ='Record_3'; SELECT * from t1; DELETE FROM t1 WHERE name ='Record_3'; SELECT * FROM t1; name Record_1 Record_6 Record_7 Record_4 Record_6 Record_5 Record_6 ## Dropping table ## DROP table t1; DROP TABLE t1; ## Disconnecting connection ## SET @@global.concurrent_insert= @start_value; mysql-test/r/delay_key_write_func.result +8 −6 Original line number Diff line number Diff line '#--------------------FN_DYNVARS_023_01-------------------------#' SET @start_value= @@global.delay_key_write; SET @@global.delay_key_write = ON; SELECT @@global.delay_key_write; @@global.delay_key_write Loading Loading @@ -28,8 +29,8 @@ Key_writes 9 SHOW STATUS LIKE 'Key_write_requests'; Variable_name Value Key_write_requests 9 select count(*) from t1; count(*) SELECT COUNT(*) FROM t1; COUNT(*) 9 '----check when delay_key_write is ON---' SET @@global.delay_key_write = ON; Loading @@ -44,8 +45,8 @@ Key_writes 0 SHOW STATUS LIKE 'Key_write_requests'; Variable_name Value Key_write_requests 9 select count(*) from t1; count(*) SELECT COUNT(*) FROM t1; COUNT(*) 9 '----check when delay_key_write is ALL---' SET @@global.delay_key_write = ALL; Loading @@ -60,8 +61,9 @@ Key_writes 0 SHOW STATUS LIKE 'Key_write_requests'; Variable_name Value Key_write_requests 9 select count(*) from t1; count(*) SELECT COUNT(*) FROM t1; COUNT(*) 9 DROP PROCEDURE sp_addRecords; DROP TABLE t1; SET @@global.delay_key_write= @start_value; Loading
mysql-test/r/binlog_format_basic.result +12 −16 Original line number Diff line number Diff line '#---------------------BS_STVARS_002_01----------------------#' SET @start_value= @@global.binlog_format; SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) 1 Loading @@ -9,19 +10,13 @@ COUNT(@@SESSION.binlog_format) 1 Expected '#---------------------BS_STVARS_002_02----------------------#' SET @@GLOBAL.binlog_format=1; Expected error 'Read only variable' Bug: Writeable static variable SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) 1 1 Expected SELECT @@GLOBAL.binlog_format; @@GLOBAL.binlog_format STATEMENT SET @@SESSION.binlog_format=1; Expected error 'Read only variable' Bug: Writeable static variable SELECT COUNT(@@SESSION.binlog_format); COUNT(@@SESSION.binlog_format) 1 1 Expected SELECT @@SESSION.binlog_format; @@SESSION.binlog_format STATEMENT '#---------------------BS_STVARS_002_03----------------------#' SELECT @@GLOBAL.binlog_format = VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES Loading Loading @@ -73,3 +68,4 @@ SELECT COUNT(@@GLOBAL.binlog_format); COUNT(@@GLOBAL.binlog_format) 1 1 Expected SET @@global.binlog_format= @start_value;
mysql-test/r/character_set_connection_func.result +2 −1 Original line number Diff line number Diff line Loading @@ -15,7 +15,7 @@ utf8 '#--------------------FN_DYNVARS_011_02-------------------------#' 'connection default' DROP TABLE IF EXISTS t1; CREATE TABLE t1(b CHAR(40) character set utf8); CREATE TABLE t1(b CHAR(40) CHARACTER SET utf8); '--verify that character_set_connection converts character_set_client--' SET @@session.character_set_client = utf8; SET @@session.character_set_results = utf8; Loading Loading @@ -53,3 +53,4 @@ SET @@global.character_set_connection = @global_character_set_connection; SET @@session.character_set_connection = @session_character_set_connection; SET @@session.character_set_client = @session_character_set_client; SET @@session.character_set_results = @session_character_set_results; DROP TABLE t1;
mysql-test/r/completion_type_func.result +23 −22 Original line number Diff line number Diff line drop table if exists t1; DROP TABLE IF EXISTS t1; ## Creating new table ## CREATE TABLE t1 ( id INT NOT NULL auto_increment, id INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (id), name varchar(30) name VARCHAR(30) ) ENGINE = INNODB; '#--------------------FN_DYNVARS_017_01-------------------------#' ## Creating new connection ## INSERT into t1(name) values('Record_1'); INSERT INTO t1(name) VALUES('Record_1'); SET @@autocommit = 0; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 ## Setting value of variable to 0 ## SET @@session.completion_type = 0; ## Here commit & rollback should work normally ## START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 INSERT into t1(name) values('Record_2'); INSERT into t1(name) values('Record_3'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_2'); INSERT INTO t1(name) VALUES('Record_3'); SELECT * FROM t1; id name 1 Record_1 2 Record_2 3 Record_3 DELETE FROM t1 where id = 2; SELECT * from t1; DELETE FROM t1 WHERE id = 2; SELECT * FROM t1; id name 1 Record_1 3 Record_3 START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 3 Record_3 INSERT into t1(name) values('Record_4'); INSERT into t1(name) values('Record_5'); INSERT INTO t1(name) VALUES('Record_4'); INSERT INTO t1(name) VALUES('Record_5'); COMMIT; '#--------------------FN_DYNVARS_017_02-------------------------#' SET @@session.completion_type = 2; ## Here commit should work as COMMIT RELEASE ## START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 3 Record_3 4 Record_4 5 Record_5 INSERT into t1(name) values('Record_6'); INSERT into t1(name) values('Record_7'); INSERT INTO t1(name) VALUES('Record_6'); INSERT INTO t1(name) VALUES('Record_7'); COMMIT; ## Inserting rows should give error here because connection should ## ## disconnect after using COMMIT ## INSERT into t1(name) values('Record_4'); INSERT INTO t1(name) VALUES('Record_4'); Got one of the listed errors ## Creating new connection test_con2 ## SET @@session.completion_type = 2; ## Inserting rows and using Rollback which should Rollback & release ## START TRANSACTION; SELECT * from t1; SELECT * FROM t1; id name 1 Record_1 3 Record_3 Loading @@ -69,8 +69,9 @@ id name 5 Record_5 6 Record_6 7 Record_7 INSERT into t1(name) values('Record_8'); INSERT into t1(name) values('Record_9'); INSERT INTO t1(name) VALUES('Record_8'); INSERT INTO t1(name) VALUES('Record_9'); ROLLBACK; INSERT into t1(name) values('Record_4'); INSERT INTO t1(name) VALUES('Record_4'); Got one of the listed errors DROP TABLE t1;
mysql-test/r/concurrent_insert_func.result +73 −25 Original line number Diff line number Diff line drop table if exists t1; DROP TABLE IF EXISTS t1; ## Creating new table ## CREATE TABLE t1 ( name varchar(30) name VARCHAR(30) ); '#--------------------FN_DYNVARS_018_01-------------------------#' SET @start_value= @@global.concurrent_insert; ## Setting initial value of variable to 1 ## SET @@global.concurrent_insert = 1; INSERT into t1(name) values('Record_1'); INSERT into t1(name) values('Record_2'); INSERT into t1(name) values('Record_3'); INSERT INTO t1(name) VALUES('Record_1'); INSERT INTO t1(name) VALUES('Record_2'); INSERT INTO t1(name) VALUES('Record_3'); ## locking table ## lock table t1 read local; LOCK TABLE t1 READ LOCAL; ## Creating new connection to insert some rows in table ## connection test_con1; ## New records should come at the end of all rows ## INSERT into t1(name) values('Record_4'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_4'); SELECT * FROM t1; name Record_1 Record_2 Record_3 Record_4 ## unlocking tables ## unlock tables; connection default; UNLOCK TABLES; ## deleting record to create hole in table ## DELETE from t1 where name ='Record_2'; DELETE FROM t1 WHERE name ='Record_2'; '#--------------------FN_DYNVARS_018_02-------------------------#' LOCK TABLE t1 READ LOCAL; connection test_con1; SET @@global.concurrent_insert=1; ## send INSERT which should be blocked until unlock of the table ## INSERT INTO t1(name) VALUES('Record_7'); connection default; ## show processlist info and state ## SELECT state,info FROM INFORMATION_SCHEMA.PROCESSLIST WHERE state= "Locked" AND info LIKE "INSERT INTO t1%"; state info Locked INSERT INTO t1(name) VALUES('Record_7') ## table contents befor UNLOCK ## SELECT * FROM t1; name Record_1 Record_3 Record_4 UNLOCK TABLES; ## table contens after UNLOCK ## SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 INSERT INTO t1(name) VALUES('Record_6'); connection test_con1; SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 Record_6 connection default; '#--------------------FN_DYNVARS_018_03-------------------------#' ## lock table and connect with connection1 ## lock table t1 read local; LOCK TABLE t1 READ LOCAL; connection test_con1; ## setting value of concurrent_insert to 2 ## SET @@global.concurrent_insert=2; ## Inserting record in table, record should go at the end of the table ## INSERT into t1(name) values('Record_5'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_5'); SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 Record_6 Record_5 SELECT @@concurrent_insert; @@concurrent_insert 2 ## Switching to default connection ## connection default; ## Unlocking table ## unlock tables; SELECT * from t1; UNLOCK TABLES; SELECT * FROM t1; name Record_1 Record_7 Record_3 Record_4 Record_6 Record_5 ## Inserting new row, this should go in the hole ## INSERT into t1(name) values('Record_6'); SELECT * from t1; INSERT INTO t1(name) VALUES('Record_6'); SELECT * FROM t1; name Record_1 Record_6 Record_7 Record_3 Record_4 Record_6 Record_5 Record_6 ## connection test_con1 ## DELETE from t1 where name ='Record_3'; SELECT * from t1; DELETE FROM t1 WHERE name ='Record_3'; SELECT * FROM t1; name Record_1 Record_6 Record_7 Record_4 Record_6 Record_5 Record_6 ## Dropping table ## DROP table t1; DROP TABLE t1; ## Disconnecting connection ## SET @@global.concurrent_insert= @start_value;
mysql-test/r/delay_key_write_func.result +8 −6 Original line number Diff line number Diff line '#--------------------FN_DYNVARS_023_01-------------------------#' SET @start_value= @@global.delay_key_write; SET @@global.delay_key_write = ON; SELECT @@global.delay_key_write; @@global.delay_key_write Loading Loading @@ -28,8 +29,8 @@ Key_writes 9 SHOW STATUS LIKE 'Key_write_requests'; Variable_name Value Key_write_requests 9 select count(*) from t1; count(*) SELECT COUNT(*) FROM t1; COUNT(*) 9 '----check when delay_key_write is ON---' SET @@global.delay_key_write = ON; Loading @@ -44,8 +45,8 @@ Key_writes 0 SHOW STATUS LIKE 'Key_write_requests'; Variable_name Value Key_write_requests 9 select count(*) from t1; count(*) SELECT COUNT(*) FROM t1; COUNT(*) 9 '----check when delay_key_write is ALL---' SET @@global.delay_key_write = ALL; Loading @@ -60,8 +61,9 @@ Key_writes 0 SHOW STATUS LIKE 'Key_write_requests'; Variable_name Value Key_write_requests 9 select count(*) from t1; count(*) SELECT COUNT(*) FROM t1; COUNT(*) 9 DROP PROCEDURE sp_addRecords; DROP TABLE t1; SET @@global.delay_key_write= @start_value;