Commit 45978147 authored by unknown's avatar unknown

Post-merge fixes.


mysql-test/extra/rpl_tests/rpl_loaddata.test:
  Removing SHOW MASTER STATUS that does not seem to make sense.
mysql-test/extra/rpl_tests/rpl_log.test:
  Correcting test case to sync slave with master.
mysql-test/suite/binlog/r/binlog_unsafe.result:
  Result change.
mysql-test/suite/binlog/t/binlog_unsafe.test:
  Removing unsafe variable from list of safe variables.
mysql-test/suite/rpl/r/rpl_loaddata.result:
  Result change.
mysql-test/suite/rpl/r/rpl_skip_error.result:
  Result change.
mysql-test/suite/rpl/t/rpl_skip_error.test:
  Correcting bad manual+automatic merge. Test is now only relevant for statement-
  based replication.
sql/rpl_rli.cc:
  Correcting automerge undoing previous change of return value.
  Relay_log_info::wait_for_pos() should return -2 when not initialized to work
  correctly.
parent 62dee6f7
...@@ -39,13 +39,6 @@ sync_with_master; ...@@ -39,13 +39,6 @@ sync_with_master;
select * from t1; select * from t1;
select * from t3; select * from t3;
# We want to be sure that LOAD DATA is in the slave's binlog.
# But we can't simply read this binlog, because as the slave has not been
# restarted for this test, the file_id is uncertain (would cause test
# failures). So instead, we test if the binlog looks long enough to
# contain LOAD DATA. Since 5.0.3 we assume that binlog of 1292 is ok.
# If LOAD DATA was not logged, the binlog would be shorter.
show master status;
connection master; connection master;
......
...@@ -148,5 +148,5 @@ drop table t1; ...@@ -148,5 +148,5 @@ drop table t1;
# End of 4.1 tests # End of 4.1 tests
sync_with_master; sync_slave_with_master;
...@@ -153,7 +153,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id); ...@@ -153,7 +153,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
INSERT INTO t1 VALUES (@@session.foreign_key_checks); INSERT INTO t1 VALUES (@@session.foreign_key_checks);
INSERT INTO t1 VALUES (@@session.sql_auto_is_null); INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
INSERT INTO t1 VALUES (@@session.unique_checks); INSERT INTO t1 VALUES (@@session.unique_checks);
INSERT INTO t2 VALUES (@@session.sql_mode);
INSERT INTO t1 VALUES (@@session.auto_increment_increment); INSERT INTO t1 VALUES (@@session.auto_increment_increment);
INSERT INTO t1 VALUES (@@session.auto_increment_offset); INSERT INTO t1 VALUES (@@session.auto_increment_offset);
INSERT INTO t2 VALUES (@@session.character_set_client); INSERT INTO t2 VALUES (@@session.character_set_client);
...@@ -179,4 +178,3 @@ DROP PROCEDURE proc4; ...@@ -179,4 +178,3 @@ DROP PROCEDURE proc4;
DROP FUNCTION func5; DROP FUNCTION func5;
DROP PREPARE prep6; DROP PREPARE prep6;
DROP TABLE t1, t2, t3, trigger_table, trigger_table2; DROP TABLE t1, t2, t3, trigger_table, trigger_table2;
DROP VIEW v1;
...@@ -200,7 +200,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id); ...@@ -200,7 +200,6 @@ INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
INSERT INTO t1 VALUES (@@session.foreign_key_checks); INSERT INTO t1 VALUES (@@session.foreign_key_checks);
INSERT INTO t1 VALUES (@@session.sql_auto_is_null); INSERT INTO t1 VALUES (@@session.sql_auto_is_null);
INSERT INTO t1 VALUES (@@session.unique_checks); INSERT INTO t1 VALUES (@@session.unique_checks);
INSERT INTO t2 VALUES (@@session.sql_mode);
INSERT INTO t1 VALUES (@@session.auto_increment_increment); INSERT INTO t1 VALUES (@@session.auto_increment_increment);
INSERT INTO t1 VALUES (@@session.auto_increment_offset); INSERT INTO t1 VALUES (@@session.auto_increment_offset);
INSERT INTO t2 VALUES (@@session.character_set_client); INSERT INTO t2 VALUES (@@session.character_set_client);
......
...@@ -26,9 +26,6 @@ day id category name ...@@ -26,9 +26,6 @@ day id category name
2003-02-22 2461 b a a a @ %  ' " a 2003-02-22 2461 b a a a @ %  ' " a
2003-03-22 2161 c asdf 2003-03-22 2161 c asdf
2003-03-22 2416 a bbbbb 2003-03-22 2416 a bbbbb
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
slave-bin.000001 1280
drop table t1; drop table t1;
drop table t2; drop table t2;
drop table t3; drop table t3;
...@@ -83,8 +80,7 @@ load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields ...@@ -83,8 +80,7 @@ load data infile '../std_data_ln/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;
ERROR 23000: Duplicate entry '2003-03-22' for key 'day' ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
set @@global.sql_slave_skip_counter=1; drop table t2;
start slave;
drop table t2; drop table t2;
drop table t1; drop table t1;
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB; CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
......
...@@ -13,18 +13,18 @@ insert into t1 values (1); ...@@ -13,18 +13,18 @@ insert into t1 values (1);
insert into t1 values (1); insert into t1 values (1);
insert into t1 values (2),(3); insert into t1 values (2),(3);
[on slave] [on slave]
select * from t1 ORDER BY n; select * from t1 order by n;
n n
1 1
2 2
3 3
==== Test With sql_mode=strict_trans_tables ==== ==== Test With sql_mode=strict_trans_tables ====
insert into t1 values (7), (8); insert into t1 values (7),(8);
[on master] [on master]
set sql_mode=strict_trans_tables; set sql_mode=strict_trans_tables;
insert into t1 values (7), (8), (9); insert into t1 values (7), (8), (9);
[on slave] [on slave]
select * from t1; select * from t1 order by n;
n n
1 1
2 2
...@@ -72,3 +72,59 @@ Last_SQL_Errno 0 ...@@ -72,3 +72,59 @@ Last_SQL_Errno 0
Last_SQL_Error Last_SQL_Error
==== Clean Up ==== ==== Clean Up ====
drop table t1; drop table t1;
create table t1(a int primary key);
insert into t1 values (1),(2);
delete from t1 where @@server_id=1;
Warnings:
Warning 1592 Statement is not safe to log in statement format.
set sql_mode=strict_trans_tables;
insert into t1 values (7), (8), (9);
[on slave]
select * from t1;
a
1
2
7
8
9
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
==== Clean Up ====
drop table t1;
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic # bug in this test: BUG#30594: rpl.rpl_skip_error is nondeterministic
source include/master-slave.inc; source include/master-slave.inc;
source include/have_binlog_format_mixed_or_statement.inc; source include/have_binlog_format_statement.inc;
--echo ==== Test Without sql_mode=strict_trans_tables ==== --echo ==== Test Without sql_mode=strict_trans_tables ====
...@@ -37,11 +37,22 @@ insert into t1 values (1); ...@@ -37,11 +37,22 @@ insert into t1 values (1);
# These should work fine # These should work fine
insert into t1 values (2),(3); insert into t1 values (2),(3);
save_master_pos; sync_slave_with_master;
connection slave; --echo [on slave]
sync_with_master; select * from t1 order by n;
select * from t1;
--echo ==== Test With sql_mode=strict_trans_tables ====
insert into t1 values (7),(8);
--echo [on master]
connection master;
set sql_mode=strict_trans_tables;
insert into t1 values (7), (8), (9);
--echo [on slave]
sync_slave_with_master;
select * from t1 order by n;
source include/show_slave_status2.inc;
--echo ==== Clean Up ====
connection master; connection master;
drop table t1; drop table t1;
sync_slave_with_master; sync_slave_with_master;
......
...@@ -615,7 +615,7 @@ int Relay_log_info::wait_for_pos(THD* thd, String* log_name, ...@@ -615,7 +615,7 @@ int Relay_log_info::wait_for_pos(THD* thd, String* log_name,
DBUG_ENTER("Relay_log_info::wait_for_pos"); DBUG_ENTER("Relay_log_info::wait_for_pos");
if (!inited) if (!inited)
DBUG_RETURN(-1); DBUG_RETURN(-2);
DBUG_PRINT("enter",("log_name: '%s' log_pos: %lu timeout: %lu", DBUG_PRINT("enter",("log_name: '%s' log_pos: %lu timeout: %lu",
log_name->c_ptr(), (ulong) log_pos, (ulong) timeout)); log_name->c_ptr(), (ulong) log_pos, (ulong) timeout));
......
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