summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result6
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test19
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug12400341.result25
-rw-r--r--mysql-test/suite/innodb/t/innodb-lock.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12400341-master.opt1
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug12400341.test103
-rw-r--r--mysql-test/suite/innodb/t/innodb_cmp_drop_table.test4
-rw-r--r--mysql-test/suite/maria/r/ps_maria.result4
-rw-r--r--mysql-test/suite/perfschema/r/all_instances.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_checksum.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_basic.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_log_pos.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_manual_change_index_file.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_packet.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_stop_slave.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result10
-rw-r--r--mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_basic.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_log_pos.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_manual_change_index_file.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_packet.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_stop_slave.test44
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test2
-rw-r--r--mysql-test/suite/sys_vars/r/all_vars.result1
-rw-r--r--mysql-test/suite/sys_vars/r/character_sets_dir_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result64
-rw-r--r--mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result65
-rw-r--r--mysql-test/suite/sys_vars/r/plugin_dir_basic.result10
-rw-r--r--mysql-test/suite/sys_vars/r/stored_program_cache_basic.result59
-rw-r--r--mysql-test/suite/sys_vars/t/all_vars.test3
-rw-r--r--mysql-test/suite/sys_vars/t/character_sets_dir_basic.test19
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test52
-rw-r--r--mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test58
-rw-r--r--mysql-test/suite/sys_vars/t/stored_program_cache_basic.test59
35 files changed, 620 insertions, 63 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
index 458805a9157..87ffb6cdd9f 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result
@@ -54,13 +54,13 @@ USE test;
#
SET @old_log_warnings = @@log_warnings;
DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
+CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(15));
SET GLOBAL LOG_WARNINGS = 0;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+INSERT INTO t1 VALUES(UUID(), 'timestamp');
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
SET GLOBAL LOG_WARNINGS = 1;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+INSERT INTO t1 VALUES(UUID(), 'timestamp');
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave.
DROP TABLE t1;
diff --git a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
index 78a16945791..8b48c1723fd 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test
@@ -101,16 +101,24 @@ eval USE $old_db;
--echo # Bug#46265: Can not disable warning about unsafe statements for binary logging
--echo #
+let BINLOG_COUNTER1= `select CONVERT(NOW(),UNSIGNED) as timestmap from dual`;
+
SET @old_log_warnings = @@log_warnings;
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
-CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
+CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(15));
+
SET GLOBAL LOG_WARNINGS = 0;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+# Replacing the result file content here.
+# Instead of writing $BINLOG_COUNTER1 value to result file,
+# writing a fixed string timestamp to it.
+--replace_result $BINLOG_COUNTER1 timestamp
+eval INSERT INTO t1 VALUES(UUID(), '$BINLOG_COUNTER1');
SET GLOBAL LOG_WARNINGS = 1;
-INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
+--replace_result $BINLOG_COUNTER1 timestamp
+eval INSERT INTO t1 VALUES(UUID(), '$BINLOG_COUNTER1');
DROP TABLE t1;
SET GLOBAL log_warnings = @old_log_warnings;
@@ -134,7 +142,9 @@ perl;
use Cwd;
my $log_error= $ENV{'LOG_ERROR'} or die "LOG_ERROR not set";
open(FILE, "$log_error") or die("Unable to open '$log_error' from directory " . cwd() . "\n");
- my $count = () = grep(/Bug#46265/g,<FILE>);
+ my $binlog_counter= $ENV{'BINLOG_COUNTER1'} or die "BINLOG_COUNTER1 not set";
+ my $count = () = grep(/$binlog_counter/g,<FILE>);
+ # Grep the timestamp value from the error file.
print "Occurrences: $count\n";
close(FILE);
EOF
@@ -156,7 +166,6 @@ delete from t1 where n2=1 + rand()*0;
drop table t1;
# bug#50192: diplaying the unsafe warning comes out to the user warning stack
-
-- disable_warnings
DROP TABLE IF EXISTS t1, t2;
-- enable_warnings
diff --git a/mysql-test/suite/innodb/r/innodb_bug12400341.result b/mysql-test/suite/innodb/r/innodb_bug12400341.result
new file mode 100644
index 00000000000..551e94f5e77
--- /dev/null
+++ b/mysql-test/suite/innodb/r/innodb_bug12400341.result
@@ -0,0 +1,25 @@
+call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too");
+show variables like "max_connections";
+Variable_name Value
+max_connections 64
+show variables like "innodb_thread_concurrency";
+Variable_name Value
+innodb_thread_concurrency 0
+show variables like "innodb_file_per_table";
+Variable_name Value
+innodb_file_per_table ON
+drop database if exists mysqltest;
+create database mysqltest;
+CREATE TABLE mysqltest.transtable (id int unsigned NOT NULL PRIMARY KEY, val int DEFAULT 0) ENGINE=InnoDB;
+select count(*) from information_schema.processlist;
+count(*)
+33
+CREATE TABLE mysqltest.testtable (id int unsigned not null primary key) ENGINE=InnoDB;
+ERROR HY000: Can't create table 'mysqltest.testtable' (errno: 177)
+select count(*) from information_schema.processlist;
+count(*)
+33
+select count(*) from information_schema.processlist;
+count(*)
+33
+drop database mysqltest;
diff --git a/mysql-test/suite/innodb/t/innodb-lock.test b/mysql-test/suite/innodb/t/innodb-lock.test
index 2c2516557ef..e3026ac505b 100644
--- a/mysql-test/suite/innodb/t/innodb-lock.test
+++ b/mysql-test/suite/innodb/t/innodb-lock.test
@@ -1,8 +1,4 @@
--source include/have_innodb.inc
-if (`select plugin_auth_version <= "1.1.8-20.1" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not supported by XtraDB 1.1.8-20.1 or earlier
-}
#
# Check and select innodb lock type
diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt b/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
new file mode 100644
index 00000000000..13f480704f5
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341-master.opt
@@ -0,0 +1 @@
+--max_connections=64 --innodb_thread_concurrency=0 --innodb_file_per_table --innodb_rollback_segments=2
diff --git a/mysql-test/suite/innodb/t/innodb_bug12400341.test b/mysql-test/suite/innodb/t/innodb_bug12400341.test
new file mode 100644
index 00000000000..2ab1be81f6d
--- /dev/null
+++ b/mysql-test/suite/innodb/t/innodb_bug12400341.test
@@ -0,0 +1,103 @@
+# Test for bug #12400341: INNODB CAN LEAVE ORPHAN IBD FILES AROUND
+
+-- source include/have_innodb.inc
+
+if (`select count(*)=0 from information_schema.global_variables where variable_name = 'INNODB_TRX_RSEG_N_SLOTS_DEBUG'`)
+{
+ --skip Test requires InnoDB built with UNIV_DEBUG definition.
+}
+
+call mtr.add_suppression("InnoDB: Warning: cannot find a free slot for an undo log. Do you have too");
+
+--disable_query_log
+set @old_innodb_trx_rseg_n_slots_debug = @@innodb_trx_rseg_n_slots_debug;
+set global innodb_trx_rseg_n_slots_debug = 32;
+--enable_query_log
+
+show variables like "max_connections";
+show variables like "innodb_thread_concurrency";
+show variables like "innodb_file_per_table";
+
+--disable_warnings
+drop database if exists mysqltest;
+--enable_warnings
+
+create database mysqltest;
+CREATE TABLE mysqltest.transtable (id int unsigned NOT NULL PRIMARY KEY, val int DEFAULT 0) ENGINE=InnoDB;
+
+--disable_query_log
+#
+# Insert in 1 transaction which needs over 1 page undo record to avoid the insert_undo cached,
+# because the cached insert_undo can be reused at "CREATE TABLE" statement later.
+#
+START TRANSACTION;
+let $c = 1024;
+while ($c)
+{
+ eval INSERT INTO mysqltest.transtable (id) VALUES ($c);
+ dec $c;
+}
+COMMIT;
+
+let $c = 32;
+while ($c)
+{
+ # if failed at here, it might be shortage of file descriptors limit.
+ connect (con$c,localhost,root,,);
+ dec $c;
+}
+--enable_query_log
+
+select count(*) from information_schema.processlist;
+
+#
+# fill the all undo slots
+#
+--disable_query_log
+let $c = 32;
+while ($c)
+{
+ connection con$c;
+ START TRANSACTION;
+ eval UPDATE mysqltest.transtable SET val = 1 WHERE id = 33 - $c;
+ dec $c;
+}
+--enable_query_log
+
+connection default;
+
+--error ER_CANT_CREATE_TABLE
+CREATE TABLE mysqltest.testtable (id int unsigned not null primary key) ENGINE=InnoDB;
+
+select count(*) from information_schema.processlist;
+
+--disable_query_log
+let $c = 32;
+while ($c)
+{
+ connection con$c;
+ ROLLBACK;
+ dec $c;
+}
+--enable_query_log
+
+connection default;
+select count(*) from information_schema.processlist;
+
+--disable_query_log
+let $c = 32;
+while ($c)
+{
+ disconnect con$c;
+ dec $c;
+}
+--enable_query_log
+
+#
+# If the isolated .ibd file remained, the drop database should fail.
+#
+drop database mysqltest;
+
+--disable_query_log
+set global innodb_trx_rseg_n_slots_debug = @old_innodb_trx_rseg_n_slots_debug;
+--enable_query_log
diff --git a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
index c9a0237fa5f..4263e839c85 100644
--- a/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
+++ b/mysql-test/suite/innodb/t/innodb_cmp_drop_table.test
@@ -1,8 +1,4 @@
--source include/have_innodb.inc
-if (`select plugin_auth_version <= "1.1.8-20.1" from information_schema.plugins where plugin_name='innodb'`)
-{
- --skip Not supported by XtraDB 1.1.8-20.1 or earlier
-}
let $per_table=`select @@innodb_file_per_table`;
let $format=`select @@innodb_file_format`;
diff --git a/mysql-test/suite/maria/r/ps_maria.result b/mysql-test/suite/maria/r/ps_maria.result
index 1f26f03f479..6c1b40302ec 100644
--- a/mysql-test/suite/maria/r/ps_maria.result
+++ b/mysql-test/suite/maria/r/ps_maria.result
@@ -1793,7 +1793,7 @@ t5 CREATE TABLE `t5` (
`param08` longtext,
`const09` datetime DEFAULT NULL,
`param09` longtext,
- `const10` decimal(22,6) NOT NULL DEFAULT '0.000000',
+ `const10` decimal(22,6) DEFAULT NULL,
`param10` decimal(65,30) DEFAULT NULL,
`const11` int(4) DEFAULT NULL,
`param11` bigint(20) DEFAULT NULL,
@@ -1823,7 +1823,7 @@ def test t5 t5 const08 const08 253 19 19 N 1 0 8
def test t5 t5 param08 param08 252 4294967295 19 Y 16 0 8
def test t5 t5 const09 const09 12 19 19 Y 128 0 63
def test t5 t5 param09 param09 252 4294967295 19 Y 16 0 8
-def test t5 t5 const10 const10 246 24 16 N 32769 6 63
+def test t5 t5 const10 const10 246 24 16 Y 32768 6 63
def test t5 t5 param10 param10 246 67 40 Y 32768 30 63
def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
diff --git a/mysql-test/suite/perfschema/r/all_instances.result b/mysql-test/suite/perfschema/r/all_instances.result
index 59b1950cb88..599356fa6ea 100644
--- a/mysql-test/suite/perfschema/r/all_instances.result
+++ b/mysql-test/suite/perfschema/r/all_instances.result
@@ -71,6 +71,7 @@ wait/synch/mutex/sql/LOG::LOCK_log
wait/synch/mutex/sql/LOG_INFO::lock
wait/synch/mutex/sql/Master_info::data_lock
wait/synch/mutex/sql/Master_info::run_lock
+wait/synch/mutex/sql/Master_info::sleep_lock
wait/synch/mutex/sql/MDL_map::mutex
wait/synch/mutex/sql/MDL_wait::LOCK_wait_status
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index
@@ -79,6 +80,7 @@ wait/synch/mutex/sql/Query_cache::structure_guard_mutex
wait/synch/mutex/sql/Relay_log_info::data_lock
wait/synch/mutex/sql/Relay_log_info::log_space_lock
wait/synch/mutex/sql/Relay_log_info::run_lock
+wait/synch/mutex/sql/Relay_log_info::sleep_lock
wait/synch/mutex/sql/Slave_reporting_capability::err_lock
wait/synch/mutex/sql/TABLE_SHARE::LOCK_ha_data
wait/synch/mutex/sql/THD::LOCK_thd_data
@@ -120,6 +122,7 @@ wait/synch/cond/sql/COND_thread_cache
wait/synch/cond/sql/COND_thread_count
wait/synch/cond/sql/Event_scheduler::COND_state
wait/synch/cond/sql/Master_info::data_cond
+wait/synch/cond/sql/Master_info::sleep_cond
wait/synch/cond/sql/Master_info::start_cond
wait/synch/cond/sql/Master_info::stop_cond
wait/synch/cond/sql/MDL_context::COND_wait_status
@@ -130,6 +133,7 @@ wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond
wait/synch/cond/sql/Query_cache::COND_cache_status_changed
wait/synch/cond/sql/Relay_log_info::data_cond
wait/synch/cond/sql/Relay_log_info::log_space_cond
+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
diff --git a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
index bcae1c2c62b..c132f80f58e 100644
--- a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
+++ b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
@@ -11,7 +11,7 @@ reset slave;
start slave;
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236'
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the last event was read from 'master-bin.000001' at 316, the last byte read was read from 'master-bin.000001' at 335.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the start event position from '.' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
reset master;
stop slave;
reset slave;
diff --git a/mysql-test/suite/rpl/r/rpl_checksum.result b/mysql-test/suite/rpl/r/rpl_checksum.result
index 3297e8c2754..feabfc19631 100644
--- a/mysql-test/suite/rpl/r/rpl_checksum.result
+++ b/mysql-test/suite/rpl/r/rpl_checksum.result
@@ -71,7 +71,7 @@ insert into t1 values (1) /* will not be applied on slave due to simulation */;
set @@global.debug_dbug='d,simulate_slave_unaware_checksum';
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the last event was read from 'master-bin.000010' at 245, the last byte read was read from 'master-bin.000010' at 245.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the start event position from 'master-bin.000009' at 245, the last event was read from 'master-bin.000010' at 245, the last byte read was read from 'master-bin.000010' at 245.''
select count(*) as zero from t1;
zero
0
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
index 29b5b768b66..cc9d1f99f7c 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
@@ -270,6 +270,7 @@ Heartbeat event received
include/rpl_reset.inc
include/stop_slave.inc
include/rpl_change_topology.inc [new topology=1->2->1]
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
include/start_slave.inc
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
INSERT INTO t1 VALUES(1, 'on master');
diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result
index a7687dd3e73..941dba2f5af 100644
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result
@@ -11,6 +11,7 @@ include/stop_slave.inc
change master to master_log_pos=MASTER_LOG_POS;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
include/stop_slave_sql.inc
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
index a2dc5d402a7..efe9bf076f0 100644
--- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
@@ -5,6 +5,7 @@ CREATE TABLE t1(c1 INT);
FLUSH LOGS;
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
include/wait_for_slave_io_error.inc [errno=1236]
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000002' at XXX, the last byte read was read from 'master-bin.000002' at XXX.''
CREATE TABLE t2(c1 INT);
FLUSH LOGS;
CREATE TABLE t3(c1 INT);
diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result
index 27f85cac7de..4b2a525de27 100644
--- a/mysql-test/suite/rpl/r/rpl_packet.result
+++ b/mysql-test/suite/rpl/r/rpl_packet.result
@@ -37,6 +37,7 @@ DROP TABLE t1;
CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
include/wait_for_slave_io_error.inc [errno=1236]
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from '.' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
STOP SLAVE;
RESET SLAVE;
RESET MASTER;
diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
new file mode 100644
index 00000000000..43a7712bdf1
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
@@ -0,0 +1,10 @@
+include/master-slave.inc
+[connection master]
+set @time_before_kill := (select CURRENT_TIMESTAMP);
+[Time before the query]
+[Connection ID of the slave I/O thread found]
+kill <connection_id>;
+set @time_after_kill := (select CURRENT_TIMESTAMP);
+[Time after the query]
+[Killing of the slave IO thread was successful]
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
index 57206873e2f..8bf903b0713 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
@@ -69,6 +69,16 @@ include/wait_for_slave_to_stop.inc
include/start_slave.inc
# Clean up
DROP TABLE t1;
+RESET MASTER;
+include/stop_slave.inc
+CHANGE MASTER TO master_log_pos=MASTER_POS;
+START SLAVE;
+include/wait_for_slave_param.inc [Last_IO_Errno]
+Last_IO_Errno = '1236'
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
diff --git a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
index 7d05ce251f2..4825090d6cd 100644
--- a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
+++ b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
@@ -14,11 +14,6 @@
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc
-#
-# Bug#13050593 swallows `\' from Last_IO_Error
-# todo: uncomment the filter once the bug is fixed.
-#
---source include/not_windows.inc
--connection slave
# Make sure the slave is stopped while we are messing with master.
@@ -56,6 +51,7 @@ start slave;
--let $slave_param_value=1236
--source include/wait_for_slave_param.inc
+--let $slave_field_result_replace= / at [0-9]*/ at XXX/
--let $status_items= Last_IO_Errno, Last_IO_Error
--source include/show_slave_status.inc
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
index b9a170c5bc1..78489449ab8 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
@@ -480,6 +480,12 @@ let $status_var_comparsion= >;
--connection master
#--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG
#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog';
+
+# BUG#12403008 RPL_HEARTBEAT_BASIC FAILS SPORADICALLY ON PUSHBUILD
+# MASTER_HEARTBEAT_PERIOD had the default value (slave_net_timeout/2)
+# so wait on "Heartbeat event received on master", that only waits for
+# 1 minute, sometimes timeout before heartbeat arrives.
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
--source include/start_slave.inc
# Insert data on master and on slave and make sure that it replicated for both directions
diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test
index 43f54bd3705..1270933ede1 100644
--- a/mysql-test/suite/rpl/t/rpl_log_pos.test
+++ b/mysql-test/suite/rpl/t/rpl_log_pos.test
@@ -30,12 +30,9 @@ let $wrong_log_pos= `SELECT $read_pos+2`;
eval change master to master_log_pos=$wrong_log_pos;
start slave;
let $slave_io_errno= 1236;
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
-let $show_slave_io_error= 0;
+--let $show_slave_io_error= 1
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
source include/wait_for_slave_io_error.inc;
source include/stop_slave_sql.inc;
--enable_warnings
diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
index 9b648de8486..981cecb66ad 100644
--- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
+++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
@@ -60,12 +60,9 @@ call mtr.add_suppression('Got fatal error 1236 from master when reading data fro
connection slave;
# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG
--let $slave_io_errno= 1236
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
---let $show_slave_io_error= 0
+--let $show_slave_io_error= 1
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
--source include/wait_for_slave_io_error.inc
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test
index 2b8a1fd8310..4f296fed68e 100644
--- a/mysql-test/suite/rpl/t/rpl_packet.test
+++ b/mysql-test/suite/rpl/t/rpl_packet.test
@@ -125,12 +125,9 @@ connection slave;
# The slave I/O thread must stop after receiving
# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master.
--let $slave_io_errno= 1236
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
---let $show_slave_io_error= 0
+
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
--source include/wait_for_slave_io_error.inc
# Remove the bad binlog and clear error status on slave.
diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
new file mode 100644
index 00000000000..69d39a066b1
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
@@ -0,0 +1,44 @@
+#
+#BUG#11752315 : STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS TRYING
+# TO RECONNECT TO
+#
+# ==== Purpose ====
+#
+#Tests that the slave does not go to a sleep for a long duration after the
+#master is killed and we do a START_SLAVE and STOP_SLAVE.
+#
+# ==== Method ====
+#
+#This is a new functionality of having an interruptable sleep of the slave.
+#We find the thread id for the slave thread. On finding the thread ID of the
+#slave thread we kill the slave thread. A successful kill in less than 60 sec
+#should serve the purpose of checking the functionality.
+#
+
+--source include/have_log_bin.inc
+--source include/master-slave.inc
+
+connection slave;
+--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
+
+set @time_before_kill := (select CURRENT_TIMESTAMP);
+
+--echo [Time before the query]
+--echo [Connection ID of the slave I/O thread found]
+
+--replace_regex /kill [0-9]*/kill <connection_id>/
+--eval kill $connection_id
+
+set @time_after_kill := (select CURRENT_TIMESTAMP);
+
+--echo [Time after the query]
+
+if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
+{
+--echo # assert : The difference between the timestamps 'time_after_kill' and 'time_before_kill' should be less than 60sec.
+--die
+}
+
+--echo [Killing of the slave IO thread was successful]
+# End of test
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
index ada080e9071..dfe2e49bb90 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
@@ -22,5 +22,5 @@ SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
--connection master
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
-
+--let $rpl_only_running_threads= 1
--source include/rpl_end.inc
diff --git a/mysql-test/suite/sys_vars/r/all_vars.result b/mysql-test/suite/sys_vars/r/all_vars.result
index 50720052513..1bd4e394f6a 100644
--- a/mysql-test/suite/sys_vars/r/all_vars.result
+++ b/mysql-test/suite/sys_vars/r/all_vars.result
@@ -3,7 +3,6 @@ create table t2 (variable_name text);
load data infile "MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t1;
insert into t2 select variable_name from information_schema.global_variables;
insert into t2 select variable_name from information_schema.session_variables;
-delete from t2 where variable_name='innodb_change_buffering_debug';
update t2 set variable_name= replace(variable_name, "PERFORMANCE_SCHEMA_", "PFS_");
select distinct variable_name as `there should be *no* long test name listed below:` from t2
where length(variable_name) > 50;
diff --git a/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result b/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
index c04e5dac199..ef8ec0cd9b8 100644
--- a/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
+++ b/mysql-test/suite/sys_vars/r/character_sets_dir_basic.result
@@ -1,20 +1,20 @@
select @@global.character_sets_dir;
@@global.character_sets_dir
-MYSQL_CHARSETSDIR/
+MYSQL_CHARSETSDIR
select @@session.character_sets_dir;
ERROR HY000: Variable 'character_sets_dir' is a GLOBAL variable
show global variables like 'character_sets_dir';
Variable_name Value
-character_sets_dir MYSQL_CHARSETSDIR/
+character_sets_dir MYSQL_CHARSETSDIR
show session variables like 'character_sets_dir';
Variable_name Value
-character_sets_dir MYSQL_CHARSETSDIR/
+character_sets_dir MYSQL_CHARSETSDIR
select * from information_schema.global_variables where variable_name='character_sets_dir';
VARIABLE_NAME VARIABLE_VALUE
-CHARACTER_SETS_DIR MYSQL_CHARSETSDIR/
+CHARACTER_SETS_DIR MYSQL_CHARSETSDIR
select * from information_schema.session_variables where variable_name='character_sets_dir';
VARIABLE_NAME VARIABLE_VALUE
-CHARACTER_SETS_DIR MYSQL_CHARSETSDIR/
+CHARACTER_SETS_DIR MYSQL_CHARSETSDIR
set global character_sets_dir="foo";
ERROR HY000: Variable 'character_sets_dir' is a read only variable
set session character_sets_dir="foo";
diff --git a/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
new file mode 100644
index 00000000000..2b74f891050
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_change_buffering_debug_basic.result
@@ -0,0 +1,64 @@
+SET @start_global_value = @@global.innodb_change_buffering_debug;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.innodb_change_buffering_debug in (0, 1);
+@@global.innodb_change_buffering_debug in (0, 1)
+1
+select @@global.innodb_change_buffering_debug;
+@@global.innodb_change_buffering_debug
+0
+select @@session.innodb_change_buffering_debug;
+ERROR HY000: Variable 'innodb_change_buffering_debug' is a GLOBAL variable
+show global variables like 'innodb_change_buffering_debug';
+Variable_name Value
+innodb_change_buffering_debug 0
+show session variables like 'innodb_change_buffering_debug';
+Variable_name Value
+innodb_change_buffering_debug 0
+select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_CHANGE_BUFFERING_DEBUG 0
+select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_CHANGE_BUFFERING_DEBUG 0
+set global innodb_change_buffering_debug=1;
+select @@global.innodb_change_buffering_debug;
+@@global.innodb_change_buffering_debug
+1
+select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_CHANGE_BUFFERING_DEBUG 1
+select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_CHANGE_BUFFERING_DEBUG 1
+set @@global.innodb_change_buffering_debug=0;
+select @@global.innodb_change_buffering_debug;
+@@global.innodb_change_buffering_debug
+0
+select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_CHANGE_BUFFERING_DEBUG 0
+select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_CHANGE_BUFFERING_DEBUG 0
+set session innodb_change_buffering_debug='some';
+ERROR HY000: Variable 'innodb_change_buffering_debug' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_change_buffering_debug='some';
+ERROR HY000: Variable 'innodb_change_buffering_debug' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_change_buffering_debug=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug'
+set global innodb_change_buffering_debug='foo';
+ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug'
+set global innodb_change_buffering_debug=-2;
+Warnings:
+Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '-2'
+set global innodb_change_buffering_debug=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_change_buffering_debug'
+set global innodb_change_buffering_debug=2;
+Warnings:
+Warning 1292 Truncated incorrect innodb_change_buffering_debug value: '2'
+SET @@global.innodb_change_buffering_debug = @start_global_value;
+SELECT @@global.innodb_change_buffering_debug;
+@@global.innodb_change_buffering_debug
+0
diff --git a/mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result b/mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result
new file mode 100644
index 00000000000..7e253c869e3
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/innodb_trx_rseg_n_slots_debug_basic.result
@@ -0,0 +1,65 @@
+SET @start_global_value = @@global.innodb_trx_rseg_n_slots_debug;
+SELECT @start_global_value;
+@start_global_value
+0
+select @@global.innodb_trx_rseg_n_slots_debug between 0 and 1024;
+@@global.innodb_trx_rseg_n_slots_debug between 0 and 1024
+1
+select @@global.innodb_trx_rseg_n_slots_debug;
+@@global.innodb_trx_rseg_n_slots_debug
+0
+select @@session.innodb_trx_rseg_n_slots_debug;
+ERROR HY000: Variable 'innodb_trx_rseg_n_slots_debug' is a GLOBAL variable
+show global variables like 'innodb_trx_rseg_n_slots_debug';
+Variable_name Value
+innodb_trx_rseg_n_slots_debug 0
+show session variables like 'innodb_trx_rseg_n_slots_debug';
+Variable_name Value
+innodb_trx_rseg_n_slots_debug 0
+select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TRX_RSEG_N_SLOTS_DEBUG 0
+select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TRX_RSEG_N_SLOTS_DEBUG 0
+set global innodb_trx_rseg_n_slots_debug=1;
+select @@global.innodb_trx_rseg_n_slots_debug;
+@@global.innodb_trx_rseg_n_slots_debug
+1
+select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TRX_RSEG_N_SLOTS_DEBUG 1
+select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TRX_RSEG_N_SLOTS_DEBUG 1
+set @@global.innodb_trx_rseg_n_slots_debug=0;
+select @@global.innodb_trx_rseg_n_slots_debug;
+@@global.innodb_trx_rseg_n_slots_debug
+0
+select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TRX_RSEG_N_SLOTS_DEBUG 0
+select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+VARIABLE_NAME VARIABLE_VALUE
+INNODB_TRX_RSEG_N_SLOTS_DEBUG 0
+set session innodb_trx_rseg_n_slots_debug='some';
+ERROR HY000: Variable 'innodb_trx_rseg_n_slots_debug' is a GLOBAL variable and should be set with SET GLOBAL
+set @@session.innodb_trx_rseg_n_slots_debug='some';
+ERROR HY000: Variable 'innodb_trx_rseg_n_slots_debug' is a GLOBAL variable and should be set with SET GLOBAL
+set global innodb_trx_rseg_n_slots_debug=1.1;
+ERROR 42000: Incorrect argument type to variable 'innodb_trx_rseg_n_slots_debug'
+set global innodb_trx_rseg_n_slots_debug='foo';
+ERROR 42000: Incorrect argument type to variable 'innodb_trx_rseg_n_slots_debug'
+set global innodb_trx_rseg_n_slots_debug=-2;
+Warnings:
+Warning 1292 Truncated incorrect innodb_trx_rseg_n_slots_debug value: '-2'
+set global innodb_trx_rseg_n_slots_debug=1e1;
+ERROR 42000: Incorrect argument type to variable 'innodb_trx_rseg_n_slots_debug'
+set global innodb_trx_rseg_n_slots_debug=1024;
+set global innodb_trx_rseg_n_slots_debug=1025;
+Warnings:
+Warning 1292 Truncated incorrect innodb_trx_rseg_n_slots_debug value: '1025'
+SET @@global.innodb_trx_rseg_n_slots_debug = @start_global_value;
+SELECT @@global.innodb_trx_rseg_n_slots_debug;
+@@global.innodb_trx_rseg_n_slots_debug
+0
diff --git a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
index a5f36de73fa..e2c03bcad6a 100644
--- a/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
+++ b/mysql-test/suite/sys_vars/r/plugin_dir_basic.result
@@ -1,20 +1,20 @@
select @@global.plugin_dir;
@@global.plugin_dir
-MYSQL_TMP_DIR
+MYSQL_TMP_DIR/
select @@session.plugin_dir;
ERROR HY000: Variable 'plugin_dir' is a GLOBAL variable
show global variables like 'plugin_dir';
Variable_name Value
-plugin_dir MYSQL_TMP_DIR
+plugin_dir MYSQL_TMP_DIR/
show session variables like 'plugin_dir';
Variable_name Value
-plugin_dir MYSQL_TMP_DIR
+plugin_dir MYSQL_TMP_DIR/
select * from information_schema.global_variables where variable_name='plugin_dir';
VARIABLE_NAME VARIABLE_VALUE
-PLUGIN_DIR MYSQL_TMP_DIR
+PLUGIN_DIR MYSQL_TMP_DIR/
select * from information_schema.session_variables where variable_name='plugin_dir';
VARIABLE_NAME VARIABLE_VALUE
-PLUGIN_DIR MYSQL_TMP_DIR
+PLUGIN_DIR MYSQL_TMP_DIR/
set global plugin_dir=1;
ERROR HY000: Variable 'plugin_dir' is a read only variable
set session plugin_dir=1;
diff --git a/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result b/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result
new file mode 100644
index 00000000000..f1638520f72
--- /dev/null
+++ b/mysql-test/suite/sys_vars/r/stored_program_cache_basic.result
@@ -0,0 +1,59 @@
+# Saving initial value of stored_program_cache in a temporary variable
+SET @start_value = @@global.stored_program_cache;
+SELECT @start_value;
+@start_value
+256
+# Display the DEFAULT value of stored_program_cache
+SET @@global.stored_program_cache = DEFAULT;
+SELECT @@global.stored_program_cache;
+@@global.stored_program_cache
+256
+# Verify default value of variable
+SELECT @@global.stored_program_cache = 256;
+@@global.stored_program_cache = 256
+1
+# Change the value of stored_program_cache to a valid value
+SET @@global.stored_program_cache = 512;
+SELECT @@global.stored_program_cache;
+@@global.stored_program_cache
+512
+# Change the value of stored_program_cache to invalid value
+SET @@global.stored_program_cache = -1;
+Warnings:
+Warning 1292 Truncated incorrect stored_program_cache value: '-1'
+SELECT @@global.stored_program_cache;
+@@global.stored_program_cache
+256
+SET @@global.stored_program_cache =100000000000;
+Warnings:
+Warning 1292 Truncated incorrect stored_program_cache value: '100000000000'
+SELECT @@global.stored_program_cache;
+@@global.stored_program_cache
+524288
+SET @@global.stored_program_cache = 0;
+Warnings:
+Warning 1292 Truncated incorrect stored_program_cache value: '0'
+SELECT @@global.stored_program_cache;
+@@global.stored_program_cache
+256
+SET @@global.stored_program_cache = 10000.01;
+ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
+SET @@global.stored_program_cache = ON;
+ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
+SET @@global.stored_program_cache= 'test';
+ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
+SET @@global.stored_program_cache = '';
+ERROR 42000: Incorrect argument type to variable 'stored_program_cache'
+# Test if accessing session stored_program_cache gives error
+SET @@session.stored_program_cache = 0;
+ERROR HY000: Variable 'stored_program_cache' is a GLOBAL variable and should be set with SET GLOBAL
+# Check if accessing variable without SCOPE points to same global variable
+SET @@global.stored_program_cache = 512;
+SELECT @@stored_program_cache = @@global.stored_program_cache;
+@@stored_program_cache = @@global.stored_program_cache
+1
+# Restore initial value
+SET @@global.stored_program_cache = @start_value;
+SELECT @@global.stored_program_cache;
+@@global.stored_program_cache
+256
diff --git a/mysql-test/suite/sys_vars/t/all_vars.test b/mysql-test/suite/sys_vars/t/all_vars.test
index 8f59af0f47d..7b9f69bd7d1 100644
--- a/mysql-test/suite/sys_vars/t/all_vars.test
+++ b/mysql-test/suite/sys_vars/t/all_vars.test
@@ -47,9 +47,6 @@ eval load data infile "$MYSQLTEST_VARDIR/tmp/sys_vars.all_vars.txt" into table t
insert into t2 select variable_name from information_schema.global_variables;
insert into t2 select variable_name from information_schema.session_variables;
-# This is only present in debug builds.
-delete from t2 where variable_name='innodb_change_buffering_debug';
-
# Performance schema variables are too long for files named
# 'mysql-test/suite/sys_vars/t/' ...
# ... 'performance_schema_events_waits_history_long_size_basic-master.opt'
diff --git a/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test b/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
index 0bbfd04133d..bf21db1c7dc 100644
--- a/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
+++ b/mysql-test/suite/sys_vars/t/character_sets_dir_basic.test
@@ -2,17 +2,26 @@
#
# show the global and session values;
#
---replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
+
+# workaround to adjust for the directory separators being different in
+# different OSes : slash on unixes and backslash or slash on windows.
+# TODO: fix with a proper comparison in mysqltest
+let $rcd= `SELECT REPLACE('$MYSQL_CHARSETSDIR', '\\\\\', '.')`;
+let $rcd= `SELECT REPLACE('$rcd', '/', '.')`;
+let $regex_charsetdir= `SELECT '/$rcd[\\\\\/\\\\\]/MYSQL_CHARSETSDIR/'`;
+
+--replace_regex $regex_charsetdir
select @@global.character_sets_dir;
+
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.character_sets_dir;
---replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
+--replace_regex $regex_charsetdir
show global variables like 'character_sets_dir';
---replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
+--replace_regex $regex_charsetdir
show session variables like 'character_sets_dir';
---replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
+--replace_regex $regex_charsetdir
select * from information_schema.global_variables where variable_name='character_sets_dir';
---replace_result $MYSQL_CHARSETSDIR MYSQL_CHARSETSDIR
+--replace_regex $regex_charsetdir
select * from information_schema.session_variables where variable_name='character_sets_dir';
#
diff --git a/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
new file mode 100644
index 00000000000..ec1065a538e
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_change_buffering_debug_basic.test
@@ -0,0 +1,52 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+SET @start_global_value = @@global.innodb_change_buffering_debug;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.innodb_change_buffering_debug in (0, 1);
+select @@global.innodb_change_buffering_debug;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_change_buffering_debug;
+show global variables like 'innodb_change_buffering_debug';
+show session variables like 'innodb_change_buffering_debug';
+select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
+select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+
+#
+# show that it's writable
+#
+set global innodb_change_buffering_debug=1;
+select @@global.innodb_change_buffering_debug;
+select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
+select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+set @@global.innodb_change_buffering_debug=0;
+select @@global.innodb_change_buffering_debug;
+select * from information_schema.global_variables where variable_name='innodb_change_buffering_debug';
+select * from information_schema.session_variables where variable_name='innodb_change_buffering_debug';
+--error ER_GLOBAL_VARIABLE
+set session innodb_change_buffering_debug='some';
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_change_buffering_debug='some';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_change_buffering_debug=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_change_buffering_debug='foo';
+set global innodb_change_buffering_debug=-2;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_change_buffering_debug=1e1;
+set global innodb_change_buffering_debug=2;
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_change_buffering_debug = @start_global_value;
+SELECT @@global.innodb_change_buffering_debug;
diff --git a/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test b/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
new file mode 100644
index 00000000000..11c6dd7820b
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/innodb_trx_rseg_n_slots_debug_basic.test
@@ -0,0 +1,58 @@
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+if (`select plugin_auth_version <= "1.1.8-24.1" from information_schema.plugins where plugin_name='innodb'`)
+{
+ --skip Not supported by XtraDB 1.1.8-24.1 or earlier
+}
+
+SET @start_global_value = @@global.innodb_trx_rseg_n_slots_debug;
+SELECT @start_global_value;
+
+#
+# exists as global only
+#
+select @@global.innodb_trx_rseg_n_slots_debug between 0 and 1024;
+select @@global.innodb_trx_rseg_n_slots_debug;
+--error ER_INCORRECT_GLOBAL_LOCAL_VAR
+select @@session.innodb_trx_rseg_n_slots_debug;
+show global variables like 'innodb_trx_rseg_n_slots_debug';
+show session variables like 'innodb_trx_rseg_n_slots_debug';
+select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+
+#
+# show that it's writable
+#
+set global innodb_trx_rseg_n_slots_debug=1;
+select @@global.innodb_trx_rseg_n_slots_debug;
+select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+set @@global.innodb_trx_rseg_n_slots_debug=0;
+select @@global.innodb_trx_rseg_n_slots_debug;
+select * from information_schema.global_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+select * from information_schema.session_variables where variable_name='innodb_trx_rseg_n_slots_debug';
+--error ER_GLOBAL_VARIABLE
+set session innodb_trx_rseg_n_slots_debug='some';
+--error ER_GLOBAL_VARIABLE
+set @@session.innodb_trx_rseg_n_slots_debug='some';
+
+#
+# incorrect types
+#
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_trx_rseg_n_slots_debug=1.1;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_trx_rseg_n_slots_debug='foo';
+set global innodb_trx_rseg_n_slots_debug=-2;
+--error ER_WRONG_TYPE_FOR_VAR
+set global innodb_trx_rseg_n_slots_debug=1e1;
+set global innodb_trx_rseg_n_slots_debug=1024;
+set global innodb_trx_rseg_n_slots_debug=1025;
+
+#
+# Cleanup
+#
+
+SET @@global.innodb_trx_rseg_n_slots_debug = @start_global_value;
+SELECT @@global.innodb_trx_rseg_n_slots_debug;
diff --git a/mysql-test/suite/sys_vars/t/stored_program_cache_basic.test b/mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
new file mode 100644
index 00000000000..9a9ba2ebf81
--- /dev/null
+++ b/mysql-test/suite/sys_vars/t/stored_program_cache_basic.test
@@ -0,0 +1,59 @@
+# Variable Name: stored_program_cache
+# Scope: GLOBAL
+# Access Type: Dynamic
+# Data Type: numeric
+# Default Value: 256
+# Range: 256-524288
+
+--source include/load_sysvars.inc
+
+--echo # Saving initial value of stored_program_cache in a temporary variable
+SET @start_value = @@global.stored_program_cache;
+SELECT @start_value;
+
+--echo # Display the DEFAULT value of stored_program_cache
+SET @@global.stored_program_cache = DEFAULT;
+SELECT @@global.stored_program_cache;
+
+--echo # Verify default value of variable
+SELECT @@global.stored_program_cache = 256;
+
+--echo # Change the value of stored_program_cache to a valid value
+SET @@global.stored_program_cache = 512;
+SELECT @@global.stored_program_cache;
+
+--echo # Change the value of stored_program_cache to invalid value
+SET @@global.stored_program_cache = -1;
+SELECT @@global.stored_program_cache;
+
+SET @@global.stored_program_cache =100000000000;
+SELECT @@global.stored_program_cache;
+
+SET @@global.stored_program_cache = 0;
+SELECT @@global.stored_program_cache;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.stored_program_cache = 10000.01;
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.stored_program_cache = ON;
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.stored_program_cache= 'test';
+
+--Error ER_WRONG_TYPE_FOR_VAR
+SET @@global.stored_program_cache = '';
+
+--echo # Test if accessing session stored_program_cache gives error
+
+--Error ER_GLOBAL_VARIABLE
+SET @@session.stored_program_cache = 0;
+
+--echo # Check if accessing variable without SCOPE points to same global variable
+
+SET @@global.stored_program_cache = 512;
+SELECT @@stored_program_cache = @@global.stored_program_cache;
+
+--echo # Restore initial value
+
+SET @@global.stored_program_cache = @start_value;
+SELECT @@global.stored_program_cache;