diff options
Diffstat (limited to 'mysql-test')
36 files changed, 205 insertions, 192 deletions
diff --git a/mysql-test/include/is_debug_build.inc b/mysql-test/include/is_debug_build.inc deleted file mode 100644 index 23a2814e2bb..00000000000 --- a/mysql-test/include/is_debug_build.inc +++ /dev/null @@ -1,4 +0,0 @@ --- require r/is_debug_build.require ---disable_query_log -select instr(version(), "debug") > 0; ---enable_query_log diff --git a/mysql-test/include/master-slave.inc b/mysql-test/include/master-slave.inc index ea09f4e842b..0c27a1d8225 100644 --- a/mysql-test/include/master-slave.inc +++ b/mysql-test/include/master-slave.inc @@ -1,3 +1,6 @@ +# Replication tests need binlog +source include/have_log_bin.inc; + connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (master1,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); diff --git a/mysql-test/include/show_binlog_events.inc b/mysql-test/include/show_binlog_events.inc new file mode 100644 index 00000000000..5d60fb19cb5 --- /dev/null +++ b/mysql-test/include/show_binlog_events.inc @@ -0,0 +1,4 @@ +--let $binlog_start=98 +--replace_column 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// +--eval show binlog events from $binlog_start diff --git a/mysql-test/include/uses_vardir.inc b/mysql-test/include/uses_vardir.inc new file mode 100644 index 00000000000..950de698a43 --- /dev/null +++ b/mysql-test/include/uses_vardir.inc @@ -0,0 +1,14 @@ +# +# Some tests uses LOAD DATA with a relative path +# and need to see for example ../std_data +# +# Also if an absolute path was used, the server might be started +# with --secure-file-priv and wouldn't be allowed to LOAD a file +# outside of it's vardir anyway +# + + +if (`select LOCATE('$MYSQLTEST_VARDIR', REPLACE(@@datadir, '\\\\', '/')) != 1`) +{ + skip Need mysqld in MYSQLTEST_VARDIR; +} diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 1d157ea3401..5e176dce109 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -596,6 +596,25 @@ sub collect_one_test_case($$$$$$$) { } } + if ( $tinfo->{'need_binlog'} ) + { + if (grep(/^--skip-log-bin/, @::opt_extra_mysqld_opt) ) + { + $tinfo->{'skip'}= 1; + $tinfo->{'comment'}= "Test need binlog"; + return; + } + } + else + { + if ( $::mysql_version_id >= 50100 ) + { + # Test does not need binlog, add --skip-binlog to + # the options used when starting it + push(@{$tinfo->{'master_opt'}}, "--skip-log-bin"); + } + } + } } @@ -608,6 +627,7 @@ our @tags= ["include/have_binlog_format_row.inc", "binlog_format", "row"], ["include/have_binlog_format_statement.inc", "binlog_format", "stmt"], ["include/have_binlog_format_mixed.inc", "binlog_format", "mixed"], + ["include/have_log_bin.inc", "need_binlog", 1], ["include/big_test.inc", "big_test", 1], ["include/have_debug.inc", "need_debug", 1], ["include/have_ndb.inc", "ndb_test", 1], diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 4514c8d23e4..7d8b89525db 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -903,6 +903,9 @@ sub command_line_setup () { $opt_skip_ndbcluster= 1; # Turn off use of NDB cluster $opt_skip_ssl= 1; # Turn off use of SSL + # Turn off use of bin log + push(@opt_extra_mysqld_opt, "--skip-log-bin"); + if ( $opt_extern ) { mtr_error("Can't use --extern with --embedded-server"); diff --git a/mysql-test/r/ctype_cp932_notembedded.result b/mysql-test/r/ctype_cp932_notembedded.result deleted file mode 100644 index 241fa0d1db7..00000000000 --- a/mysql-test/r/ctype_cp932_notembedded.result +++ /dev/null @@ -1,16 +0,0 @@ -drop table if exists t1; -set names cp932; -set character_set_database = cp932; -RESET MASTER; -CREATE TABLE t1(f1 blob); -PREPARE stmt1 FROM 'INSERT INTO t1 VALUES(?)'; -SET @var1= x'8300'; -EXECUTE stmt1 USING @var1; -SHOW BINLOG EVENTS FROM 98; -Log_name Pos Event_type Server_id End_log_pos Info -master-bin.000001 98 Query 1 188 use `test`; CREATE TABLE t1(f1 blob) -master-bin.000001 188 Query 1 283 use `test`; INSERT INTO t1 VALUES(0x8300) -SELECT HEX(f1) FROM t1; -HEX(f1) -8300 -DROP table t1; diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result index a3e0773649f..99b16d29eb9 100644 --- a/mysql-test/r/func_in.result +++ b/mysql-test/r/func_in.result @@ -431,15 +431,17 @@ insert into t2 values(13491727406643098568), (0x8000000400000001), (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); HEX(a) BB3C3E98175D33C8 SELECT HEX(a) FROM t2 WHERE a IN -(0xBB3C3E98175D33C8, -0x7fffffffffffffff, -0x8000000000000000, -0x8000000000000400, -0x8000000000000401, +(CAST(0xBB3C3E98175D33C8 AS UNSIGNED), +CAST(0x7fffffffffffffff AS UNSIGNED), +CAST(0x8000000000000000 AS UNSIGNED), +CAST(0x8000000000000400 AS UNSIGNED), +CAST(0x8000000000000401 AS UNSIGNED), 42); HEX(a) BB3C3E98175D33C8 @@ -447,15 +449,22 @@ BB3C3E98175D33C8 8000000000000000 8000000000000400 8000000000000401 -SELECT HEX(a) FROM t2 WHERE a IN (0x7fffffffffffffff,0x8000000000000001); +SELECT HEX(a) FROM t2 WHERE a IN +(CAST(0x7fffffffffffffff AS UNSIGNED), +CAST(0x8000000000000001 AS UNSIGNED)); HEX(a) 7FFFFFFFFFFFFFFF 8000000000000001 -SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff); +SELECT HEX(a) FROM t2 WHERE a IN +(CAST(0x7ffffffffffffffe AS UNSIGNED), +CAST(0x7fffffffffffffff AS UNSIGNED)); HEX(a) 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF -SELECT HEX(a) FROM t2 WHERE a IN (0x7ffffffffffffffe,0x7fffffffffffffff,'abc'); +SELECT HEX(a) FROM t2 WHERE a IN +(0x7ffffffffffffffe, +0x7fffffffffffffff, +'abc'); HEX(a) 7FFFFFFFFFFFFFFE 7FFFFFFFFFFFFFFF diff --git a/mysql-test/r/long_tmpdir.result b/mysql-test/r/long_tmpdir.result new file mode 100644 index 00000000000..7e6dd34ced1 --- /dev/null +++ b/mysql-test/r/long_tmpdir.result @@ -0,0 +1,3 @@ +create view v1 as select table_name from information_schema.tables; +drop view v1; +End of 5.0 tests diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index 2c0712f80b1..8fc5bfca3ef 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1) master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 347 Xid 1 # COMMIT /* xid=9 */ +master-bin.000001 347 Xid 1 # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -47,7 +47,7 @@ master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 616 Xid 1 # COMMIT /* xid=26 */ +master-bin.000001 616 Xid 1 # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -74,7 +74,7 @@ master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7) -master-bin.000001 703 Xid 1 # COMMIT /* xid=38 */ +master-bin.000001 703 Xid 1 # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -101,7 +101,7 @@ insert into t2 select * from t1; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9) -master-bin.000001 185 Xid 1 # COMMIT /* xid=61 */ +master-bin.000001 185 Xid 1 # COMMIT /* XID */ master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; @@ -112,18 +112,18 @@ insert into t2 select * from t1; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 186 Xid 1 # COMMIT /* xid=67 */ +master-bin.000001 186 Xid 1 # COMMIT /* XID */ master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 186 Xid 1 # COMMIT /* xid=67 */ +master-bin.000001 186 Xid 1 # COMMIT /* XID */ master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 307 Query 1 # use `test`; BEGIN master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11) -master-bin.000001 463 Xid 1 # COMMIT /* xid=69 */ +master-bin.000001 463 Xid 1 # COMMIT /* XID */ alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -137,7 +137,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12) master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 348 Xid 1 # COMMIT /* xid=79 */ +master-bin.000001 348 Xid 1 # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -161,7 +161,7 @@ show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14) -master-bin.000001 254 Xid 1 # COMMIT /* xid=95 */ +master-bin.000001 254 Xid 1 # COMMIT /* XID */ delete from t1; delete from t2; reset master; @@ -182,7 +182,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 342 Xid 1 # COMMIT /* xid=106 */ +master-bin.000001 342 Xid 1 # COMMIT /* XID */ delete from t1; delete from t2; alter table t2 type=MyISAM; @@ -234,19 +234,19 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 342 Xid 1 # COMMIT /* xid=106 */ +master-bin.000001 342 Xid 1 # COMMIT /* XID */ master-bin.000001 369 Query 1 # use `test`; delete from t1 -master-bin.000001 446 Xid 1 # COMMIT /* xid=115 */ +master-bin.000001 446 Xid 1 # COMMIT /* XID */ master-bin.000001 473 Query 1 # use `test`; delete from t2 -master-bin.000001 550 Xid 1 # COMMIT /* xid=116 */ +master-bin.000001 550 Xid 1 # COMMIT /* XID */ master-bin.000001 577 Query 1 # use `test`; alter table t2 type=MyISAM master-bin.000001 666 Query 1 # use `test`; insert into t1 values (1) -master-bin.000001 754 Xid 1 # COMMIT /* xid=118 */ +master-bin.000001 754 Xid 1 # COMMIT /* XID */ master-bin.000001 781 Query 1 # use `test`; insert into t2 values (20) master-bin.000001 870 Query 1 # use `test`; drop table t1,t2 master-bin.000001 949 Query 1 # use `test`; create temporary table ti (a int) engine=innodb master-bin.000001 1059 Query 1 # use `test`; insert into ti values(1) -master-bin.000001 1146 Xid 1 # COMMIT /* xid=133 */ +master-bin.000001 1146 Xid 1 # COMMIT /* XID */ master-bin.000001 1173 Query 1 # use `test`; create temporary table t1 (a int) engine=myisam master-bin.000001 1283 Query 1 # use `test`; insert t1 values (1) master-bin.000001 1366 Query 1 # use `test`; create table t0 (n int) diff --git a/mysql-test/r/sp_trans.result b/mysql-test/r/sp_trans.result index c74909e7e8f..564e31c9e32 100644 --- a/mysql-test/r/sp_trans.result +++ b/mysql-test/r/sp_trans.result @@ -530,23 +530,3 @@ count(*) drop table t3, t4| drop procedure bug14210| set @@session.max_heap_table_size=default| -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| -insert into t2 values (bug23333(),1)| -ERROR 23000: Duplicate entry '1' for key 1 -show binlog events from 98 /* with fixes for #23333 will show there is the query */| -Log_name Pos Event_type Server_id End_log_pos Info -select count(*),@a from t1 /* must be 1,1 */| -count(*) @a -1 1 -drop table t1, t2| diff --git a/mysql-test/r/sp_trans_log.result b/mysql-test/r/sp_trans_log.result new file mode 100644 index 00000000000..96e6f76b23c --- /dev/null +++ b/mysql-test/r/sp_trans_log.result @@ -0,0 +1,20 @@ +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| +insert into t2 values (bug23333(),1)| +ERROR 23000: Duplicate entry '1' for key 1 +show binlog events from 98 /* with fixes for #23333 will show there is the query */| +Log_name Pos Event_type Server_id End_log_pos Info +select count(*),@a from t1 /* must be 1,1 */| +count(*) @a +1 1 +drop table t1, t2| diff --git a/mysql-test/r/view_grant.result b/mysql-test/r/view_grant.result index 32dffa305e5..0f9ce47dec6 100644 --- a/mysql-test/r/view_grant.result +++ b/mysql-test/r/view_grant.result @@ -601,9 +601,9 @@ Warnings: Note 1449 There is no 'no-such-user'@'localhost' registered SHOW CREATE VIEW v; View Create View -v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `t1`.`a` AS `a` from `t1` +v CREATE ALGORITHM=UNDEFINED DEFINER=`no-such-user`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `test`.`t1`.`a` AS `a` from `t1` Warnings: -Note 1449 There is no 'no-such-user'@'localhost' registered +Warning 1356 View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them SELECT * FROM v; ERROR HY000: There is no 'no-such-user'@'localhost' registered DROP VIEW v; 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)); |