summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/backup.test5
-rw-r--r--mysql-test/t/binlog.test1
-rw-r--r--mysql-test/t/binlog_killed.test1
-rw-r--r--mysql-test/t/blackhole.test6
-rw-r--r--mysql-test/t/ctype_cp932_notembedded.test33
-rw-r--r--mysql-test/t/drop_temp_table.test2
-rw-r--r--mysql-test/t/flush_block_commit_notembedded.test2
-rw-r--r--mysql-test/t/func_in.test31
-rw-r--r--mysql-test/t/innodb.test1
-rw-r--r--mysql-test/t/long_tmpdir-master.opt1
-rw-r--r--mysql-test/t/long_tmpdir-master.sh3
-rw-r--r--mysql-test/t/long_tmpdir.test9
-rw-r--r--mysql-test/t/mix_innodb_myisam_binlog.test54
-rw-r--r--mysql-test/t/mysqlbinlog.test3
-rw-r--r--mysql-test/t/mysqlbinlog2.test3
-rw-r--r--mysql-test/t/mysqldump.test1
-rw-r--r--mysql-test/t/rpl000015.test2
-rw-r--r--mysql-test/t/rpl000017.test2
-rw-r--r--mysql-test/t/rpl_rotate_logs.test2
-rw-r--r--mysql-test/t/sp-code.test2
-rw-r--r--mysql-test/t/sp_trans.test28
-rw-r--r--mysql-test/t/sp_trans_log.test33
-rw-r--r--mysql-test/t/user_var-binlog.test4
23 files changed, 103 insertions, 126 deletions
diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test
index a3339ecce69..6ff4144aaf2 100644
--- a/mysql-test/t/backup.test
+++ b/mysql-test/t/backup.test
@@ -1,3 +1,8 @@
+
+# The server need to be started in $MYSQLTEST_VARDIR since it
+# uses ../std_data_ln/
+-- source include/uses_vardir.inc
+
#
# This test is a bit tricky as we can't use backup table to overwrite an old
# table
diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test
index 3bc6c6953ed..2a7df23a2f5 100644
--- a/mysql-test/t/binlog.test
+++ b/mysql-test/t/binlog.test
@@ -5,6 +5,7 @@
-- source include/not_embedded.inc
-- source include/have_bdb.inc
-- source include/have_innodb.inc
+-- source include/have_log_bin.inc
--disable_warnings
drop table if exists t1, t2;
diff --git a/mysql-test/t/binlog_killed.test b/mysql-test/t/binlog_killed.test
index 1c4f1272691..034895f17cb 100644
--- a/mysql-test/t/binlog_killed.test
+++ b/mysql-test/t/binlog_killed.test
@@ -1,5 +1,6 @@
-- source include/have_innodb.inc
--source include/not_embedded.inc
+--source include/have_log_bin.inc
###
### bug#22725 : incorrect killed error in binlogged query
diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test
index a0a06022bf9..d8ffdeb8312 100644
--- a/mysql-test/t/blackhole.test
+++ b/mysql-test/t/blackhole.test
@@ -6,6 +6,10 @@
-- source include/have_blackhole.inc
-- source include/have_log_bin.inc
+# The server need to be started in $MYSQLTEST_VARDIR since it
+# uses ../std_data_ln/
+-- source include/uses_vardir.inc
+
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
@@ -110,7 +114,7 @@ insert into t1 values(1);
insert ignore into t1 values(1);
replace into t1 values(100);
create table t2 (a varchar(200)) engine=blackhole;
-load data infile '../std_data_ln/words.dat' into table t2;
+eval load data infile '../std_data_ln/words.dat' into table t2;
alter table t1 add b int;
alter table t1 drop b;
create table t3 like t1;
diff --git a/mysql-test/t/ctype_cp932_notembedded.test b/mysql-test/t/ctype_cp932_notembedded.test
deleted file mode 100644
index 7ae6275816e..00000000000
--- a/mysql-test/t/ctype_cp932_notembedded.test
+++ /dev/null
@@ -1,33 +0,0 @@
--- source include/not_embedded.inc
--- source include/have_cp932.inc
--- source include/have_log_bin.inc
-
---character_set cp932
---disable_warnings
-drop table if exists t1;
---enable_warnings
-
-set names cp932;
-set character_set_database = cp932;
-
-# Test prepared statement with 0x8300 sequence in parameter while
-# running with cp932 client character set.
-RESET MASTER;
-CREATE TABLE t1(f1 blob);
-PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)';
-SET @var1= x'8300';
-# TODO: Note that this doesn't actually test the code which was added for
-# bug#11338 because this syntax for prepared statements causes the PS to
-# be replicated differently than if we executed the PS from C or Java.
-# Using this syntax, variable names are inserted into the binlog instead
-# of values. The real goal of this test is to check the code that was
-# added to Item_param::query_val_str() in order to do hex encoding of
-# PS parameters when the client character set is cp932;
-# Bug#11338 has an example java program which can be used to verify this
-# code (and I have used it to test the fix) until there is some way to
-# exercise this code from mysql-test-run.
-EXECUTE stmt1 USING @var1;
-SHOW BINLOG EVENTS FROM 98;
-SELECT HEX(f1) FROM t1;
-DROP table t1;
-# end test for bug#11338
diff --git a/mysql-test/t/drop_temp_table.test b/mysql-test/t/drop_temp_table.test
index 7c83a2919b7..b456e75576b 100644
--- a/mysql-test/t/drop_temp_table.test
+++ b/mysql-test/t/drop_temp_table.test
@@ -1,5 +1,3 @@
-# Embedded server doesn't support binlog
--- source include/not_embedded.inc
-- source include/have_log_bin.inc
--disable_warnings
diff --git a/mysql-test/t/flush_block_commit_notembedded.test b/mysql-test/t/flush_block_commit_notembedded.test
index 25eb093226e..4a0300acf78 100644
--- a/mysql-test/t/flush_block_commit_notembedded.test
+++ b/mysql-test/t/flush_block_commit_notembedded.test
@@ -6,7 +6,7 @@
-- source include/have_log_bin.inc
# And it requires InnoDB
--- source include/not_embedded.inc
+-- source include/have_log_bin.inc
-- source include/have_innodb.inc
connect (con1,localhost,root,,);
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 77592d015eb..a84ffada1ee 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -335,19 +335,28 @@ insert into t2 values(13491727406643098568),
(0x8000004000000001),
(0x8000040000000001);
-SELECT HEX(a) FROM t2 WHERE a IN (0xBB3C3E98175D33C8, 42);
+SELECT HEX(a) FROM t2 WHERE a IN
+ (CAST(0xBB3C3E98175D33C8 AS UNSIGNED),
+ 42);
SELECT HEX(a) FROM t2 WHERE a IN
-(0xBB3C3E98175D33C8,
- 0x7fffffffffffffff,
- 0x8000000000000000,
- 0x8000000000000400,
- 0x8000000000000401,
- 42);
-
-SELECT HEX(a) FROM t2 WHERE a IN (0x7fffffffffffffff,0x8000000000000001);
-SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff);
-SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff,'abc');
+ (CAST(0xBB3C3E98175D33C8 AS UNSIGNED),
+ CAST(0x7fffffffffffffff AS UNSIGNED),
+ CAST(0x8000000000000000 AS UNSIGNED),
+ CAST(0x8000000000000400 AS UNSIGNED),
+ CAST(0x8000000000000401 AS UNSIGNED),
+ 42);
+
+SELECT HEX(a) FROM t2 WHERE a IN
+ (CAST(0x7fffffffffffffff AS UNSIGNED),
+ CAST(0x8000000000000001 AS UNSIGNED));
+SELECT HEX(a) FROM t2 WHERE a IN
+ (CAST(0x7ffffffffffffffe AS UNSIGNED),
+ CAST(0x7fffffffffffffff AS UNSIGNED));
+SELECT HEX(a) FROM t2 WHERE a IN
+ (0x7ffffffffffffffe,
+ 0x7fffffffffffffff,
+ 'abc');
CREATE TABLE t3 (a BIGINT UNSIGNED);
INSERT INTO t3 VALUES (9223372036854775551);
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index f7fa7366101..b7f264578f2 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -12,6 +12,7 @@
#######################################################################
-- source include/have_innodb.inc
+-- source include/have_log_bin.inc
#
# Small basic test with ignore
diff --git a/mysql-test/t/long_tmpdir-master.opt b/mysql-test/t/long_tmpdir-master.opt
new file mode 100644
index 00000000000..398abfc4632
--- /dev/null
+++ b/mysql-test/t/long_tmpdir-master.opt
@@ -0,0 +1 @@
+--tmpdir=$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789
diff --git a/mysql-test/t/long_tmpdir-master.sh b/mysql-test/t/long_tmpdir-master.sh
new file mode 100644
index 00000000000..318955fbcca
--- /dev/null
+++ b/mysql-test/t/long_tmpdir-master.sh
@@ -0,0 +1,3 @@
+d="$MYSQLTEST_VARDIR/tmp/long_temporary_directory_path_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789"
+test -d "$d" || mkdir "$d"
+rm -f "$d"/*
diff --git a/mysql-test/t/long_tmpdir.test b/mysql-test/t/long_tmpdir.test
new file mode 100644
index 00000000000..cf0bed29918
--- /dev/null
+++ b/mysql-test/t/long_tmpdir.test
@@ -0,0 +1,9 @@
+#
+# Bug #29015: Stack overflow in processing temporary table name when tmpdir path
+# is long
+#
+
+create view v1 as select table_name from information_schema.tables;
+drop view v1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test
index 53de4d11b81..428aba92342 100644
--- a/mysql-test/t/mix_innodb_myisam_binlog.test
+++ b/mysql-test/t/mix_innodb_myisam_binlog.test
@@ -4,10 +4,8 @@
# slave is always with --skip-innodb in the testsuite. I (Guilhem) however
# did some tests manually on a slave; tables are replicated fine and
# Exec_Master_Log_Pos advances as expected.
--- source include/have_log_bin.inc
-# Embedded server doesn't support binlogging
--- source include/not_embedded.inc
+-- source include/have_log_bin.inc
-- source include/have_innodb.inc
--disable_warnings
@@ -28,9 +26,7 @@ insert into t1 values(1);
insert into t2 select * from t1;
commit;
---replace_column 5 #
---replace_result "xid=15" "xid=9"
-show binlog events from 98;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -42,8 +38,7 @@ insert into t2 select * from t1;
# should say some changes to non-transact1onal tables couldn't be rolled back
rollback;
---replace_column 5 #
-show binlog events from 98;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -57,9 +52,7 @@ insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
---replace_column 5 #
---replace_result "xid=48" "xid=26"
-show binlog events from 98;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -75,9 +68,7 @@ insert into t1 values(7);
commit;
select a from t1 order by a; # check that savepoints work :)
---replace_column 5 #
---replace_result "xid=70" "xid=38"
-show binlog events from 98;
+source include/show_binlog_events.inc;
# and when ROLLBACK is not explicit?
delete from t1;
@@ -97,8 +88,7 @@ connection con2;
# so SHOW BINLOG EVENTS may come before con1 does the loggin. To be sure that
# logging has been done, we use a user lock.
select get_lock("a",10);
---replace_column 5 #
-show binlog events from 98;
+source include/show_binlog_events.inc;
# and when not in a transact1on?
delete from t1;
@@ -108,9 +98,7 @@ reset master;
insert into t1 values(9);
insert into t2 select * from t1;
---replace_column 5 #
---replace_result "xid=118" "xid=61"
-show binlog events from 98;
+source include/show_binlog_events.inc;
# Check that when the query updat1ng the MyISAM table is the first in the
# transaction, we log it immediately.
@@ -121,16 +109,11 @@ reset master;
insert into t1 values(10); # first make t1 non-empty
begin;
insert into t2 select * from t1;
---replace_column 5 #
---replace_result "xid=132" "xid=67"
-show binlog events from 98;
+source include/show_binlog_events.inc;
insert into t1 values(11);
commit;
---replace_column 5 #
---replace_result "xid=132" "xid=67" "xid=135" "xid=69"
-show binlog events from 98;
-
+source include/show_binlog_events.inc;
# Check that things work like before this BEGIN/ROLLBACK code was added,
# when t2 is INNODB
@@ -146,9 +129,7 @@ insert into t1 values(12);
insert into t2 select * from t1;
commit;
---replace_column 5 #
---replace_result "xid=154" "xid=79"
-show binlog events from 98;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -159,8 +140,7 @@ insert into t1 values(13);
insert into t2 select * from t1;
rollback;
---replace_column 5 #
-show binlog events from 98;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -174,9 +154,7 @@ insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
---replace_column 5 #
---replace_result "xid=186" "xid=95"
-show binlog events from 98;
+source include/show_binlog_events.inc;
delete from t1;
delete from t2;
@@ -192,9 +170,7 @@ insert into t1 values(18);
commit;
select a from t1 order by a; # check that savepoints work :)
---replace_column 5 #
---replace_result "xid=207" "xid=106"
-show binlog events from 98;
+source include/show_binlog_events.inc;
# Test for BUG#5714, where a MyISAM update in the transaction used to
# release row-level locks in InnoDB
@@ -253,9 +229,7 @@ insert into t2 values (3);
disconnect con2;
connection con3;
select get_lock("lock1",60);
---replace_column 5 #
---replace_result "xid=207" "xid=106" "xid=225" "xid=115" "xid=228" "xid=116" "xid=232" "xid=118" "xid=259" "xid=133"
-show binlog events from 98;
+source include/show_binlog_events.inc;
do release_lock("lock1");
drop table t0,t2;
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index cb1dad2bc85..ba161ddbb89 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -2,9 +2,6 @@
-- source include/have_log_bin.inc
-# Embedded server doesn't support binlogging
--- source include/not_embedded.inc
-
# we need this for getting fixed timestamps inside of this test
set timestamp=1000000000;
diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test
index 6f9045b429b..c6869d67da1 100644
--- a/mysql-test/t/mysqlbinlog2.test
+++ b/mysql-test/t/mysqlbinlog2.test
@@ -3,9 +3,6 @@
-- source include/have_log_bin.inc
-# Embedded server doesn't support binlogging
--- source include/not_embedded.inc
-
--disable_warnings
drop table if exists t1;
--enable_warnings
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 3a3421bd672..30c241d4096 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -1,5 +1,6 @@
# Embedded server doesn't support external clients
--source include/not_embedded.inc
+--source include/have_log_bin.inc
# Binlog is required
--source include/have_log_bin.inc
diff --git a/mysql-test/t/rpl000015.test b/mysql-test/t/rpl000015.test
index d05e4df66b1..e103d40943f 100644
--- a/mysql-test/t/rpl000015.test
+++ b/mysql-test/t/rpl000015.test
@@ -1,3 +1,5 @@
+-- source include/have_log_bin.inc
+
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
diff --git a/mysql-test/t/rpl000017.test b/mysql-test/t/rpl000017.test
index c1d36d53501..4488cbad230 100644
--- a/mysql-test/t/rpl000017.test
+++ b/mysql-test/t/rpl000017.test
@@ -1,3 +1,5 @@
+-- source include/have_log_bin.inc
+
connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 01f556c3c8f..69614b45693 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -1,6 +1,8 @@
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
+-- source include/have_log_bin.inc
+
#
# Test is run with max_binlog_size=2048 to force automatic rotation of the
# binary log
diff --git a/mysql-test/t/sp-code.test b/mysql-test/t/sp-code.test
index 0f249c95172..10755f2bf8a 100644
--- a/mysql-test/t/sp-code.test
+++ b/mysql-test/t/sp-code.test
@@ -2,7 +2,7 @@
# Test the debugging feature "show procedure/function code <name>"
#
--- source include/is_debug_build.inc
+-- source include/have_debug.inc
--disable_warnings
drop procedure if exists empty;
diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test
index 02e72db18d6..60f7e3326b4 100644
--- a/mysql-test/t/sp_trans.test
+++ b/mysql-test/t/sp_trans.test
@@ -555,34 +555,6 @@ set @@session.max_heap_table_size=default|
#
-# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
-# Bug #23333 stored function + non-transac table + transac table =
-# breaks stmt-based binlog
-# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
-#
-CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
-CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
-
-insert into t2 values (1,1)|
-
-create function bug23333()
-RETURNS int(11)
-DETERMINISTIC
-begin
- insert into t1 values (null);
- select count(*) from t1 into @a;
- return @a;
-end|
-
-reset master|
---error ER_DUP_ENTRY
-insert into t2 values (bug23333(),1)|
---replace_column 2 # 5 # 6 #
-show binlog events from 98 /* with fixes for #23333 will show there is the query */|
-select count(*),@a from t1 /* must be 1,1 */|
-drop table t1, t2|
-
-#
# BUG#NNNN: New bug synopsis
#
#--disable_warnings
diff --git a/mysql-test/t/sp_trans_log.test b/mysql-test/t/sp_trans_log.test
new file mode 100644
index 00000000000..3e440b3ccc1
--- /dev/null
+++ b/mysql-test/t/sp_trans_log.test
@@ -0,0 +1,33 @@
+-- source include/have_innodb.inc
+-- source include/have_log_bin.inc
+
+delimiter |;
+
+#
+# Bug #13270 INSERT,UPDATE,etc that calls func with side-effect does not binlog
+# Bug #23333 stored function + non-transac table + transac table =
+# breaks stmt-based binlog
+# Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
+#
+CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM|
+CREATE TABLE t2 (a int NOT NULL auto_increment, b int, PRIMARY KEY (a)) ENGINE=InnoDB|
+
+insert into t2 values (1,1)|
+
+create function bug23333()
+RETURNS int(11)
+DETERMINISTIC
+begin
+ insert into t1 values (null);
+ select count(*) from t1 into @a;
+ return @a;
+end|
+
+reset master|
+--error ER_DUP_ENTRY
+insert into t2 values (bug23333(),1)|
+--replace_column 2 # 5 # 6 #
+show binlog events from 98 /* with fixes for #23333 will show there is the query */|
+select count(*),@a from t1 /* must be 1,1 */|
+drop table t1, t2|
+
diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test
index 2b7f880d7fa..57bf9df2fb0 100644
--- a/mysql-test/t/user_var-binlog.test
+++ b/mysql-test/t/user_var-binlog.test
@@ -1,6 +1,4 @@
-# Embedded server does not support binlogging
---source include/not_embedded.inc
---source include/have_log_bin.inc
+-- source include/have_log_bin.inc
# Check that user variables are binlogged correctly (BUG#3875)
create table t1 (a varchar(50));