summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormats@capulet.kindahl.net <>2008-01-09 12:55:04 +0100
committermats@capulet.kindahl.net <>2008-01-09 12:55:04 +0100
commit6e94fb84aeeda53878bcd78d6b94cd51d1721e1f (patch)
treeb0d276d860754c638fd1940c2b32c1ab1cb563b9
parent6a5e4e3f71f43a9b684c638229a13424fb003083 (diff)
downloadmariadb-git-6e94fb84aeeda53878bcd78d6b94cd51d1721e1f.tar.gz
Post-merge fixes to make tests pass.
-rw-r--r--mysql-test/r/binlog_start_comment.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_timezone.result38
-rw-r--r--mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result4
-rw-r--r--mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test5
-rw-r--r--mysql-test/t/binlog_start_comment.test2
-rw-r--r--sql/log_event.cc6
-rw-r--r--sql/log_event_old.cc33
9 files changed, 32 insertions, 65 deletions
diff --git a/mysql-test/r/binlog_start_comment.result b/mysql-test/r/binlog_start_comment.result
index 615c8ce695b..3d32b23ef78 100644
--- a/mysql-test/r/binlog_start_comment.result
+++ b/mysql-test/r/binlog_start_comment.result
@@ -11,3 +11,4 @@ flush logs;
select * from t2;
word
Ada
+drop table t1,t2;
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
index 14a4d52e3e9..5fcbb96842d 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result
@@ -125,7 +125,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
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
Exec_Master_Log_Pos #
Relay_Log_Space #
@@ -143,7 +143,7 @@ Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
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;
START SLAVE;
INSERT INTO t9 VALUES (2);
diff --git a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
index 209388ed391..5d3c33340f0 100644
--- a/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result
@@ -125,7 +125,7 @@ Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
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
Exec_Master_Log_Pos #
Relay_Log_Space #
@@ -143,7 +143,7 @@ Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
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;
START SLAVE;
INSERT INTO t9 VALUES (2);
diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result
index c9d047559f8..cd71dbe628e 100644
--- a/mysql-test/suite/rpl/r/rpl_timezone.result
+++ b/mysql-test/suite/rpl/r/rpl_timezone.result
@@ -40,44 +40,6 @@ SELECT * FROM t1 ORDER BY n;
t n
2004-01-01 00:00:00 5
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;
set time_zone='UTC';
load data infile '../std_data_ln/rpl_timezone2.dat' into table t1;
diff --git a/mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result b/mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result
index b7479552eab..e89985f6b11 100644
--- a/mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result
+++ b/mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result
@@ -101,7 +101,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
-Read_Master_Log_Pos 1740
+Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
@@ -116,7 +116,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
-Exec_Master_Log_Pos 1579
+Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
diff --git a/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test b/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test
index 16870720e8c..aefc1402c40 100644
--- a/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test
+++ b/mysql-test/suite/rpl_ndb/t/rpl_ndb_transaction.test
@@ -7,7 +7,6 @@
source include/ndb_master-slave.inc;
source include/have_ndb.inc;
-
CREATE TABLE tmyisam (a int) ENGINE = MYISAM;
CREATE TABLE tinnodb (a int) ENGINE = INNODB;
CREATE TABLE tndb (a int) ENGINE = NDB;
@@ -111,7 +110,9 @@ SELECT * FROM tinnodb ORDER BY a;
--connection slave
--sleep 3
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
SELECT * FROM tinnodb ORDER BY a;
diff --git a/mysql-test/t/binlog_start_comment.test b/mysql-test/t/binlog_start_comment.test
index fe04af6077e..e59d734a1be 100644
--- a/mysql-test/t/binlog_start_comment.test
+++ b/mysql-test/t/binlog_start_comment.test
@@ -14,3 +14,5 @@ select * from t2;
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL
flush logs;
select * from t2;
+
+drop table t1,t2;
diff --git a/sql/log_event.cc b/sql/log_event.cc
index c78c0d0862a..a8099e9db8a 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -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 *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;"
"%s%s handler error %s; "
"the event's master log %s, end_log_pos %lu",
type, table->s->db.str,
table->s->table_name.str,
- thd->net.last_error[0] != 0 ? thd->net.last_error : "",
- thd->net.last_error[0] != 0 ? ";" : "",
+ thd->net.client_last_error[0] != 0 ? thd->net.client_last_error : "",
+ thd->net.client_last_error[0] != 0 ? ";" : "",
handler_error == NULL? "<unknown>" : handler_error,
log_name, pos);
}
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index 5091d5a5107..7621bdc6291 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -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
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,
"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"),
get_type_str());
thd->is_fatal_error= 1;
@@ -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
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,
"Error '%s' on reopening tables",
- (actual_error ? thd->net.last_error :
+ (actual_error ? thd->net.client_last_error :
"unexpected success or fatal error"));
thd->is_slave_error= 1;
}
@@ -1729,10 +1729,10 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
break;
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",
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;
break;
}
@@ -1779,12 +1779,12 @@ int Old_rows_log_event::do_apply_event(Relay_log_info const *rli)
if (error)
{ /* 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 "
"on table %s.%s. %s",
get_type_str(), table->s->db.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
@@ -1909,12 +1909,13 @@ Old_rows_log_event::do_update_pos(Relay_log_info *rli)
rli->stmt_done(log_pos, when);
/*
- Clear any errors pushed in thd->net.last_err* if for example "no key
- found" (as this is allowed). This is a safety measure; apparently
- those errors (e.g. when executing a Delete_rows_log_event_old of a
- non-existing row, like in rpl_row_mystery22.test,
- thd->net.last_error = "Can't find record in 't1'" and last_errno=1032)
- do not become visible. We still prefer to wipe them out.
+ Clear any errors pushed in thd->net.client_last_err* if for
+ example "no key found" (as this is allowed). This is a safety
+ measure; apparently those errors (e.g. when executing a
+ Delete_rows_log_event_old of a non-existing row, like in
+ rpl_row_mystery22.test, thd->net.client_last_error = "Can't
+ find record in 't1'" and last_errno=1032) do not become
+ visible. We still prefer to wipe them out.
*/
thd->clear_error();
}
@@ -2646,8 +2647,8 @@ Write_rows_log_event_old::do_exec_row(const Relay_log_info *const rli)
DBUG_ASSERT(m_table != NULL);
int error= write_row(rli, TRUE /* overwrite */);
- if (error && !thd->net.last_errno)
- thd->net.last_errno= error;
+ if (error && !thd->net.client_last_errno)
+ thd->net.client_last_errno= error;
return error;
}