Commit d6b705dd authored by msvensson@neptunus.(none)'s avatar msvensson@neptunus.(none)

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into  neptunus.(none):/home/msvensson/mysql/mysql-4.1
parents 0683c122 28f529d9
This diff is collapsed.
let $1 = 10;
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
while ($1)
{
echo $1;
dec $1;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
...@@ -2197,6 +2197,11 @@ sub run_mysqltest ($) { ...@@ -2197,6 +2197,11 @@ sub run_mysqltest ($) {
mysqld_arguments($args,'master',0,$tinfo->{'master_opt'},[]); mysqld_arguments($args,'master',0,$tinfo->{'master_opt'},[]);
} }
# ----------------------------------------------------------------------
# export MYSQL_TEST variable containing <path>/mysqltest <args>
# ----------------------------------------------------------------------
$ENV{'MYSQL_TEST'}= "$exe_mysqltest " . join(" ", @$args);
return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,""); return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,"");
} }
......
...@@ -714,6 +714,7 @@ if [ x$USE_TIMER = x1 ] ; then ...@@ -714,6 +714,7 @@ if [ x$USE_TIMER = x1 ] ; then
fi fi
MYSQL_TEST_BIN=$MYSQL_TEST MYSQL_TEST_BIN=$MYSQL_TEST
MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS" MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS"
export MYSQL_TEST
GDB_CLIENT_INIT=$MYSQL_TMP_DIR/gdbinit.client GDB_CLIENT_INIT=$MYSQL_TMP_DIR/gdbinit.client
GDB_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master GDB_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master
GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave
......
...@@ -7,18 +7,16 @@ otto ...@@ -7,18 +7,16 @@ otto
select otto from (select 1 as otto) as t1; select otto from (select 1 as otto) as t1;
otto otto
1 1
mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed: 1054: Unknown column 'friedrich' in 'field list'
select friedrich from (select 1 as otto) as t1; select friedrich from (select 1 as otto) as t1;
ERROR 42S22: Unknown column 'friedrich' in 'field list' ERROR 42S22: Unknown column 'friedrich' in 'field list'
select otto from (select 1 as otto) as t1; select otto from (select 1 as otto) as t1;
otto otto
1 1
select otto from (select 1 as otto) as t1; mysqltest: At line 1: query 'select otto from (select 1 as otto) as t1' succeeded - should have failed with sqlstate 42S22...
otto
1
select friedrich from (select 1 as otto) as t1;
ERROR 42S22: Unknown column 'friedrich' in 'field list'
select friedrich from (select 1 as otto) as t1; select friedrich from (select 1 as otto) as t1;
ERROR 42S22: Unknown column 'friedrich' in 'field list' ERROR 42S22: Unknown column 'friedrich' in 'field list'
mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' failed with wrong sqlstate 42S22 instead of 00000...
select otto from (select 1 as otto) as t1; select otto from (select 1 as otto) as t1;
otto otto
1 1
...@@ -135,6 +133,8 @@ ERROR 42S02: Table 'test.t1' doesn't exist ...@@ -135,6 +133,8 @@ ERROR 42S02: Table 'test.t1' doesn't exist
select 1146 as "after_!errno_masked_error" ; select 1146 as "after_!errno_masked_error" ;
after_!errno_masked_error after_!errno_masked_error
1146 1146
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146 instead of 1000...
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146 instead of 1000...
garbage ; garbage ;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
select 1064 as "after_--enable_abort_on_error" ; select 1064 as "after_--enable_abort_on_error" ;
...@@ -142,3 +142,216 @@ after_--enable_abort_on_error ...@@ -142,3 +142,216 @@ after_--enable_abort_on_error
1064 1064
select 3 from t1 ; select 3 from t1 ;
ERROR 42S02: Table 'test.t1' doesn't exist ERROR 42S02: Table 'test.t1' doesn't exist
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146 instead of 1064...
mysqltest: At line 1: query 'select 3 from t1' failed: 1146: Table 'test.t1' doesn't exist
hello
hello
;;;;;;;;
# MySQL: -- The
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: End of line junk detected: "6"
mysqltest: At line 1: Missing delimiter
mysqltest: At line 1: Extra delimiter ";" found
MySQL
"MySQL"
MySQL: The world''s most popular open source database
"MySQL: The world's most popular open source database"
MySQL: The world''s
most popular open
source database
# MySQL: The world''s
# most popular open
# source database
- MySQL: The world''s
- most popular open
- source database
- MySQL: The world''s
-- most popular open
-- source database
# MySQL: The
--world''s
# most popular
-- open
- source database
"MySQL: The world's most popular; open source database"
"MySQL: The world's most popular ; open source database"
"MySQL: The world's most popular ;open source database"
echo message echo message
mysqltest: At line 1: Empty variable
sh: -c: line 0: syntax error near unexpected token `;'
sh: -c: line 0: `;'
mysqltest: At line 1: command ";" failed
mysqltest: At line 1: Missing argument in exec
MySQL
"MySQL"
MySQL: The
world''s most
popular open
source database
# MySQL: The
# world''s most
# popular open
# source database
-- MySQL: The
-- world''s most
-- popular open
-- source database
# MySQL: The
- world''s most
-- popular open
# source database
'$message'
"$message"
hej
hej
hej
1
a long variable content
a long variable content
a long $where variable content
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Variable name in hi=hi does not start with '$'
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing arguments to let
mysqltest: At line 1: Missing variable name in let
mysqltest: At line 1: Variable name in =hi does not start with '$'
mysqltest: At line 1: Missing assignment operator in let
mysqltest: At line 1: Missing file name in source
mysqltest: At line 1: Could not open file ./non_existingFile
mysqltest: In included file "./var/tmp/recursive.sql": At line 1: Source directives are nesting too deep
mysqltest: In included file "./var/tmp/error.sql": At line 1: query 'garbage ' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'garbage' at line 1
2 = outer loop variable after while
here is the sourced script
2 = outer loop variable before dec
1 = outer loop variable after dec
1 = outer loop variable after while
here is the sourced script
1 = outer loop variable before dec
0 = outer loop variable after dec
2 = outer loop variable after while
here is the sourced script
2 = outer loop variable before dec
1 = outer loop variable after dec
1 = outer loop variable after while
here is the sourced script
1 = outer loop variable before dec
0 = outer loop variable after dec
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
In loop
here is the sourced script
mysqltest: At line 1: Missing argument to sleep
mysqltest: At line 1: Invalid argument to sleep "abc"
1
2
101
hej
1
mysqltest: At line 1: Missing arguments to inc
mysqltest: At line 1: First argument to inc must be a variable (start with $)
mysqltest: At line 1: End of line junk detected: "1000"
4
4
-1
-2
99
hej
-1
mysqltest: At line 1: Missing arguments to dec
mysqltest: At line 1: First argument to dec must be a variable (start with $)
mysqltest: At line 1: End of line junk detected: "1000"
mysqltest: At line 1: Missing arguments to system, nothing to do!
mysqltest: At line 1: Missing arguments to system, nothing to do!
sh: NonExistsinfComamdn: command not found
mysqltest: At line 1: system command 'NonExistsinfComamdn' failed
test
test2
test3
test4
1
mysqltest: In included file "./include/mysqltest_while.inc": At line 64: Nesting too deeply
mysqltest: At line 1: missing '(' in while
mysqltest: At line 1: missing ')' in while
mysqltest: At line 1: Missing '{' after while. Found "dec $i"
mysqltest: At line 1: Stray '}' - end of block before beginning
mysqltest: At line 1: Stray 'end' command - end of block before beginning
mysqltest: At line 1: query '' failed: 1065: Query was empty
mysqltest: At line 1: Missing '{' after while. Found "echo hej"
mysqltest: At line 3: Missing end of block
mysqltest: At line 1: Missing newline between while and '{'
mysqltest: At line 1: missing '(' in if
mysqltest: At line 1: Stray 'end' command - end of block before beginning
select "b" bs col1, "c" bs col2;
col1 col2
b c
seledt "b" bs dol1, "d" bs dol2;
dol1 dol2
b d
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a;'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a '
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c'
mysqltest: At line 1: Wrong number of arguments to replace_result in 'replace_result a b c '
select "a" as col1, "c" as col2;
col1 col2
b c
select "a" as col1, "c" as col2;
col1 col2
b d
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a'
mysqltest: At line 1: Wrong number of arguments to replace_column in 'replace_column 1'
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a b'
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a 1'
mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 b c '
mysqltest: At line 1: Invalid integer argument "10!"
mysqltest: At line 1: End of line junk detected: "!"
mysqltest: At line 1: Invalid integer argument "a"
failing_statement;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing_statement' at line 1
failing_statement;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'failing_statement' at line 1
SELECT 1 as a;
a
1
...@@ -4,10 +4,10 @@ reset master; ...@@ -4,10 +4,10 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
stop slave;
change master to master_host='127.0.0.1',master_user='root', change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT; master_password='',master_port=MASTER_PORT;
start slave; start slave;
stop slave;
change master to master_host='127.0.0.1',master_user='root', change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=SLAVE_PORT; master_password='',master_port=SLAVE_PORT;
start slave; start slave;
......
...@@ -238,7 +238,7 @@ drop table t1; ...@@ -238,7 +238,7 @@ drop table t1;
create table `t1 `(a int); create table `t1 `(a int);
--error 1102 --error 1102
create database `db1 `; create database `db1 `;
--error 1166; --error 1166
create table t1(`a ` int); create table t1(`a ` int);
# #
......
...@@ -11,21 +11,21 @@ drop table if exists t1, t2; ...@@ -11,21 +11,21 @@ drop table if exists t1, t2;
--enable_warnings --enable_warnings
CREATE TABLE t1 ( a int ); CREATE TABLE t1 ( a int );
INSERT INTO t1 VALUES (1),(2),(1); INSERT INTO t1 VALUES (1),(2),(1);
--error 1062; --error 1062
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
--error 1146; --error 1146
select * from t2; select * from t2;
--error 1062; --error 1062
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1; CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=INNODB SELECT a FROM t1;
--error 1146; --error 1146
select * from t2; select * from t2;
--error 1062; --error 1062
CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; CREATE TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
--error 1146; --error 1146
select * from t2; select * from t2;
--error 1062; --error 1062
CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1; CREATE TEMPORARY TABLE t2 ( PRIMARY KEY (a) ) ENGINE=MYISAM SELECT a FROM t1;
--error 1146; --error 1146
select * from t2; select * from t2;
# End of 4.1 tests # End of 4.1 tests
...@@ -6,13 +6,13 @@ drop database if exists mysqltest; ...@@ -6,13 +6,13 @@ drop database if exists mysqltest;
drop database if exists client_test_db; drop database if exists client_test_db;
--enable_warnings --enable_warnings
--error 1051; --error 1051
drop table t1; drop table t1;
create table t1(n int); create table t1(n int);
insert into t1 values(1); insert into t1 values(1);
create temporary table t1( n int); create temporary table t1( n int);
insert into t1 values(2); insert into t1 values(2);
--error 1050; --error 1050
create table t1(n int); create table t1(n int);
drop table t1; drop table t1;
select * from t1; select * from t1;
...@@ -56,13 +56,13 @@ drop database mysqltest; ...@@ -56,13 +56,13 @@ drop database mysqltest;
# test drop/create database and FLUSH TABLES WITH READ LOCK # test drop/create database and FLUSH TABLES WITH READ LOCK
flush tables with read lock; flush tables with read lock;
--error 1209,1223; --error 1209,1223
create database mysqltest; create database mysqltest;
unlock tables; unlock tables;
create database mysqltest; create database mysqltest;
show databases; show databases;
flush tables with read lock; flush tables with read lock;
--error 1208,1223; --error 1208,1223
drop database mysqltest; drop database mysqltest;
unlock tables; unlock tables;
drop database mysqltest; drop database mysqltest;
...@@ -73,7 +73,7 @@ drop database mysqltest; ...@@ -73,7 +73,7 @@ drop database mysqltest;
# test create table and FLUSH TABLES WITH READ LOCK # test create table and FLUSH TABLES WITH READ LOCK
drop table t1; drop table t1;
flush tables with read lock; flush tables with read lock;
--error 1223; --error 1223
create table t1(n int); create table t1(n int);
unlock tables; unlock tables;
create table t1(n int); create table t1(n int);
......
...@@ -37,7 +37,7 @@ connection con1; ...@@ -37,7 +37,7 @@ connection con1;
select * from t1; select * from t1;
connection con2; connection con2;
flush tables with read lock; flush tables with read lock;
--error 1099; --error 1099
drop table t2; drop table t2;
connection con1; connection con1;
send drop table t2; send drop table t2;
......
...@@ -300,7 +300,7 @@ handler t5 open as h5; ...@@ -300,7 +300,7 @@ handler t5 open as h5;
handler h5 read first limit 9; handler h5 read first limit 9;
# close first # close first
alter table t1 engine=MyISAM; alter table t1 engine=MyISAM;
--error 1109; --error 1109
handler h1 read first limit 9; handler h1 read first limit 9;
handler h2 read first limit 9; handler h2 read first limit 9;
handler h3 read first limit 9; handler h3 read first limit 9;
...@@ -308,22 +308,22 @@ handler h4 read first limit 9; ...@@ -308,22 +308,22 @@ handler h4 read first limit 9;
handler h5 read first limit 9; handler h5 read first limit 9;
# close last # close last
alter table t5 engine=MyISAM; alter table t5 engine=MyISAM;
--error 1109; --error 1109
handler h1 read first limit 9; handler h1 read first limit 9;
handler h2 read first limit 9; handler h2 read first limit 9;
handler h3 read first limit 9; handler h3 read first limit 9;
handler h4 read first limit 9; handler h4 read first limit 9;
--error 1109; --error 1109
handler h5 read first limit 9; handler h5 read first limit 9;
# close middle # close middle
alter table t3 engine=MyISAM; alter table t3 engine=MyISAM;
--error 1109; --error 1109
handler h1 read first limit 9; handler h1 read first limit 9;
handler h2 read first limit 9; handler h2 read first limit 9;
--error 1109; --error 1109
handler h3 read first limit 9; handler h3 read first limit 9;
handler h4 read first limit 9; handler h4 read first limit 9;
--error 1109; --error 1109
handler h5 read first limit 9; handler h5 read first limit 9;
handler h2 close; handler h2 close;
handler h4 close; handler h4 close;
...@@ -335,11 +335,11 @@ handler h1_1 read first limit 9; ...@@ -335,11 +335,11 @@ handler h1_1 read first limit 9;
handler h1_2 read first limit 9; handler h1_2 read first limit 9;
handler h1_3 read first limit 9; handler h1_3 read first limit 9;
alter table t1 engine=MyISAM; alter table t1 engine=MyISAM;
--error 1109; --error 1109
handler h1_1 read first limit 9; handler h1_1 read first limit 9;
--error 1109; --error 1109
handler h1_2 read first limit 9; handler h1_2 read first limit 9;
--error 1109; --error 1109
handler h1_3 read first limit 9; handler h1_3 read first limit 9;
drop table t1; drop table t1;
drop table t2; drop table t2;
......
...@@ -25,7 +25,7 @@ set autocommit=0; ...@@ -25,7 +25,7 @@ set autocommit=0;
# The following query should hang because con1 is locking the page # The following query should hang because con1 is locking the page
--send --send
update t1 set x=2 where id = 0; update t1 set x=2 where id = 0;
--sleep 2; --sleep 2
connection con1; connection con1;
update t1 set x=1 where id = 0; update t1 set x=1 where id = 0;
...@@ -63,7 +63,7 @@ set autocommit=0; ...@@ -63,7 +63,7 @@ set autocommit=0;
# The following query should hang because con1 is locking the page # The following query should hang because con1 is locking the page
--send --send
update t1 set x=2 where id = 0; update t1 set x=2 where id = 0;
--sleep 2; --sleep 2
connection con1; connection con1;
update t1 set x=1 where id = 0; update t1 set x=1 where id = 0;
...@@ -97,7 +97,7 @@ update t2 set a=2 where b = 0; ...@@ -97,7 +97,7 @@ update t2 set a=2 where b = 0;
select * from t2; select * from t2;
--send --send
update t1 set x=2 where id = 0; update t1 set x=2 where id = 0;
--sleep 2; --sleep 2
connection con1; connection con1;
update t1 set x=1 where id = 0; update t1 set x=1 where id = 0;
......
...@@ -39,7 +39,7 @@ set autocommit=0; ...@@ -39,7 +39,7 @@ set autocommit=0;
# The following statement should hang because con1 is locking the page # The following statement should hang because con1 is locking the page
--send --send
lock table t1 write; lock table t1 write;
--sleep 2; --sleep 2
connection con1; connection con1;
update t1 set x=1 where id = 0; update t1 set x=1 where id = 0;
......
...@@ -1183,7 +1183,7 @@ drop table t1; ...@@ -1183,7 +1183,7 @@ drop table t1;
# #
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB; CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
--error 1214; --error 1214
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE); SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
DROP TABLE t1; DROP TABLE t1;
......
This diff is collapsed.
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# The previous step has simply removed the frm file # The previous step has simply removed the frm file
# from disk, but left the table in NDB # from disk, but left the table in NDB
# #
--sleep 3; --sleep 3
select * from t9 order by a; select * from t9 order by a;
# handler_discover should be 1 # handler_discover should be 1
......
...@@ -89,7 +89,7 @@ kill @id; ...@@ -89,7 +89,7 @@ kill @id;
# We don't drop t3 as this is a temporary table # We don't drop t3 as this is a temporary table
drop table t2; drop table t2;
connection master; connection master;
--error 1053; --error 1053
reap; reap;
connection slave; connection slave;
# The SQL slave thread should now have stopped because the query was killed on # The SQL slave thread should now have stopped because the query was killed on
......
...@@ -22,7 +22,7 @@ set sql_log_bin=0; ...@@ -22,7 +22,7 @@ set sql_log_bin=0;
insert into t1 values(2); insert into t1 values(2);
set sql_log_bin=1; set sql_log_bin=1;
save_master_pos; save_master_pos;
--error 1062; --error 1062
insert into t1 values(1),(2); insert into t1 values(1),(2);
drop table t1; drop table t1;
save_master_pos; save_master_pos;
......
...@@ -8,7 +8,7 @@ insert into t1 values(1+get_lock("a",15)*0); ...@@ -8,7 +8,7 @@ insert into t1 values(1+get_lock("a",15)*0);
insert into t1 values(2); insert into t1 values(2);
save_master_pos; save_master_pos;
connection slave; connection slave;
--real_sleep 3; # can't sync_with_master as we should be blocked --real_sleep 3 # can't sync_with_master as we should be blocked
stop slave; stop slave;
select * from t1; select * from t1;
--replace_result $MASTER_MYPORT MASTER_MYPORT --replace_result $MASTER_MYPORT MASTER_MYPORT
......
...@@ -58,7 +58,7 @@ while ($1) ...@@ -58,7 +58,7 @@ while ($1)
enable_query_log; enable_query_log;
select * from t1 for update; select * from t1 for update;
start slave; start slave;
--sleep 3; # hope that slave is blocked now --sleep 3 # hope that slave is blocked now
insert into t2 values(22); # provoke deadlock, slave should be victim insert into t2 values(22); # provoke deadlock, slave should be victim
commit; commit;
sync_with_master; sync_with_master;
...@@ -76,7 +76,7 @@ change master to master_log_pos=401; # the BEGIN log event ...@@ -76,7 +76,7 @@ change master to master_log_pos=401; # the BEGIN log event
begin; begin;
select * from t2 for update; # hold lock select * from t2 for update; # hold lock
start slave; start slave;
--sleep 10; # slave should have blocked, and be retrying --sleep 10 # slave should have blocked, and be retrying
commit; commit;
sync_with_master; sync_with_master;
select * from t1; # check that slave succeeded finally select * from t1; # check that slave succeeded finally
...@@ -97,7 +97,7 @@ change master to master_log_pos=401; ...@@ -97,7 +97,7 @@ change master to master_log_pos=401;
begin; begin;
select * from t2 for update; select * from t2 for update;
start slave; start slave;
--sleep 10; --sleep 10
commit; commit;
sync_with_master; sync_with_master;
select * from t1; select * from t1;
......
...@@ -5,7 +5,7 @@ source include/master-slave.inc; ...@@ -5,7 +5,7 @@ source include/master-slave.inc;
drop table if exists t1, t2; drop table if exists t1, t2;
--enable_warnings --enable_warnings
create table t1 (a int); create table t1 (a int);
--error 1051; --error 1051
drop table t1, t2; drop table t1, t2;
save_master_pos; save_master_pos;
connection slave; connection slave;
......
...@@ -9,7 +9,7 @@ sync_slave_with_master; ...@@ -9,7 +9,7 @@ sync_slave_with_master;
connection master; connection master;
disconnect master; disconnect master;
connection slave; connection slave;
--real_sleep 3; # time for DROP to be written --real_sleep 3 # time for DROP to be written
show status like 'Slave_open_temp_tables'; show status like 'Slave_open_temp_tables';
connection default; connection default;
drop database mysqltest; drop database mysqltest;
......
...@@ -6,7 +6,7 @@ source include/master-slave.inc; ...@@ -6,7 +6,7 @@ source include/master-slave.inc;
connection master; connection master;
create table t1 (a int primary key); create table t1 (a int primary key);
# generate an error that goes to the binlog # generate an error that goes to the binlog
--error 1062; --error 1062
insert into t1 values (1),(1); insert into t1 values (1),(1);
save_master_pos; save_master_pos;
connection slave; connection slave;
...@@ -45,7 +45,7 @@ select (@id := id) - id from t3; ...@@ -45,7 +45,7 @@ select (@id := id) - id from t3;
kill @id; kill @id;
drop table t2,t3; drop table t2,t3;
connection master; connection master;
--error 0,1053; --error 0,1053
reap; reap;
connection master1; connection master1;
show binlog events from 79; show binlog events from 79;
......
# Testing if "flush logs" command bouncing resulting in logs created in a loop # Testing if "flush logs" command bouncing resulting in logs created in a loop
# in case of bi-directional replication # in case of bi-directional replication
source include/master-slave.inc source include/master-slave.inc;
connection slave; connection slave;
stop slave;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
eval change master to master_host='127.0.0.1',master_user='root', eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT; master_password='',master_port=$MASTER_MYPORT;
start slave; start slave;
connection master; connection master;
stop slave;
--replace_result $SLAVE_MYPORT SLAVE_PORT --replace_result $SLAVE_MYPORT SLAVE_PORT
eval change master to master_host='127.0.0.1',master_user='root', eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$SLAVE_MYPORT; master_password='',master_port=$SLAVE_MYPORT;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# We also check how the foreign_key_check variable is replicated # We also check how the foreign_key_check variable is replicated
source include/master-slave.inc; source include/master-slave.inc;
source include/have_innodb.inc source include/have_innodb.inc;
connection master; connection master;
create table t1(a int auto_increment, key(a)); create table t1(a int auto_increment, key(a));
create table t2(b int auto_increment, c int, key(b)); create table t2(b int auto_increment, c int, key(b));
......
...@@ -123,7 +123,7 @@ connection master; ...@@ -123,7 +123,7 @@ connection master;
reset master; reset master;
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
unique(day)); unique(day));
--error 1062; --error 1062
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
'\n##\n' starting by '>' ignore 1 lines; '\n##\n' starting by '>' ignore 1 lines;
......
...@@ -102,7 +102,7 @@ show master logs; ...@@ -102,7 +102,7 @@ show master logs;
purge binary logs to 'master-bin.000002'; purge binary logs to 'master-bin.000002';
show binary logs; show binary logs;
# sleeping 10 seconds or more would make the slave believe connection is down # sleeping 10 seconds or more would make the slave believe connection is down
--real_sleep 1; --real_sleep 1
purge master logs before now(); purge master logs before now();
show binary logs; show binary logs;
insert into t2 values (65); insert into t2 values (65);
......
...@@ -60,7 +60,7 @@ stop slave; ...@@ -60,7 +60,7 @@ stop slave;
# this should stop immideately # this should stop immideately
start slave until master_log_file='master-bin.000001', master_log_pos=561; start slave until master_log_file='master-bin.000001', master_log_pos=561;
# 2 is not enough when running with valgrind # 2 is not enough when running with valgrind
real_sleep 4 --real_sleep 4
# here the sql slave thread should be stopped # here the sql slave thread should be stopped
--replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004 --replace_result $MASTER_MYPORT MASTER_MYPORT bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
--replace_column 1 # 9 # 23 # 33 # --replace_column 1 # 9 # 23 # 33 #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment