Commit 9f6f3ae0 authored by unknown's avatar unknown

Merge mskold@bk-internal.mysql.com:/home/bk/mysql-5.1-new

into  mysql.com:/usr/local/home/marty/MySQL/mysql-5.1-new

parents 58da9de1 c6599bfc
...@@ -2,14 +2,20 @@ ...@@ -2,14 +2,20 @@
# statements that are not replicated. The test below could be changed # statements that are not replicated. The test below could be changed
# to rely on the replication of error codes for statements that are not # to rely on the replication of error codes for statements that are not
# replicated row-based. # replicated row-based.
-- source include/have_binlog_format_statement.inc #
# See if an EE_ error in one event of the master's binlog stops replication # See if an EE_ error in one event of the master's binlog stops replication
# (it should not: in this configuration the EE_ error is probably not # (it should not: in this configuration the EE_ error is probably not
# critical). Example: you do a DROP TABLE on a table which has no MYI file # critical). Example: you do a DROP TABLE on a table which has no MYI file
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and # check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986). # Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986).
####################################
# Change Author: JBM
# Change Date: 2006-01-11
# Change: Split test per lars review
####################################
#"REQUIREMENT: A master DROP TABLE on a table with non-existing MYI
# file must be correctly replicated to the slave"
####################################
-- source include/master-slave.inc -- source include/master-slave.inc
eval create table t1 (a int) engine=$engine_type; eval create table t1 (a int) engine=$engine_type;
...@@ -20,19 +26,4 @@ save_master_pos; ...@@ -20,19 +26,4 @@ save_master_pos;
connection slave; connection slave;
sync_with_master; sync_with_master;
# Now a real error.
connection master;
eval create table t1 (a int, unique(a)) engine=$engine_type;
set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
save_master_pos;
--error 1062
insert into t1 values(1),(2);
drop table t1;
save_master_pos;
connection slave;
wait_for_slave_to_stop;
# End of 4.1 tests # End of 4.1 tests
# The test is not relevant when testing replication of error codes for
# statements that are not replicated. The test below could be changed
# to rely on the replication of error codes for statements that are not
# replicated row-based.
# This test does not work the same for row based as the insert in the second part is not replicated as a call but rather as a table map and row right. Have added a slave stop so the test will complete, other wise it just continues to loop waiting for a slave stop that never comes. 8/22/2005 JBM
-- source include/have_binlog_format_row.inc
# See if an EE_ error in one event of the master's binlog stops replication
# (it should not: in this configuration the EE_ error is probably not
# critical). Example: you do a DROP TABLE on a table which has no MYI file
# check if START SLAVE, RESET SLAVE, CHANGE MASTER reset Last_slave_error and
# Last_slave_errno in SHOW SLAVE STATUS (1st and 3rd commands did not: bug 986).
-- source include/master-slave.inc
eval create table t1 (a int) engine=$engine_type;
flush tables;
system rm ./var/master-data/test/t1.MYI ;
drop table if exists t1;
save_master_pos;
connection slave;
sync_with_master;
# Now a real error.
connection master;
eval create table t1 (a int, unique(a)) engine=$engine_type;
set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
save_master_pos;
--error 1062
insert into t1 values(1),(2);
drop table t1;
save_master_pos;
connection slave;
stop slave;
wait_for_slave_to_stop;
###################################
# Author: JBM
# Date: 2006-01-11
# Purpose: Second test case from
# rpl_EE_err.test split out
# from orginal to make the
# first work with both RBR and SBR
###################################
#REQUIREMENT: An INSERT with a faked duplicate entry error on
#master should be replicated to slave and force the slave to stop
#(since the slave can't cause a faked error to re-occur).
###################################
-- source include/master-slave.inc
connection master;
eval create table t1 (a int, unique(a)) engine=$engine_type;
set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
save_master_pos;
--error 1062
insert into t1 values(1),(2);
drop table t1;
save_master_pos;
connection slave;
wait_for_slave_to_stop;
# End of 4.1 tests
...@@ -9,11 +9,3 @@ flush tables; ...@@ -9,11 +9,3 @@ flush tables;
drop table if exists t1; drop table if exists t1;
Warnings: Warnings:
Error 2 Can't find file: 't1' (errno: 2) Error 2 Can't find file: 't1' (errno: 2)
create table t1 (a int, unique(a)) engine=myisam;
set sql_log_bin=0;
insert into t1 values(2);
set sql_log_bin=1;
insert into t1 values(1),(2);
ERROR 23000: Duplicate entry '2' for key 1
drop table t1;
stop slave;
...@@ -4,11 +4,6 @@ reset master; ...@@ -4,11 +4,6 @@ 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;
create table t1 (a int) engine=myisam;
flush tables;
drop table if exists t1;
Warnings:
Error 2 Can't find file: 't1' (errno: 2)
create table t1 (a int, unique(a)) engine=myisam; create table t1 (a int, unique(a)) engine=myisam;
set sql_log_bin=0; set sql_log_bin=0;
insert into t1 values(2); insert into t1 values(2);
......
...@@ -21,7 +21,7 @@ INITIAL_SIZE 16M ...@@ -21,7 +21,7 @@ INITIAL_SIZE 16M
UNDO_BUFFER_SIZE = 1M UNDO_BUFFER_SIZE = 1M
ENGINE=NDB; ENGINE=NDB;
--error 1502 --error ER_CREATE_TABLESPACE_FAILED
CREATE LOGFILE GROUP lg1 CREATE LOGFILE GROUP lg1
ADD UNDOFILE 'undofile.dat' ADD UNDOFILE 'undofile.dat'
INITIAL_SIZE 16M INITIAL_SIZE 16M
...@@ -32,7 +32,7 @@ ALTER LOGFILE GROUP lg1 ...@@ -32,7 +32,7 @@ ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat' ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE 4M ENGINE NDB; INITIAL_SIZE 4M ENGINE NDB;
--error 1507 --error ER_ALTER_TABLESPACE_FAILED
ALTER LOGFILE GROUP lg1 ALTER LOGFILE GROUP lg1
ADD UNDOFILE 'undofile02.dat' ADD UNDOFILE 'undofile02.dat'
INITIAL_SIZE 4M ENGINE=NDB; INITIAL_SIZE 4M ENGINE=NDB;
...@@ -43,20 +43,20 @@ USE LOGFILE GROUP lg1 ...@@ -43,20 +43,20 @@ USE LOGFILE GROUP lg1
INITIAL_SIZE 12M INITIAL_SIZE 12M
ENGINE NDB; ENGINE NDB;
--error 1502 # Bug 16158 --error ER_CREATE_TABLESPACE_FAILED
CREATE TABLESPACE ts1 CREATE TABLESPACE ts1
ADD DATAFILE 'datafile.dat' ADD DATAFILE 'datafile.dat'
USE LOGFILE GROUP lg1 USE LOGFILE GROUP lg1
INITIAL_SIZE 12M INITIAL_SIZE 12M
ENGINE NDB; ENGINE NDB;
# Currently a bug, bug#16158
ALTER TABLESPACE ts1 ALTER TABLESPACE ts1
ADD DATAFILE 'datafile2.dat' ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 12M INITIAL_SIZE 12M
ENGINE=NDB; ENGINE=NDB;
--error 1507 # Currently a bug, bug#16158 --error ER_ALTER_TABLESPACE_FAILED
ALTER TABLESPACE ts1 ALTER TABLESPACE ts1
ADD DATAFILE 'datafile2.dat' ADD DATAFILE 'datafile2.dat'
INITIAL_SIZE 12M INITIAL_SIZE 12M
...@@ -67,7 +67,7 @@ CREATE TABLE t1 ...@@ -67,7 +67,7 @@ CREATE TABLE t1
tablespace ts1 storage disk tablespace ts1 storage disk
engine ndb; engine ndb;
--error 1050 --error ER_TABLE_EXISTS_ERROR
CREATE TABLE t1 CREATE TABLE t1
(pk1 int not null primary key, b int not null, c int not null) (pk1 int not null primary key, b int not null, c int not null)
tablespace ts1 storage disk tablespace ts1 storage disk
...@@ -79,7 +79,7 @@ ALTER TABLESPACE ts1 ...@@ -79,7 +79,7 @@ ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat' DROP DATAFILE 'datafile2.dat'
ENGINE=NDB; ENGINE=NDB;
--error 1507 --error ER_ALTER_TABLESPACE_FAILED
ALTER TABLESPACE ts1 ALTER TABLESPACE ts1
DROP DATAFILE 'datafile2.dat' DROP DATAFILE 'datafile2.dat'
ENGINE=NDB; ENGINE=NDB;
...@@ -88,7 +88,7 @@ ALTER TABLESPACE ts1 ...@@ -88,7 +88,7 @@ ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat' DROP DATAFILE 'datafile.dat'
ENGINE=NDB; ENGINE=NDB;
--error 1507 --error ER_ALTER_TABLESPACE_FAILED
ALTER TABLESPACE ts1 ALTER TABLESPACE ts1
DROP DATAFILE 'datafile.dat' DROP DATAFILE 'datafile.dat'
ENGINE=NDB; ENGINE=NDB;
...@@ -96,14 +96,14 @@ ENGINE=NDB; ...@@ -96,14 +96,14 @@ ENGINE=NDB;
DROP TABLESPACE ts1 DROP TABLESPACE ts1
ENGINE=NDB; ENGINE=NDB;
--error 1503 --error ER_DROP_TABLESPACE_FAILED
DROP TABLESPACE ts1 DROP TABLESPACE ts1
ENGINE=NDB; ENGINE=NDB;
DROP LOGFILE GROUP lg1 DROP LOGFILE GROUP lg1
ENGINE=NDB; ENGINE=NDB;
--error 1503 --error ER_DROP_TABLESPACE_FAILED
DROP LOGFILE GROUP lg1 DROP LOGFILE GROUP lg1
ENGINE=NDB; ENGINE=NDB;
--echo **** End Duplicate Statement Testing **** --echo **** End Duplicate Statement Testing ****
......
let $engine_type=myisam; let $engine_type=myisam;
-- source extra/rpl_tests/rpl_row_EE_err.test -- source extra/rpl_tests/rpl_EE_err.test
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_stm_EE_err.test
#############################
# Author: JBM
# Date: 2006-01-11
# Purpose: Engine Wrapper for rpl_stm_EE_err2.test
##############################
-- source include/have_binlog_format_statement.inc
let $engine_type=myisam;
-- source extra/rpl_tests/rpl_stm_EE_err2.test
...@@ -79,8 +79,8 @@ then ...@@ -79,8 +79,8 @@ then
c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin" c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin"
c_d="$c_d comment='Database privileges';" c_d="$c_d comment='Database privileges';"
i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N'); i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y');
INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N');" INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y');"
fi fi
if test ! -f $mdata/host.frm if test ! -f $mdata/host.frm
...@@ -167,22 +167,22 @@ then ...@@ -167,22 +167,22 @@ then
if test "$1" = "test" if test "$1" = "test"
then then
i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO user (host,user) values ('localhost',''); INSERT INTO user (host,user) values ('localhost','');
INSERT INTO user (host,user) values ('$hostname','');" INSERT INTO user (host,user) values ('$hostname','');"
else else
i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);" i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);"
if test "$windows" = "0" if test "$windows" = "0"
then then
i_u="$i_u i_u="$i_u
INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
INSERT INTO user (host,user) values ('$hostname',''); INSERT INTO user (host,user) values ('$hostname','');
INSERT INTO user (host,user) values ('localhost','');" INSERT INTO user (host,user) values ('localhost','');"
else else
i_u="$i_u i_u="$i_u
INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);" INSERT INTO user VALUES ('localhost','','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0);"
fi fi
fi fi
fi fi
......
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