summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
authorunknown <lars/lthalmann@dl145h.mysql.com>2006-09-23 06:06:06 +0200
committerunknown <lars/lthalmann@dl145h.mysql.com>2006-09-23 06:06:06 +0200
commit7671fbc275d609920848be026ffe0103681b0cdc (patch)
treeaaa21159978d93e3e559ac3e9bb3dd740d6d4184 /mysql-test/t
parent00959e4da4d230e8ab51392a13ad36055f0ad77a (diff)
parent73d0afd3d05bc301a0a90f0eca0f7aac350c787a (diff)
downloadmariadb-git-7671fbc275d609920848be026ffe0103681b0cdc.tar.gz
Merge mysql.com:/users/lthalmann/bkroot/mysql-5.1-new-rpl
into mysql.com:/users/lthalmann/bk/MERGE/mysql-5.1-merge BitKeeper/etc/ignore: auto-union mysql-test/t/disabled.def: Auto merged sql/CMakeLists.txt: Auto merged sql/Makefile.am: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/mysqld.cc: Auto merged sql/sql_parse.cc: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/archive.test2
-rw-r--r--mysql-test/t/binlog_statement_insert_delayed.test9
-rw-r--r--mysql-test/t/binlog_stm_binlog.test2
-rw-r--r--mysql-test/t/binlog_stm_blackhole.test2
-rw-r--r--mysql-test/t/binlog_stm_ctype_cp932.test2
-rw-r--r--mysql-test/t/binlog_stm_ctype_ucs.test2
-rw-r--r--mysql-test/t/binlog_stm_drop_tmp_tbl.test2
-rw-r--r--mysql-test/t/binlog_stm_innodb_stat.test2
-rw-r--r--mysql-test/t/binlog_stm_insert_select.test2
-rw-r--r--mysql-test/t/binlog_stm_mix_innodb_myisam.test2
-rw-r--r--mysql-test/t/create_select_tmp.test2
-rw-r--r--mysql-test/t/ctype_cp932_binlog_stm.test2
-rw-r--r--mysql-test/t/date_formats.test6
-rw-r--r--mysql-test/t/mysqlbinlog.test2
-rw-r--r--mysql-test/t/mysqlbinlog2.test2
-rw-r--r--mysql-test/t/mysqldump.test398
-rw-r--r--mysql-test/t/ndb_multi.test2
-rw-r--r--mysql-test/t/rpl000013.test2
-rw-r--r--mysql-test/t/rpl_insert.test15
-rw-r--r--mysql-test/t/rpl_loaddata_s.test2
-rw-r--r--mysql-test/t/rpl_mixed_ddl_dml.test2
-rw-r--r--mysql-test/t/rpl_rbr_to_sbr.test4
-rw-r--r--mysql-test/t/rpl_rewrt_db.test2
-rw-r--r--mysql-test/t/rpl_rotate_logs.test2
-rw-r--r--mysql-test/t/rpl_row_basic_11bugs.test40
-rw-r--r--mysql-test/t/rpl_row_basic_8partition.test7
-rw-r--r--mysql-test/t/rpl_row_max_relay_size.test4
-rw-r--r--mysql-test/t/rpl_row_tabledefs_2myisam.test8
-rw-r--r--mysql-test/t/rpl_row_tabledefs_3innodb.test9
-rw-r--r--mysql-test/t/rpl_stm_EE_err2.test2
-rw-r--r--mysql-test/t/rpl_stm_flsh_tbls.test2
-rw-r--r--mysql-test/t/rpl_stm_log.test2
-rw-r--r--mysql-test/t/rpl_stm_max_relay_size.test2
-rw-r--r--mysql-test/t/rpl_stm_multi_query.test2
-rw-r--r--mysql-test/t/rpl_stm_mystery22.test2
-rw-r--r--mysql-test/t/rpl_stm_no_op.test2
-rw-r--r--mysql-test/t/rpl_stm_reset_slave.test2
-rw-r--r--mysql-test/t/rpl_stm_until.test2
-rw-r--r--mysql-test/t/rpl_switch_stm_row_mixed.test41
-rw-r--r--mysql-test/t/rpl_temp_table.test2
-rw-r--r--mysql-test/t/rpl_trigger.test2
-rw-r--r--mysql-test/t/rpl_trunc_temp.test2
-rw-r--r--mysql-test/t/rpl_truncate_2myisam.test2
-rw-r--r--mysql-test/t/rpl_truncate_3innodb.test1
-rw-r--r--mysql-test/t/rpl_view.test20
-rw-r--r--mysql-test/t/status.test7
-rw-r--r--mysql-test/t/user_var-binlog.test2
-rw-r--r--mysql-test/t/variables.test50
48 files changed, 457 insertions, 228 deletions
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 294e7730e07..0dccd8f111a 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -3,7 +3,7 @@
# Taken FROM the select test
#
-- source include/have_archive.inc
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
--disable_warnings
drop table if exists t1,t2,t3;
diff --git a/mysql-test/t/binlog_statement_insert_delayed.test b/mysql-test/t/binlog_statement_insert_delayed.test
new file mode 100644
index 00000000000..9b78296236f
--- /dev/null
+++ b/mysql-test/t/binlog_statement_insert_delayed.test
@@ -0,0 +1,9 @@
+# This test is to verify replication with INSERT DELAY through
+# unrecommended STATEMENT binlog format
+
+-- source include/not_embedded.inc
+-- source include/have_binlog_format_statement.inc
+-- disable_query_log
+reset master; # get rid of previous tests binlog
+-- enable_query_log
+-- source extra/binlog_tests/binlog_insert_delayed.test
diff --git a/mysql-test/t/binlog_stm_binlog.test b/mysql-test/t/binlog_stm_binlog.test
index f22e7e45aea..280b7a3aef9 100644
--- a/mysql-test/t/binlog_stm_binlog.test
+++ b/mysql-test/t/binlog_stm_binlog.test
@@ -13,6 +13,6 @@ drop table t1;
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed.inc
-- source extra/binlog_tests/binlog.test
diff --git a/mysql-test/t/binlog_stm_blackhole.test b/mysql-test/t/binlog_stm_blackhole.test
index 6047d8ca2fc..02ba2be095b 100644
--- a/mysql-test/t/binlog_stm_blackhole.test
+++ b/mysql-test/t/binlog_stm_blackhole.test
@@ -2,5 +2,5 @@
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/blackhole.test
diff --git a/mysql-test/t/binlog_stm_ctype_cp932.test b/mysql-test/t/binlog_stm_ctype_cp932.test
index 436f95a2453..c0791d81445 100644
--- a/mysql-test/t/binlog_stm_ctype_cp932.test
+++ b/mysql-test/t/binlog_stm_ctype_cp932.test
@@ -2,5 +2,5 @@
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/not_embedded.inc
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/ctype_cp932.test
diff --git a/mysql-test/t/binlog_stm_ctype_ucs.test b/mysql-test/t/binlog_stm_ctype_ucs.test
index a32ac3155c7..c8cd7e06398 100644
--- a/mysql-test/t/binlog_stm_ctype_ucs.test
+++ b/mysql-test/t/binlog_stm_ctype_ucs.test
@@ -1,6 +1,6 @@
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/ctype_ucs_binlog.test
diff --git a/mysql-test/t/binlog_stm_drop_tmp_tbl.test b/mysql-test/t/binlog_stm_drop_tmp_tbl.test
index e8acd00c779..6017f272d01 100644
--- a/mysql-test/t/binlog_stm_drop_tmp_tbl.test
+++ b/mysql-test/t/binlog_stm_drop_tmp_tbl.test
@@ -1,5 +1,5 @@
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/drop_temp_table.test
diff --git a/mysql-test/t/binlog_stm_innodb_stat.test b/mysql-test/t/binlog_stm_innodb_stat.test
index c6017246e6d..a08039c4a41 100644
--- a/mysql-test/t/binlog_stm_innodb_stat.test
+++ b/mysql-test/t/binlog_stm_innodb_stat.test
@@ -1,5 +1,5 @@
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/innodb_stat.test
diff --git a/mysql-test/t/binlog_stm_insert_select.test b/mysql-test/t/binlog_stm_insert_select.test
index 06792990a55..3aefa1e6cf7 100644
--- a/mysql-test/t/binlog_stm_insert_select.test
+++ b/mysql-test/t/binlog_stm_insert_select.test
@@ -1,5 +1,5 @@
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/insert_select-binlog.test
diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/t/binlog_stm_mix_innodb_myisam.test
index 829cf50fe1e..cb6516a3a2f 100644
--- a/mysql-test/t/binlog_stm_mix_innodb_myisam.test
+++ b/mysql-test/t/binlog_stm_mix_innodb_myisam.test
@@ -1,7 +1,7 @@
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 9/19/2005 [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/mix_innodb_myisam_binlog.test
# This piece below cannot be put into
diff --git a/mysql-test/t/create_select_tmp.test b/mysql-test/t/create_select_tmp.test
index 144bccc5871..ba9898b7752 100644
--- a/mysql-test/t/create_select_tmp.test
+++ b/mysql-test/t/create_select_tmp.test
@@ -6,7 +6,7 @@
# inconsistency between binlog and the internal list of temp tables.
# This does not work for RBR yet.
---source include/have_binlog_format_statement.inc
+--source include/have_binlog_format_mixed_or_statement.inc
-- source include/have_innodb.inc
--disable_warnings
diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test
index 7a0ac671417..6b591fbe5f5 100644
--- a/mysql-test/t/ctype_cp932_binlog_stm.test
+++ b/mysql-test/t/ctype_cp932_binlog_stm.test
@@ -1,7 +1,7 @@
# This is a wrapper for binlog.test so that the same test case can be used
# For both statement and row based bin logs 11/07/2005 [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/binlog_tests/ctype_cp932_binlog.test
#
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index 6898cd5802d..c19ebeb2e28 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -6,9 +6,9 @@
drop table if exists t1;
--enable_warnings
---replace_result ROW <format> STATEMENT <format>
+--replace_result ROW <format> STATEMENT <format> MIXED <format>
SHOW GLOBAL VARIABLES LIKE "%_format%";
---replace_result ROW <format> STATEMENT <format>
+--replace_result ROW <format> STATEMENT <format> MIXED <format>
SHOW SESSION VARIABLES LIKE "%_format%";
#
@@ -36,7 +36,7 @@ set datetime_format= '%H:%i:%s.%f %m-%d-%Y';
set datetime_format= '%h:%i:%s %p %Y-%m-%d';
set datetime_format= '%h:%i:%s.%f %p %Y-%m-%d';
---replace_result ROW <format> STATEMENT <format>
+--replace_result ROW <format> STATEMENT <format> MIXED <format>
SHOW SESSION VARIABLES LIKE "%format";
--error 1231
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 178816cbf43..8e2035f45b0 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -1,6 +1,6 @@
# We are using .opt file since we need small binlog size
# TODO: Need to look at making a row based version once the new row based client is completed. [jbm]
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test
index 91da502da02..69cd5d90453 100644
--- a/mysql-test/t/mysqlbinlog2.test
+++ b/mysql-test/t/mysqlbinlog2.test
@@ -2,7 +2,7 @@
# and a few others.
# TODO: Need to look at making row based version once new binlog client is complete.
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 1334d5e57c8..327b071afeb 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -16,9 +16,9 @@ INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-create --skip-comments -X test t1
DROP TABLE t1;
-#
-# Bug #2005
-#
+--echo #
+--echo # Bug #2005
+--echo #
CREATE TABLE t1 (a decimal(64, 20));
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
@@ -26,9 +26,9 @@ INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
--exec $MYSQL_DUMP --compact test t1
DROP TABLE t1;
-#
-# Bug #2055
-#
+--echo #
+--echo # Bug #2055
+--echo #
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES ('-9e999999');
@@ -38,9 +38,9 @@ INSERT INTO t1 VALUES ('-9e999999');
--exec $MYSQL_DUMP --compact test t1
DROP TABLE t1;
-#
-# Bug #3361 mysqldump quotes DECIMAL values inconsistently
-#
+--echo #
+--echo # Bug #3361 mysqldump quotes DECIMAL values inconsistently
+--echo #
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
@@ -69,28 +69,28 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES");
--exec $MYSQL_DUMP --skip-create --compact -X test t1
DROP TABLE t1;
-#
-# Bug #1707
-#
+--echo #
+--echo # Bug #1707
+--echo #
CREATE TABLE t1 (`a"b"` char(2));
INSERT INTO t1 VALUES ("1\""), ("\"2");
--exec $MYSQL_DUMP --compact --skip-create -X test t1
DROP TABLE t1;
-#
-# Bug #1994
-# Bug #4261
-#
+--echo #
+--echo # Bug #1994
+--echo # Bug #4261
+--echo #
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
--exec $MYSQL_DUMP --skip-comments --skip-extended-insert test t1
DROP TABLE t1;
-#
-# Bug #2634
-#
+--echo #
+--echo # Bug #2634
+--echo #
CREATE TABLE t1 (a int) ENGINE=MYISAM;
INSERT INTO t1 VALUES (1), (2);
@@ -98,17 +98,17 @@ INSERT INTO t1 VALUES (1), (2);
--exec $MYSQL_DUMP --skip-comments --compatible=mysql323 test t1
DROP TABLE t1;
-#
-# Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
-#
+--echo #
+--echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly'
+--echo #
create table ```a` (i int);
--exec $MYSQL_DUMP --compact test
drop table ```a`;
-#
-# Bug #2591 "mysqldump quotes names inconsistently"
-#
+--echo #
+--echo # Bug #2591 "mysqldump quotes names inconsistently"
+--echo #
create table t1(a int);
--exec $MYSQL_DUMP --comments=0 test
@@ -119,9 +119,9 @@ set global sql_mode='ANSI_QUOTES';
set global sql_mode='';
drop table t1;
-#
-# Bug #2705 'mysqldump --tab extra output'
-#
+--echo #
+--echo # Bug #2705 'mysqldump --tab extra output'
+--echo #
create table t1(a int);
insert into t1 values (1),(2),(3);
@@ -135,9 +135,9 @@ insert into t1 values (1),(2),(3);
--exec rm $MYSQLTEST_VARDIR/tmp/t1.txt
drop table t1;
-#
-# Bug #6101: create database problem
-#
+--echo #
+--echo # Bug #6101: create database problem
+--echo #
--exec $MYSQL_DUMP --skip-comments --databases test
@@ -145,32 +145,34 @@ create database mysqldump_test_db character set latin2 collate latin2_bin;
--exec $MYSQL_DUMP --skip-comments --databases mysqldump_test_db
drop database mysqldump_test_db;
-#
-# Bug #7020
-# Check that we don't dump in UTF8 in compatible mode by default,
-# but use the default compiled values, or the values given in
-# --default-character-set=xxx. However, we should dump in UTF8
-# if it is explicitely set.
+--echo #
+--echo # Bug #7020
+--echo # Check that we don't dump in UTF8 in compatible mode by default,
+--echo # but use the default compiled values, or the values given in
+--echo # --default-character-set=xxx. However, we should dump in UTF8
+--echo # if it is explicitely set.
CREATE TABLE t1 (a CHAR(10));
INSERT INTO t1 VALUES (_latin1 'ÄÖÜß');
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1
-#
-# Bug#8063: make test mysqldump [ fail ]
-# We cannot tes this command because its output depends
-# on --default-character-set incompiled into "mysqldump" program.
-# If the future we can move this command into a separate test with
-# checking that "mysqldump" is compiled with "latin1"
-#
+
+--echo #
+--echo # Bug#8063: make test mysqldump [ fail ]
+--echo # We cannot tes this command because its output depends
+--echo # on --default-character-set incompiled into "mysqldump" program.
+--echo # If the future we can move this command into a separate test with
+--echo # checking that "mysqldump" is compiled with "latin1"
+--echo #
+
#--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 test t1
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --compatible=mysql323 --default-character-set=cp850 test t1
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=cp850 --compatible=mysql323 test t1
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments --default-character-set=utf8 --compatible=mysql323 test t1
DROP TABLE t1;
-#
-# WL #2319: Exclude Tables from dump
-#
+--echo #
+--echo # WL #2319: Exclude Tables from dump
+--echo #
CREATE TABLE t1 (a int);
CREATE TABLE t2 (a int);
@@ -180,18 +182,18 @@ INSERT INTO t2 VALUES (4),(5),(6);
DROP TABLE t1;
DROP TABLE t2;
-#
-# Bug #8830
-#
+--echo #
+--echo # Bug #8830
+--echo #
CREATE TABLE t1 (`b` blob);
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
--exec $MYSQL_DUMP --skip-extended-insert --hex-blob test --skip-comments t1
DROP TABLE t1;
-#
-# Test for --insert-ignore
-#
+--echo #
+--echo # Test for --insert-ignore
+--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
@@ -200,10 +202,10 @@ INSERT INTO t1 VALUES (4),(5),(6);
--exec $MYSQL_DUMP --skip-comments --insert-ignore --delayed-insert test t1
DROP TABLE t1;
-#
-# Bug #10286: mysqldump -c crashes on table that has many fields with long
-# names
-#
+--echo #
+--echo # Bug #10286: mysqldump -c crashes on table that has many fields with long
+--echo # names
+--echo #
create table t1 (
F_c4ca4238a0b923820dcc509a6f75849b int,
F_c81e728d9d4c2f636f067f89cc14862c int,
@@ -539,18 +541,18 @@ insert into t1 (F_8d3bba7425e7c98c50f52ca1b52d3735) values (1);
--exec $MYSQL_DUMP --skip-comments -c test
drop table t1;
-#
-# Test for --add-drop-database
-#
+--echo #
+--echo # Test for --add-drop-database
+--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1),(2),(3);
--exec $MYSQL_DUMP --add-drop-database --skip-comments --databases test
DROP TABLE t1;
-#
-# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
-#
+--echo #
+--echo # Bug #9558 mysqldump --no-data db t1 t2 format still dumps data
+--echo #
CREATE DATABASE mysqldump_test_db;
USE mysqldump_test_db;
@@ -565,11 +567,11 @@ INSERT INTO t2 VALUES (1), (2);
DROP TABLE t1, t2;
DROP DATABASE mysqldump_test_db;
-#
-# Testing with tables and databases that don't exists
-# or contains illegal characters
-# (Bug #9358 mysqldump crashes if tablename starts with \)
-#
+--echo #
+--echo # Testing with tables and databases that don't exists
+--echo # or contains illegal characters
+--echo # (Bug #9358 mysqldump crashes if tablename starts with \)
+--echo #
create database mysqldump_test_db;
use mysqldump_test_db;
create table t1(a varchar(30) primary key, b int not null);
@@ -629,9 +631,9 @@ drop database mysqldump_test_db;
use test;
-#
-# Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
-#
+--echo #
+--echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
+--echo #
create table t1 (a int(10));
create table t2 (pk int primary key auto_increment,
@@ -641,9 +643,10 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir
--exec $MYSQL_DUMP --skip-comments --xml --no-create-info test
drop table t1, t2;
-#
-# BUG #12123
-#
+--echo #
+--echo # BUG #12123
+--echo #
+
create table t1 (a text character set utf8, b text character set latin1);
insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E);
select * from t1;
@@ -654,15 +657,16 @@ select * from t1;
drop table t1;
-#
-# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
-#
+--echo #
+--echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence
+--echo #
--exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump
-#
-# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
-#
+--echo #
+--echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]"
+--echo #
+
create table `t1` (
t1_name varchar(255) default null,
t1_id int(10) unsigned not null auto_increment,
@@ -689,9 +693,9 @@ show create table `t1`;
drop table `t1`;
-#
-# Bug #18536: wrong table order
-#
+--echo #
+--echo # Bug #18536: wrong table order
+--echo #
create table t1(a int);
create table t2(a int);
@@ -700,9 +704,10 @@ create table t3(a int);
--exec $MYSQL_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2
drop table t1, t2, t3;
-#
-# Bug #21288: mysqldump segmentation fault when using --where
-#
+--echo #
+--echo # Bug #21288: mysqldump segmentation fault when using --where
+--echo #
+
create table t1 (a int);
--error 2
--exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1
@@ -710,9 +715,9 @@ drop table t1;
--echo End of 4.1 tests
-#
-# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
-#
+--echo #
+--echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
+--echo #
create database db1;
use db1;
@@ -734,9 +739,9 @@ drop view v2;
drop database db1;
use test;
-#
-# Bug 10713 mysqldump includes database in create view and referenced tables
-#
+--echo #
+--echo # Bug 10713 mysqldump includes database in create view and referenced tables
+--echo #
# create table and views in db2
create database db2;
@@ -770,18 +775,19 @@ drop table t1, t2;
drop database db1;
use test;
-#
-# dump of view
-#
+--echo #
+--echo # dump of view
+--echo #
+
create table t1(a int);
create view v1 as select * from t1;
--exec $MYSQL_DUMP --skip-comments test
drop view v1;
drop table t1;
-#
-# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
-#
+--echo #
+--echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
+--echo #
create database mysqldump_test_db;
use mysqldump_test_db;
@@ -803,18 +809,18 @@ drop view v2;
drop database mysqldump_test_db;
use test;
-#
-# Bug #9756
-#
+--echo #
+--echo # Bug #9756
+--echo #
CREATE TABLE t1 (a char(10));
INSERT INTO t1 VALUES ('\'');
--exec $MYSQL_DUMP --skip-comments test t1
DROP TABLE t1;
-#
-# Bug #10927 mysqldump: Can't reload dump with view that consist of other view
-#
+--echo #
+--echo # Bug #10927 mysqldump: Can't reload dump with view that consist of other view
+--echo #
create table t1(a int, b int, c varchar(30));
@@ -834,9 +840,9 @@ select v3.a from v3, v1 where v1.a=v3.a and v3.b=3 limit 1;
drop view v1, v2, v3;
drop table t1;
-#
-# Test for dumping triggers
-#
+--echo #
+--echo # Test for dumping triggers
+--echo #
CREATE TABLE t1 (a int, b bigint default NULL);
CREATE TABLE t2 (a int);
@@ -884,9 +890,9 @@ show tables;
show triggers;
DROP TABLE t1, t2;
-#
-# Bugs #9136, #12917: problems with --defaults-extra-file option
-#
+--echo #
+--echo # Bugs #9136, #12917: problems with --defaults-extra-file option
+--echo #
--system echo '[mysqltest1]' > $MYSQLTEST_VARDIR/tmp/tmp.cnf
--system echo 'port=1234' >> $MYSQLTEST_VARDIR/tmp/tmp.cnf
@@ -894,9 +900,9 @@ DROP TABLE t1, t2;
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
--system rm $MYSQLTEST_VARDIR/tmp/tmp.cnf
-#
-# Test of fix to BUG 12597
-#
+--echo #
+--echo # Test of fix to BUG 12597
+--echo #
DROP TABLE IF EXISTS `test1`;
CREATE TABLE `test1` (
@@ -932,9 +938,9 @@ DROP TRIGGER testref;
DROP TABLE test1;
DROP TABLE test2;
-#
-# BUG#9056 - mysqldump does not dump routines
-#
+--echo #
+--echo # BUG#9056 - mysqldump does not dump routines
+--echo #
--disable_warnings
DROP TABLE IF EXISTS t1;
@@ -981,9 +987,10 @@ DROP PROCEDURE bug9056_proc2;
DROP PROCEDURE `a'b`;
drop table t1;
-#
-# BUG# 13052 - mysqldump timestamp reloads broken
-#
+--echo #
+--echo # BUG# 13052 - mysqldump timestamp reloads broken
+--echo #
+
--disable_warnings
drop table if exists t1;
--enable_warnings
@@ -1003,9 +1010,10 @@ drop table t1;
set global time_zone=default;
set time_zone=default;
-#
-# Test of fix to BUG 13146 - ansi quotes break loading of triggers
-#
+--echo #
+--echo # Test of fix to BUG 13146 - ansi quotes break loading of triggers
+--echo #
+
--disable_warnings
DROP TABLE IF EXISTS `t1 test`;
DROP TABLE IF EXISTS `t2 test`;
@@ -1036,9 +1044,9 @@ DROP TRIGGER `test trig`;
DROP TABLE `t1 test`;
DROP TABLE `t2 test`;
-#
-# BUG# 12838 mysqldump -x with views exits with error
-#
+--echo #
+--echo # BUG# 12838 mysqldump -x with views exits with error
+--echo #
--disable_warnings
drop table if exists t1;
@@ -1059,10 +1067,10 @@ drop view v0;
drop view v1;
drop table t1;
-#
-# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
-# for tables with trigger created in the IGNORE_SPACE sql mode.
-#
+--echo #
+--echo # BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN"
+--echo # for tables with trigger created in the IGNORE_SPACE sql mode.
+--echo #
SET @old_sql_mode = @@SQL_MODE;
SET SQL_MODE = IGNORE_SPACE;
@@ -1083,18 +1091,19 @@ SET SQL_MODE = @old_sql_mode;
DROP TRIGGER tr1;
DROP TABLE t1;
-#
-# Bug #13318: Bad result with empty field and --hex-blob
-#
+--echo #
+--echo # Bug #13318: Bad result with empty field and --hex-blob
+--echo #
+
create table t1 (a binary(1), b blob);
insert into t1 values ('','');
--exec $MYSQL_DUMP --skip-comments --skip-extended-insert --hex-blob test t1
--exec $MYSQL_DUMP --skip-comments --hex-blob test t1
drop table t1;
-#
-# Bug 14871 Invalid view dump output
-#
+--echo #
+--echo # Bug 14871 Invalid view dump output
+--echo #
create table t1 (a int);
insert into t1 values (289), (298), (234), (456), (789);
@@ -1121,9 +1130,9 @@ select * from v3 order by a;
drop table t1;
drop view v1, v2, v3, v4, v5;
-#
-# Bug #16878 dump of trigger
-#
+--echo #
+--echo # Bug #16878 dump of trigger
+--echo #
create table t1 (a int, created datetime);
create table t2 (b int, created datetime);
@@ -1151,11 +1160,10 @@ drop trigger tr1;
drop trigger tr2;
drop table t1, t2;
+--echo #
+--echo # Bug#18462 mysqldump does not dump view structures correctly
+--echo #
-#
-# Bug#18462 mysqldump does not dump view structures correctly
-#
-#
create table t (qty int, price int);
insert into t values(3, 50);
insert into t values(5, 51);
@@ -1172,11 +1180,11 @@ drop view v2;
drop table t;
-#
-# Bug#14857 Reading dump files with single statement stored routines fails.
-# fixed by patch for bug#16878
-#
-#
+--echo #
+--echo # Bug#14857 Reading dump files with single statement stored routines fails.
+--echo # fixed by patch for bug#16878
+--echo #
+
DELIMITER |;
/*!50003 CREATE FUNCTION `f`() RETURNS bigint(20)
return 42 */|
@@ -1188,10 +1196,10 @@ show create procedure p;
drop function f;
drop procedure p;
-#
-# Bug #17371 Unable to dump a schema with invalid views
-#
-#
+--echo #
+--echo # Bug #17371 Unable to dump a schema with invalid views
+--echo #
+
create table t1 ( id serial );
create view v1 as select * from t1;
drop table t1;
@@ -1202,9 +1210,9 @@ drop table t1;
--echo } mysqldump
drop view v1;
-# BUG#17201 Spurious 'DROP DATABASE' in output,
-# also confusion between tables and views.
-# Example code from Markus Popp
+--echo # BUG#17201 Spurious 'DROP DATABASE' in output,
+--echo # also confusion between tables and views.
+--echo # Example code from Markus Popp
create database mysqldump_test_db;
use mysqldump_test_db;
@@ -1219,9 +1227,10 @@ drop view v1;
drop table t1;
drop database mysqldump_test_db;
-#
-# Bug21014 Segmentation fault of mysqldump on view
-#
+--echo #
+--echo # Bug21014 Segmentation fault of mysqldump on view
+--echo #
+
create database mysqldump_tables;
use mysqldump_tables;
create table basetable ( id serial, tag varchar(64) );
@@ -1237,9 +1246,10 @@ drop database mysqldump_views;
drop table mysqldump_tables.basetable;
drop database mysqldump_tables;
-#
-# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
-#
+--echo #
+--echo # Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps
+--echo #
+
create database mysqldump_dba;
use mysqldump_dba;
create table t1 (f1 int, f2 int);
@@ -1277,9 +1287,9 @@ drop table t1;
drop database mysqldump_dbb;
use test;
-#
-# Bug#21215 mysqldump creating incomplete backups without warning
-#
+--echo #
+--echo # Bug#21215 mysqldump creating incomplete backups without warning
+--echo #
# Create user without sufficient privs to perform the requested operation
create user mysqltest_1@localhost;
@@ -1321,12 +1331,12 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
drop table t1;
drop user mysqltest_1@localhost;
-#
-# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
-# information_schema database.
-#
-# Bug #21424 mysqldump failing to export/import views
-#
+--echo #
+--echo # Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
+--echo # information_schema database.
+--echo #
+--echo # Bug #21424 mysqldump failing to export/import views
+--echo #
# Do as root
connect (root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
@@ -1360,8 +1370,10 @@ drop user myDB_User;
drop database mysqldump_myDB;
flush privileges;
-# Bug #21424 continues from here.
-# Restore. Flush Privileges test ends.
+--echo # Bug #21424 continues from here.
+--echo # Restore. Flush Privileges test ends.
+--echo #
+
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21527.sql;
# Do as a user
@@ -1383,7 +1395,28 @@ drop user myDB_User;
drop database mysqldump_myDB;
use test;
---echo End of 5.0 tests
+--echo #
+--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+ `a b` INT,
+ `c"d` INT,
+ `e``f` INT,
+ PRIMARY KEY (`a b`, `c"d`, `e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+insert into t1 values (0815, 4711, 2006);
+
+--exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
+--exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
+DROP TABLE `t1`;
+--enable_warnings
+
+--echo #
+--echo # End of 5.0 tests
+--echo #
# Check new --replace option
@@ -1438,9 +1471,10 @@ drop table t2;
drop table words2;
-#
-# BUG# 16853: mysqldump doesn't show events
-#
+--echo #
+--echo # BUG# 16853: mysqldump doesn't show events
+--echo #
+
create database first;
use first;
set time_zone = 'UTC';
@@ -1476,11 +1510,11 @@ drop database third;
set time_zone = 'SYSTEM';
use test;
-#####
-#
-# BUG#17201 Spurious 'DROP DATABASE' in output,
-# also confusion between tables and views.
-# Example code from Markus Popp
+--echo #
+--echo # BUG#17201 Spurious 'DROP DATABASE' in output,
+--echo # also confusion between tables and views.
+--echo # Example code from Markus Popp
+--echo #
create database mysqldump_test_db;
use mysqldump_test_db;
@@ -1495,4 +1529,6 @@ drop view v1;
drop table t1;
drop database mysqldump_test_db;
---echo End of 5.1 tests
+--echo #
+--echo # End of 5.1 tests
+--echo #
diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test
index 36018e6c679..df2cc9c1d8b 100644
--- a/mysql-test/t/ndb_multi.test
+++ b/mysql-test/t/ndb_multi.test
@@ -1,7 +1,7 @@
-- source include/have_ndb.inc
-- source include/have_multi_ndb.inc
-- source include/not_embedded.inc
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
--disable_warnings
connection server2;
diff --git a/mysql-test/t/rpl000013.test b/mysql-test/t/rpl000013.test
index c681e76cf51..69a102e84ce 100644
--- a/mysql-test/t/rpl000013.test
+++ b/mysql-test/t/rpl000013.test
@@ -7,7 +7,7 @@
# in row-based, it hangs waiting for an offset which is never
# reached (the "sync_with_master 1"), logically.
---source include/have_binlog_format_statement.inc
+--source include/have_binlog_format_mixed_or_statement.inc
source include/master-slave.inc;
save_master_pos;
connection slave;
diff --git a/mysql-test/t/rpl_insert.test b/mysql-test/t/rpl_insert.test
index 9beaff6bab6..0d471a0e0a9 100644
--- a/mysql-test/t/rpl_insert.test
+++ b/mysql-test/t/rpl_insert.test
@@ -1,7 +1,6 @@
-
-#
-# Bug#20821: INSERT DELAYED fails to write some rows to binlog
-#
+--echo #
+--echo # Bug#20821: INSERT DELAYED fails to write some rows to binlog
+--echo #
--source include/master-slave.inc
--source include/not_embedded.inc
@@ -35,7 +34,11 @@ SELECT COUNT(*) FROM mysqlslap.t1;
sync_slave_with_master;
SELECT COUNT(*) FROM mysqlslap.t1;
+--echo #
+--echo # Cleanup
+--echo #
+
connection master;
-DROP SCHEMA IF EXISTS mysqlslap;
+USE test;
+DROP SCHEMA mysqlslap;
sync_slave_with_master;
-
diff --git a/mysql-test/t/rpl_loaddata_s.test b/mysql-test/t/rpl_loaddata_s.test
index 72a5d1a8ec1..2c94c8ef953 100644
--- a/mysql-test/t/rpl_loaddata_s.test
+++ b/mysql-test/t/rpl_loaddata_s.test
@@ -2,7 +2,7 @@
# replicated LOAD DATA INFILE correctly when it has binlog_*_db rules.
# This is for BUG#1100 (LOAD DATA INFILE was half-logged).
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/master-slave.inc
connection slave;
diff --git a/mysql-test/t/rpl_mixed_ddl_dml.test b/mysql-test/t/rpl_mixed_ddl_dml.test
index 5b9ed6898b8..6a1f81abed3 100644
--- a/mysql-test/t/rpl_mixed_ddl_dml.test
+++ b/mysql-test/t/rpl_mixed_ddl_dml.test
@@ -1,7 +1,7 @@
# Mixed DDL-DML (CREATE ... SELECT ...) statements can only be
# replicated properly in statement-based replication.
# Currently statement based due to bug 12345
---source include/have_binlog_format_statement.inc
+--source include/have_binlog_format_mixed_or_statement.inc
source include/master-slave.inc;
diff --git a/mysql-test/t/rpl_rbr_to_sbr.test b/mysql-test/t/rpl_rbr_to_sbr.test
index c10199f8ff5..0c5368197b3 100644
--- a/mysql-test/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/t/rpl_rbr_to_sbr.test
@@ -1,12 +1,12 @@
-- source include/have_row_based.inc
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/not_ndb_default.inc
-- source include/master-slave.inc
# Test that the slave temporarily switches to ROW when seeing binrow
# events when it is in STATEMENT or MIXED mode
SET BINLOG_FORMAT=MIXED;
-SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
SET GLOBAL BINLOG_FORMAT=MIXED;
SELECT @@GLOBAL.BINLOG_FORMAT, @@SESSION.BINLOG_FORMAT;
diff --git a/mysql-test/t/rpl_rewrt_db.test b/mysql-test/t/rpl_rewrt_db.test
index 8acc05f6ff5..52f04e073dd 100644
--- a/mysql-test/t/rpl_rewrt_db.test
+++ b/mysql-test/t/rpl_rewrt_db.test
@@ -1,5 +1,5 @@
# TBF - difference in row level logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/master-slave.inc
--disable_warnings
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index a5c8a87c74d..2249dff1449 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -13,7 +13,7 @@
# - Test creating a duplicate key error and recover from it
# Requires statement logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
--disable_warnings
diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test
index af7e9af4005..e636824284d 100644
--- a/mysql-test/t/rpl_row_basic_11bugs.test
+++ b/mysql-test/t/rpl_row_basic_11bugs.test
@@ -54,3 +54,43 @@ UPDATE t1 SET a=99 WHERE a = 0;
--replace_result $SERVER_VERSION SERVER_VERSION
--replace_regex /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS;
+
+DROP TABLE t1;
+
+# BUG#17620: Replicate (Row Based) Fails when Query Cache enabled on
+# slave
+--echo ================ Test for BUG#17620 ================
+--disable_query_log
+--source include/master-slave-reset.inc
+--enable_query_log
+
+--echo **** On Slave ****
+connection slave;
+SET GLOBAL QUERY_CACHE_SIZE=0;
+
+--echo **** On Master ****
+connection master;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+
+--echo **** On Slave ****
+sync_slave_with_master;
+SET GLOBAL QUERY_CACHE_SIZE=16*1024*1024;
+
+--echo **** On Master ****
+connection master;
+INSERT INTO t1 VALUES (4),(5),(6);
+
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM t1;
+
+--echo **** On Master ****
+connection master;
+INSERT INTO t1 VALUES (7),(8),(9);
+
+--echo **** On Slave ****
+sync_slave_with_master;
+SELECT * FROM t1;
+
+DROP TABLE t1;
diff --git a/mysql-test/t/rpl_row_basic_8partition.test b/mysql-test/t/rpl_row_basic_8partition.test
index 640a420c10e..f262ef05c58 100644
--- a/mysql-test/t/rpl_row_basic_8partition.test
+++ b/mysql-test/t/rpl_row_basic_8partition.test
@@ -8,12 +8,17 @@
############################################################
--source include/have_row_based.inc
+--source include/have_binlog_format_row.inc
--source include/have_partition.inc
+--source include/not_ndb_default.inc
--source include/master-slave.inc
connection master;
--disable_warnings
DROP TABLE IF EXISTS t1;
-SET BINLOG_FORMAT=ROW;
+
+let $maybe_ro_var = @@BINLOG_FORMAT;
+let $val4var = ROW;
+--source include/safe_set_to_maybe_ro_var.inc
--echo **** Partition RANGE testing ****
diff --git a/mysql-test/t/rpl_row_max_relay_size.test b/mysql-test/t/rpl_row_max_relay_size.test
index 7e5f1145801..eb3f63db8aa 100644
--- a/mysql-test/t/rpl_row_max_relay_size.test
+++ b/mysql-test/t/rpl_row_max_relay_size.test
@@ -5,6 +5,8 @@
# Requires statement logging
-- source include/not_ndb_default.inc
--- source include/have_binlog_format_row.inc
+-- source include/have_row_based.inc
+SET SESSION BINLOG_FORMAT=ROW;
+SET GLOBAL BINLOG_FORMAT=ROW;
-- source extra/rpl_tests/rpl_max_relay_size.test
diff --git a/mysql-test/t/rpl_row_tabledefs_2myisam.test b/mysql-test/t/rpl_row_tabledefs_2myisam.test
new file mode 100644
index 00000000000..ab4914e15fa
--- /dev/null
+++ b/mysql-test/t/rpl_row_tabledefs_2myisam.test
@@ -0,0 +1,8 @@
+
+-- source include/have_binlog_format_row.inc
+-- source include/master-slave.inc
+
+let $engine_type = 'MyISAM';
+-- source extra/rpl_tests/rpl_row_tabledefs.test
+
+
diff --git a/mysql-test/t/rpl_row_tabledefs_3innodb.test b/mysql-test/t/rpl_row_tabledefs_3innodb.test
new file mode 100644
index 00000000000..7824fbfb663
--- /dev/null
+++ b/mysql-test/t/rpl_row_tabledefs_3innodb.test
@@ -0,0 +1,9 @@
+
+-- source include/have_binlog_format_row.inc
+-- source include/have_innodb.inc
+-- source include/master-slave.inc
+
+let $engine_type = 'InnoDB';
+-- source extra/rpl_tests/rpl_row_tabledefs.test
+
+
diff --git a/mysql-test/t/rpl_stm_EE_err2.test b/mysql-test/t/rpl_stm_EE_err2.test
index dbcc66686ec..face651b9a1 100644
--- a/mysql-test/t/rpl_stm_EE_err2.test
+++ b/mysql-test/t/rpl_stm_EE_err2.test
@@ -3,6 +3,6 @@
# Date: 2006-01-11
# Purpose: Engine Wrapper for rpl_stm_EE_err2.test
##############################
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_stm_EE_err2.test
diff --git a/mysql-test/t/rpl_stm_flsh_tbls.test b/mysql-test/t/rpl_stm_flsh_tbls.test
index 3a6102de279..43a5234ccc7 100644
--- a/mysql-test/t/rpl_stm_flsh_tbls.test
+++ b/mysql-test/t/rpl_stm_flsh_tbls.test
@@ -1,5 +1,5 @@
# depends on the binlog output
---source include/have_binlog_format_statement.inc
+--source include/have_binlog_format_mixed_or_statement.inc
let $rename_event_pos= 652;
-- source extra/rpl_tests/rpl_flsh_tbls.test
diff --git a/mysql-test/t/rpl_stm_log.test b/mysql-test/t/rpl_stm_log.test
index d11e1fd8ac1..5a1e0facc83 100644
--- a/mysql-test/t/rpl_stm_log.test
+++ b/mysql-test/t/rpl_stm_log.test
@@ -1,5 +1,5 @@
# Requires statement logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
let $engine_type=MyISAM;
-- source extra/rpl_tests/rpl_log.test
diff --git a/mysql-test/t/rpl_stm_max_relay_size.test b/mysql-test/t/rpl_stm_max_relay_size.test
index 50008533388..950aa8b322a 100644
--- a/mysql-test/t/rpl_stm_max_relay_size.test
+++ b/mysql-test/t/rpl_stm_max_relay_size.test
@@ -4,7 +4,7 @@
# Test of manual relay log rotation with FLUSH LOGS.
# Requires statement logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/rpl_tests/rpl_max_relay_size.test
# End of 4.1 tests
diff --git a/mysql-test/t/rpl_stm_multi_query.test b/mysql-test/t/rpl_stm_multi_query.test
index 97c322ac780..c39d1fad015 100644
--- a/mysql-test/t/rpl_stm_multi_query.test
+++ b/mysql-test/t/rpl_stm_multi_query.test
@@ -4,7 +4,7 @@
# one binlog event containing all queries)
# Requires statement logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/rpl_tests/rpl_multi_query.test
diff --git a/mysql-test/t/rpl_stm_mystery22.test b/mysql-test/t/rpl_stm_mystery22.test
index a43f2610350..017593fdfba 100644
--- a/mysql-test/t/rpl_stm_mystery22.test
+++ b/mysql-test/t/rpl_stm_mystery22.test
@@ -15,7 +15,7 @@
#should proceed in a correct way.
#################################
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/master-slave.inc
# first, cause a duplicate key problem on the slave
diff --git a/mysql-test/t/rpl_stm_no_op.test b/mysql-test/t/rpl_stm_no_op.test
index f82bbd8cd55..66dc89bd712 100644
--- a/mysql-test/t/rpl_stm_no_op.test
+++ b/mysql-test/t/rpl_stm_no_op.test
@@ -4,7 +4,7 @@
# case. So this test is meaningul only in statement-based (and if it was
# enabled in row-based, it would fail as expected).
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
source include/master-slave.inc;
diff --git a/mysql-test/t/rpl_stm_reset_slave.test b/mysql-test/t/rpl_stm_reset_slave.test
index 282033bf6d1..6a99d4e1613 100644
--- a/mysql-test/t/rpl_stm_reset_slave.test
+++ b/mysql-test/t/rpl_stm_reset_slave.test
@@ -1,5 +1,5 @@
# TBF - difference in row level logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source extra/rpl_tests/rpl_reset_slave.test
# End of 4.1 tests
diff --git a/mysql-test/t/rpl_stm_until.test b/mysql-test/t/rpl_stm_until.test
index 9a4e4471fe1..f42965c0eb0 100644
--- a/mysql-test/t/rpl_stm_until.test
+++ b/mysql-test/t/rpl_stm_until.test
@@ -1,4 +1,4 @@
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/master-slave.inc
# Test is dependent on binlog positions
diff --git a/mysql-test/t/rpl_switch_stm_row_mixed.test b/mysql-test/t/rpl_switch_stm_row_mixed.test
index 6d282069ba1..d345b62b8eb 100644
--- a/mysql-test/t/rpl_switch_stm_row_mixed.test
+++ b/mysql-test/t/rpl_switch_stm_row_mixed.test
@@ -1,4 +1,5 @@
--- source include/have_binlog_format_row.inc
+-- source include/have_row_based.inc
+-- source include/not_ndb_default.inc
-- source include/master-slave.inc
connection master;
@@ -8,6 +9,9 @@ create database mysqltest1;
--enable_warnings
use mysqltest1;
+set session binlog_format=row;
+set global binlog_format=row;
+
show global variables like "binlog_format%";
show session variables like "binlog_format%";
select @@global.binlog_format, @@session.binlog_format;
@@ -462,6 +466,41 @@ if ($you_want_to_test_UDF)
}
sync_slave_with_master;
+
+#
+# Bug#20863 If binlog format is changed between update and unlock of
+# tables, wrong binlog
+#
+
+connection master;
+DROP TABLE IF EXISTS t11;
+SET SESSION BINLOG_FORMAT=STATEMENT;
+CREATE TABLE t11 (song VARCHAR(255));
+LOCK TABLES t11 WRITE;
+SET SESSION BINLOG_FORMAT=ROW;
+INSERT INTO t11 VALUES('Several Species of Small Furry Animals Gathered Together in a Cave and Grooving With a Pict');
+SET SESSION BINLOG_FORMAT=STATEMENT;
+INSERT INTO t11 VALUES('Careful With That Axe, Eugene');
+UNLOCK TABLES;
+
+--query_vertical SELECT * FROM t11
+sync_slave_with_master;
+USE mysqltest1;
+--query_vertical SELECT * FROM t11
+
+connection master;
+DROP TABLE IF EXISTS t12;
+SET SESSION BINLOG_FORMAT=MIXED;
+CREATE TABLE t12 (data LONG);
+LOCK TABLES t12 WRITE;
+INSERT INTO t12 VALUES(UUID());
+UNLOCK TABLES;
+
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/
+show binlog events from 102;
+sync_slave_with_master;
+
# as we're using UUID we don't SELECT but use "diff" like in rpl_row_UUID
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
diff --git a/mysql-test/t/rpl_temp_table.test b/mysql-test/t/rpl_temp_table.test
index c29fa8e676d..9b73961aeea 100644
--- a/mysql-test/t/rpl_temp_table.test
+++ b/mysql-test/t/rpl_temp_table.test
@@ -1,7 +1,7 @@
# drop table t1 t2 t3 are included int master-slave.inc
# meaningful only in statement-based:
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/master-slave.inc
diff --git a/mysql-test/t/rpl_trigger.test b/mysql-test/t/rpl_trigger.test
index 3671763ee18..279574a8aaa 100644
--- a/mysql-test/t/rpl_trigger.test
+++ b/mysql-test/t/rpl_trigger.test
@@ -2,7 +2,7 @@
# Test of triggers with replication
# Adding statement include due to Bug 12574
# TODO: Remove statement include once 12574 is patched
---source include/have_binlog_format_statement.inc
+--source include/have_binlog_format_mixed_or_statement.inc
--source include/master-slave.inc
--disable_warnings
diff --git a/mysql-test/t/rpl_trunc_temp.test b/mysql-test/t/rpl_trunc_temp.test
index 56f858dc9a2..28bcb0c06c3 100644
--- a/mysql-test/t/rpl_trunc_temp.test
+++ b/mysql-test/t/rpl_trunc_temp.test
@@ -1,5 +1,5 @@
# Requires statement logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
source include/master-slave.inc;
diff --git a/mysql-test/t/rpl_truncate_2myisam.test b/mysql-test/t/rpl_truncate_2myisam.test
index 1a2cb1d0fb3..a0f0ea04f44 100644
--- a/mysql-test/t/rpl_truncate_2myisam.test
+++ b/mysql-test/t/rpl_truncate_2myisam.test
@@ -1,4 +1,4 @@
-
+--source include/not_ndb_default.inc
let $engine=MyISAM;
--source extra/rpl_tests/rpl_truncate.test
diff --git a/mysql-test/t/rpl_truncate_3innodb.test b/mysql-test/t/rpl_truncate_3innodb.test
index 7f3145feb1b..a31fd62a29a 100644
--- a/mysql-test/t/rpl_truncate_3innodb.test
+++ b/mysql-test/t/rpl_truncate_3innodb.test
@@ -1,5 +1,6 @@
--source include/have_innodb.inc
+--source include/not_ndb_default.inc
let $engine=InnoDB;
--source extra/rpl_tests/rpl_truncate.test
diff --git a/mysql-test/t/rpl_view.test b/mysql-test/t/rpl_view.test
index 687c702c79d..3eff8f7550a 100644
--- a/mysql-test/t/rpl_view.test
+++ b/mysql-test/t/rpl_view.test
@@ -132,4 +132,24 @@ DROP TABLE t1;
--sync_with_master
--connection master
+#
+# BUG#19419: "VIEW: View that the column name is different
+# by master and slave is made".
+#
+connection master;
+create table t1(a int, b int);
+insert into t1 values (1, 1), (1, 2), (1, 3);
+create view v1(a, b) as select a, sum(b) from t1 group by a;
+
+sync_slave_with_master;
+explain v1;
+show create table v1;
+select * from v1;
+
+connection master;
+drop table t1;
+drop view v1;
+
+sync_slave_with_master;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test
index 55f9d95adc5..2afcd49962c 100644
--- a/mysql-test/t/status.test
+++ b/mysql-test/t/status.test
@@ -13,6 +13,7 @@ connect (con2,localhost,root,,);
flush status;
show status like 'Table_lock%';
+select * from information_schema.session_status where variable_name like 'Table_lock%';
connection con1;
SET SQL_LOG_BIN=0;
--disable_warnings
@@ -34,6 +35,7 @@ unlock tables;
connection con1;
reap;
show status like 'Table_lock%';
+select * from information_schema.session_status where variable_name like 'Table_lock%';
drop table t1;
disconnect con2;
@@ -102,6 +104,7 @@ while ($wait_more)
# Prerequisite.
SHOW STATUS LIKE 'max_used_connections';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
# Save original setting.
SET @save_thread_cache_size=@@thread_cache_size;
@@ -115,6 +118,7 @@ disconnect con2;
# Check that max_used_connections still reflects maximum value.
SHOW STATUS LIKE 'max_used_connections';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
# Check that after flush max_used_connections equals to current number
# of connections. First wait for previous disconnect to finish.
@@ -138,15 +142,18 @@ while ($wait_more)
--enable_result_log
# Check that we don't count disconnected thread any longer.
SHOW STATUS LIKE 'max_used_connections';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
# Check that max_used_connections is updated when cached thread is
# reused...
connect (con2,localhost,root,,);
SHOW STATUS LIKE 'max_used_connections';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
# ...and when new thread is created.
connect (con3,localhost,root,,);
SHOW STATUS LIKE 'max_used_connections';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME LIKE 'max_used_connections';
# Restore original setting.
connection default;
diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test
index 7f1561b925b..6615e48ca42 100644
--- a/mysql-test/t/user_var-binlog.test
+++ b/mysql-test/t/user_var-binlog.test
@@ -1,5 +1,5 @@
# Requires statement logging
--- source include/have_binlog_format_statement.inc
+-- source include/have_binlog_format_mixed_or_statement.inc
# TODO: Create row based version once $MYSQL_BINLOG has new RB version
# Embedded server does not support binlogging
--source include/not_embedded.inc
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 9985ed4f7f5..7cbc7ee153b 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -83,16 +83,24 @@ drop table t1;
set GLOBAL max_join_size=10;
set max_join_size=100;
show variables like 'max_join_size';
+select * from information_schema.session_variables where variable_name like 'max_join_size';
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
show global variables like 'max_join_size';
+--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
+select * from information_schema.global_variables where variable_name like 'max_join_size';
set GLOBAL max_join_size=2000;
show global variables like 'max_join_size';
+select * from information_schema.global_variables where variable_name like 'max_join_size';
set max_join_size=DEFAULT;
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
show variables like 'max_join_size';
+--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
+select * from information_schema.session_variables where variable_name like 'max_join_size';
set GLOBAL max_join_size=DEFAULT;
--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
show global variables like 'max_join_size';
+--replace_result 18446744073709551615 HA_POS_ERROR 4294967295 HA_POS_ERROR
+select * from information_schema.global_variables where variable_name like 'max_join_size';
set @@max_join_size=1000, @@global.max_join_size=2000;
select @@local.max_join_size, @@global.max_join_size;
select @@identity, length(@@version)>0;
@@ -106,50 +114,68 @@ set big_tables=OFF, big_tables=ON, big_tables=0, big_tables=1, big_tables="OFF",
set global concurrent_insert=2;
show variables like 'concurrent_insert';
+select * from information_schema.session_variables where variable_name like 'concurrent_insert';
set global concurrent_insert=1;
show variables like 'concurrent_insert';
+select * from information_schema.session_variables where variable_name like 'concurrent_insert';
set global concurrent_insert=0;
show variables like 'concurrent_insert';
+select * from information_schema.session_variables where variable_name like 'concurrent_insert';
set global concurrent_insert=DEFAULT;
select @@concurrent_insert;
set global timed_mutexes=ON;
show variables like 'timed_mutexes';
+select * from information_schema.session_variables where variable_name like 'timed_mutexes';
set global timed_mutexes=0;
show variables like 'timed_mutexes';
+select * from information_schema.session_variables where variable_name like 'timed_mutexes';
set storage_engine=MYISAM, storage_engine="HEAP", global storage_engine="MERGE";
show local variables like 'storage_engine';
+select * from information_schema.session_variables where variable_name like 'storage_engine';
show global variables like 'storage_engine';
+select * from information_schema.global_variables where variable_name like 'storage_engine';
set GLOBAL query_cache_size=100000;
set GLOBAL myisam_max_sort_file_size=2000000;
show global variables like 'myisam_max_sort_file_size';
+select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
set GLOBAL myisam_max_sort_file_size=default;
--replace_result 2147483647 FILE_SIZE 9223372036854775807 FILE_SIZE
show variables like 'myisam_max_sort_file_size';
+--replace_result 2147483647 FILE_SIZE 9223372036854775807 FILE_SIZE
+select * from information_schema.session_variables where variable_name like 'myisam_max_sort_file_size';
set global net_retry_count=10, session net_retry_count=10;
set global net_buffer_length=1024, net_write_timeout=200, net_read_timeout=300;
set session net_buffer_length=2048, net_write_timeout=500, net_read_timeout=600;
show global variables like 'net_%';
+select * from information_schema.global_variables where variable_name like 'net_%';
show session variables like 'net_%';
+select * from information_schema.session_variables where variable_name like 'net_%';
set session net_buffer_length=8000, global net_read_timeout=900, net_write_timeout=1000;
show global variables like 'net_%';
+select * from information_schema.global_variables where variable_name like 'net_%';
show session variables like 'net_%';
+select * from information_schema.session_variables where variable_name like 'net_%';
set net_buffer_length=1;
show variables like 'net_buffer_length';
+select * from information_schema.session_variables where variable_name like 'net_buffer_length';
set net_buffer_length=2000000000;
show variables like 'net_buffer_length';
+select * from information_schema.session_variables where variable_name like 'net_buffer_length';
set character set cp1251_koi8;
show variables like "character_set_client";
+select * from information_schema.session_variables where variable_name like 'character_set_client';
select @@timestamp>0;
set @@rand_seed1=10000000,@@rand_seed2=1000000;
select ROUND(RAND(),5);
show variables like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%';
set @@range_alloc_block_size=1024*16;
set @@query_alloc_block_size=1024*17+2;
set @@query_prealloc_size=1024*18;
@@ -157,10 +183,12 @@ set @@transaction_alloc_block_size=1024*20-1;
set @@transaction_prealloc_size=1024*21-1;
select @@query_alloc_block_size;
show variables like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%';
set @@range_alloc_block_size=default;
set @@query_alloc_block_size=default, @@query_prealloc_size=default;
set transaction_alloc_block_size=default, @@transaction_prealloc_size=default;
show variables like '%alloc%';
+select * from information_schema.session_variables where variable_name like '%alloc%';
#
# Bug #10904 Illegal mix of collations between
@@ -363,6 +391,8 @@ set global ft_boolean_syntax = @@init_connect;
set global myisam_max_sort_file_size=4294967296;
--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
show global variables like 'myisam_max_sort_file_size';
+--replace_result 4294967296 MAX_FILE_SIZE 2146435072 MAX_FILE_SIZE
+select * from information_schema.global_variables where variable_name like 'myisam_max_sort_file_size';
set global myisam_max_sort_file_size=default;
#
@@ -398,12 +428,16 @@ SELECT @@global.local.key_buffer_size;
# BUG#5135: cannot turn on log_warnings with SET in 4.1 (and 4.0)
set @tstlw = @@log_warnings;
show global variables like 'log_warnings';
+select * from information_schema.global_variables where variable_name like 'log_warnings';
set global log_warnings = 0;
show global variables like 'log_warnings';
+select * from information_schema.global_variables where variable_name like 'log_warnings';
set global log_warnings = 42;
show global variables like 'log_warnings';
+select * from information_schema.global_variables where variable_name like 'log_warnings';
set global log_warnings = @tstlw;
show global variables like 'log_warnings';
+select * from information_schema.global_variables where variable_name like 'log_warnings';
#
# BUG#4788 show create table provides incorrect statement
@@ -435,6 +469,7 @@ drop table t1;
SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7;
SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'MYISAM_DATA_POINTER_SIZE';
#
# Bug #6958: negative arguments to integer options wrap around
@@ -442,6 +477,7 @@ SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
SET GLOBAL table_open_cache=-1;
SHOW VARIABLES LIKE 'table_open_cache';
+SELECT * FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME LIKE 'table_open_cache';
SET GLOBAL table_open_cache=DEFAULT;
#
@@ -527,6 +563,7 @@ select @@global.character_set_filesystem;
set @old_sql_big_selects = @@sql_big_selects;
set @@sql_big_selects = 1;
show variables like 'sql_big_selects';
+select * from information_schema.session_variables where variable_name like 'sql_big_selects';
set @@sql_big_selects = @old_sql_big_selects;
#
@@ -535,10 +572,14 @@ set @@sql_big_selects = @old_sql_big_selects;
#
set @@sql_notes = 0, @@sql_warnings = 0;
show variables like 'sql_notes';
+select * from information_schema.session_variables where variable_name like 'sql_notes';
show variables like 'sql_warnings';
+select * from information_schema.session_variables where variable_name like 'sql_warnings';
set @@sql_notes = 1, @@sql_warnings = 1;
show variables like 'sql_notes';
+select * from information_schema.session_variables where variable_name like 'sql_notes';
show variables like 'sql_warnings';
+select * from information_schema.session_variables where variable_name like 'sql_warnings';
#
# Bug #12792: @@system_time_zone is not SELECTable.
@@ -565,9 +606,15 @@ select @@basedir, @@datadir, @@tmpdir;
--replace_column 2 #
show variables like 'basedir';
--replace_column 2 #
+select * from information_schema.session_variables where variable_name like 'basedir';
+--replace_column 2 #
show variables like 'datadir';
--replace_column 2 #
+select * from information_schema.session_variables where variable_name like 'datadir';
+--replace_column 2 #
show variables like 'tmpdir';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name like 'tmpdir';
#
# Bug #19606: make ssl settings available via SHOW VARIABLES and @@variables
@@ -577,6 +624,8 @@ show variables like 'tmpdir';
select @@ssl_ca, @@ssl_capath, @@ssl_cert, @@ssl_cipher, @@ssl_key;
--replace_column 2 #
show variables like 'ssl%';
+--replace_column 2 #
+select * from information_schema.session_variables where variable_name like 'ssl%';
#
# Bug #19616: make log_queries_not_using_indexes available in SHOW VARIABLES
@@ -584,6 +633,7 @@ show variables like 'ssl%';
#
select @@log_queries_not_using_indexes;
show variables like 'log_queries_not_using_indexes';
+select * from information_schema.session_variables where variable_name like 'log_queries_not_using_indexes';
#
# Bug#20908: Crash if select @@""