Post-merge fixes to make tests pass.

parent 6a5e4e3f
...@@ -11,3 +11,4 @@ flush logs; ...@@ -11,3 +11,4 @@ flush logs;
select * from t2; select * from t2;
word word
Ada Ada
drop table t1,t2;
...@@ -125,7 +125,7 @@ Replicate_Ignore_Table ...@@ -125,7 +125,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1364 Last_Errno 1364
Last_Error Could not execute Write_rows event on table test.t1_nodef; handler error <unknown>; the event's master log master-bin.000001, end_log_pos 2674 Last_Error Field 'x' doesn't have a default value
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -143,7 +143,7 @@ Master_SSL_Verify_Server_Cert No ...@@ -143,7 +143,7 @@ Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0 Last_IO_Errno 0
Last_IO_Error Last_IO_Error
Last_SQL_Errno 1364 Last_SQL_Errno 1364
Last_SQL_Error Could not execute Write_rows event on table test.t1_nodef; handler error <unknown>; the event's master log master-bin.000001, end_log_pos 2674 Last_SQL_Error Field 'x' doesn't have a default value
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (2); INSERT INTO t9 VALUES (2);
......
...@@ -125,7 +125,7 @@ Replicate_Ignore_Table ...@@ -125,7 +125,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table Replicate_Wild_Ignore_Table
Last_Errno 1364 Last_Errno 1364
Last_Error Could not execute Write_rows event on table test.t1_nodef; handler error <unknown>; the event's master log master-bin.000001, end_log_pos 2944 Last_Error Field 'x' doesn't have a default value
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos # Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
...@@ -143,7 +143,7 @@ Master_SSL_Verify_Server_Cert No ...@@ -143,7 +143,7 @@ Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0 Last_IO_Errno 0
Last_IO_Error Last_IO_Error
Last_SQL_Errno 1364 Last_SQL_Errno 1364
Last_SQL_Error Could not execute Write_rows event on table test.t1_nodef; handler error <unknown>; the event's master log master-bin.000001, end_log_pos 2944 Last_SQL_Error Field 'x' doesn't have a default value
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE; START SLAVE;
INSERT INTO t9 VALUES (2); INSERT INTO t9 VALUES (2);
......
...@@ -40,44 +40,6 @@ SELECT * FROM t1 ORDER BY n; ...@@ -40,44 +40,6 @@ SELECT * FROM t1 ORDER BY n;
t n t n
2004-01-01 00:00:00 5 2004-01-01 00:00:00 5
2004-06-11 09:39:02 6 2004-06-11 09:39:02 6
select * from t1;
t
2004-01-01 00:00:00
2004-06-11 09:39:02
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use test/*!*/;
SET TIMESTAMP=100000000/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
create table t1 (t timestamp)
/*!*/;
SET TIMESTAMP=100000000/*!*/;
create table t2 (t char(32))
/*!*/;
SET TIMESTAMP=100000000/*!*/;
SET @@session.time_zone='Europe/Moscow'/*!*/;
insert into t1 values ('20050101000000'), ('20050611093902')
/*!*/;
SET TIMESTAMP=100000000/*!*/;
SET @@session.time_zone='UTC'/*!*/;
insert into t1 values ('20040101000000'), ('20040611093902')
/*!*/;
SET TIMESTAMP=100000000/*!*/;
delete from t1
/*!*/;
SET TIMESTAMP=100000000/*!*/;
SET @@session.time_zone='Europe/Moscow'/*!*/;
insert into t1 values ('20040101000000'), ('20040611093902')
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
delete from t1; delete from t1;
set time_zone='UTC'; set time_zone='UTC';
load data infile '../std_data_ln/rpl_timezone2.dat' into table t1; load data infile '../std_data_ln/rpl_timezone2.dat' into table t1;
......
...@@ -101,7 +101,7 @@ Master_User root ...@@ -101,7 +101,7 @@ Master_User root
Master_Port MASTER_PORT Master_Port MASTER_PORT
Connect_Retry 1 Connect_Retry 1
Master_Log_File master-bin.000001 Master_Log_File master-bin.000001
Read_Master_Log_Pos 1740 Read_Master_Log_Pos #
Relay_Log_File # Relay_Log_File #
Relay_Log_Pos # Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001 Relay_Master_Log_File master-bin.000001
...@@ -116,7 +116,7 @@ Replicate_Wild_Ignore_Table ...@@ -116,7 +116,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0 Last_Errno 0
Last_Error Last_Error
Skip_Counter 0 Skip_Counter 0
Exec_Master_Log_Pos 1579 Exec_Master_Log_Pos #
Relay_Log_Space # Relay_Log_Space #
Until_Condition None Until_Condition None
Until_Log_File Until_Log_File
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
source include/ndb_master-slave.inc; source include/ndb_master-slave.inc;
source include/have_ndb.inc; source include/have_ndb.inc;
CREATE TABLE tmyisam (a int) ENGINE = MYISAM; CREATE TABLE tmyisam (a int) ENGINE = MYISAM;
CREATE TABLE tinnodb (a int) ENGINE = INNODB; CREATE TABLE tinnodb (a int) ENGINE = INNODB;
CREATE TABLE tndb (a int) ENGINE = NDB; CREATE TABLE tndb (a int) ENGINE = NDB;
...@@ -111,7 +110,9 @@ SELECT * FROM tinnodb ORDER BY a; ...@@ -111,7 +110,9 @@ SELECT * FROM tinnodb ORDER BY a;
--connection slave --connection slave
--sleep 3 --sleep 3
STOP SLAVE; STOP SLAVE;
--source include/show_slave_status.inc --replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;
# the following statement should show that nothing has been replicated # the following statement should show that nothing has been replicated
SELECT * FROM tinnodb ORDER BY a; SELECT * FROM tinnodb ORDER BY a;
......
...@@ -14,3 +14,5 @@ select * from t2; ...@@ -14,3 +14,5 @@ select * from t2;
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL --exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL
flush logs; flush logs;
select * from t2; select * from t2;
drop table t1,t2;
...@@ -112,14 +112,14 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error, ...@@ -112,14 +112,14 @@ static void inline slave_rows_error_report(enum loglevel level, int ha_error,
const char *log_name, ulong pos) const char *log_name, ulong pos)
{ {
const char *handler_error= HA_ERR(ha_error); const char *handler_error= HA_ERR(ha_error);
rli->report(level, thd->net.last_errno, rli->report(level, thd->net.client_last_errno,
"Could not execute %s event on table %s.%s;" "Could not execute %s event on table %s.%s;"
"%s%s handler error %s; " "%s%s handler error %s; "
"the event's master log %s, end_log_pos %lu", "the event's master log %s, end_log_pos %lu",
type, table->s->db.str, type, table->s->db.str,
table->s->table_name.str, table->s->table_name.str,
thd->net.last_error[0] != 0 ? thd->net.last_error : "", thd->net.client_last_error[0] != 0 ? thd->net.client_last_error : "",
thd->net.last_error[0] != 0 ? ";" : "", thd->net.client_last_error[0] != 0 ? ";" : "",
handler_error == NULL? "<unknown>" : handler_error, handler_error == NULL? "<unknown>" : handler_error,
log_name, pos); log_name, pos);
} }
......
...@@ -1529,10 +1529,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) ...@@ -1529,10 +1529,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
Error reporting borrowed from Query_log_event with many excessive Error reporting borrowed from Query_log_event with many excessive
simplifications (we don't honour --slave-skip-errors) simplifications (we don't honour --slave-skip-errors)
*/ */
uint actual_error= thd->net.last_errno; uint actual_error= thd->net.client_last_errno;
rli->report(ERROR_LEVEL, actual_error, rli->report(ERROR_LEVEL, actual_error,
"Error '%s' in %s event: when locking tables", "Error '%s' in %s event: when locking tables",
(actual_error ? thd->net.last_error : (actual_error ? thd->net.client_last_error :
"unexpected success or fatal error"), "unexpected success or fatal error"),
get_type_str()); get_type_str());
thd->is_fatal_error= 1; thd->is_fatal_error= 1;
...@@ -1573,10 +1573,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) ...@@ -1573,10 +1573,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
Error reporting borrowed from Query_log_event with many excessive Error reporting borrowed from Query_log_event with many excessive
simplifications (we don't honour --slave-skip-errors) simplifications (we don't honour --slave-skip-errors)
*/ */
uint actual_error= thd->net.last_errno; uint actual_error= thd->net.client_last_errno;
rli->report(ERROR_LEVEL, actual_error, rli->report(ERROR_LEVEL, actual_error,
"Error '%s' on reopening tables", "Error '%s' on reopening tables",
(actual_error ? thd->net.last_error : (actual_error ? thd->net.client_last_error :
"unexpected success or fatal error")); "unexpected success or fatal error"));
thd->is_slave_error= 1; thd->is_slave_error= 1;
} }
...@@ -1729,10 +1729,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) ...@@ -1729,10 +1729,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
break; break;
default: default:
rli->report(ERROR_LEVEL, thd->net.last_errno, rli->report(ERROR_LEVEL, thd->net.client_last_errno,
"Error in %s event: row application failed. %s", "Error in %s event: row application failed. %s",
get_type_str(), get_type_str(),
thd->net.last_error ? thd->net.last_error : ""); thd->net.client_last_error ? thd->net.client_last_error : "");
thd->is_slave_error= 1; thd->is_slave_error= 1;
break; break;
} }
...@@ -1779,12 +1779,12 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli) ...@@ -1779,12 +1779,12 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
if (error) if (error)
{ /* error has occured during the transaction */ { /* error has occured during the transaction */
rli->report(ERROR_LEVEL, thd->net.last_errno, rli->report(ERROR_LEVEL, thd->net.client_last_errno,
"Error in %s event: error during transaction execution " "Error in %s event: error during transaction execution "
"on table %s.%s. %s", "on table %s.%s. %s",
get_type_str(), table->s->db.str, get_type_str(), table->s->db.str,
table->s->table_name.str, table->s->table_name.str,
thd->net.last_error ? thd->net.last_error : ""); thd->net.client_last_error ? thd->net.client_last_error : "");
/* /*
If one day we honour --skip-slave-errors in row-based replication, and If one day we honour --skip-slave-errors in row-based replication, and
...@@ -1909,12 +1909,13 @@ Old_rows_log_event::do_update_pos(Relay_log_info *rli) ...@@ -1909,12 +1909,13 @@ Old_rows_log_event::do_update_pos(Relay_log_info *rli)
rli->stmt_done(log_pos, when); rli->stmt_done(log_pos, when);
/* /*
Clear any errors pushed in thd->net.last_err* if for example "no key Clear any errors pushed in thd->net.client_last_err* if for
found" (as this is allowed). This is a safety measure; apparently example "no key found" (as this is allowed). This is a safety
those errors (e.g. when executing a Delete_rows_log_event_old of a measure; apparently those errors (e.g. when executing a
non-existing row, like in rpl_row_mystery22.test, Delete_rows_log_event_old of a non-existing row, like in
thd->net.last_error = "Can't find record in 't1'" and last_errno=1032) rpl_row_mystery22.test, thd->net.client_last_error = "Can't
do not become visible. We still prefer to wipe them out. find record in 't1'" and last_errno=1032) do not become
visible. We still prefer to wipe them out.
*/ */
thd->clear_error(); thd->clear_error();
} }
...@@ -2646,8 +2647,8 @@ Write_rows_log_event_old::do_exec_row(const Relay_log_info *const rli) ...@@ -2646,8 +2647,8 @@ Write_rows_log_event_old::do_exec_row(const Relay_log_info *const rli)
DBUG_ASSERT(m_table != NULL); DBUG_ASSERT(m_table != NULL);
int error= write_row(rli, TRUE /* overwrite */); int error= write_row(rli, TRUE /* overwrite */);
if (error && !thd->net.last_errno) if (error && !thd->net.client_last_errno)
thd->net.last_errno= error; thd->net.client_last_errno= error;
return error; return error;
} }
......
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