mirror of
https://github.com/MariaDB/server.git
synced 2026-04-24 17:25:31 +02:00
Rename: query_error -> is_slave_error.
Add comments. sql/ha_ndbcluster_binlog.cc: query_error -> slave_error sql/handler.cc: query_error -> slave_error sql/log.cc: query_error -> slave_error sql/log_event.cc: query_error -> slave_error sql/log_event_old.cc: query_error -> slave_error sql/mysqld.cc: query_error -> slave_error sql/protocol.cc: query_error -> slave_error sql/slave.cc: query_error -> slave_error sql/sp_head.cc: query_error -> slave_error sql/sql_class.cc: query_error -> slave_error sql/sql_class.h: Rename: query_error -> is_slave_error, to avoid confusion. Add commenta. sql/sql_connect.cc: Rename: query_error -> is_slave_error, to avoid confusion. Originally it was the same code to handle init-connect and init-slave mysqld options. Then init-connect implementation forked off, but the one who copy-pasted the code didn't change it to not use a replication-specific variable.
This commit is contained in:
parent
b0488a3203
commit
079ae23003
12 changed files with 63 additions and 50 deletions
|
|
@ -68,7 +68,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
|
|||
{
|
||||
if (!need_reopen)
|
||||
{
|
||||
if (thd->query_error || thd->is_fatal_error)
|
||||
if (thd->is_slave_error || thd->is_fatal_error)
|
||||
{
|
||||
/*
|
||||
Error reporting borrowed from Query_log_event with many excessive
|
||||
|
|
@ -112,7 +112,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
|
|||
uint tables_count= rli->tables_to_lock_count;
|
||||
if ((error= open_tables(thd, &tables, &tables_count, 0)))
|
||||
{
|
||||
if (thd->query_error || thd->is_fatal_error)
|
||||
if (thd->is_slave_error || thd->is_fatal_error)
|
||||
{
|
||||
/*
|
||||
Error reporting borrowed from Query_log_event with many excessive
|
||||
|
|
@ -123,7 +123,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
|
|||
"Error '%s' on reopening tables",
|
||||
(actual_error ? thd->net.last_error :
|
||||
"unexpected success or fatal error"));
|
||||
thd->query_error= 1;
|
||||
thd->is_slave_error= 1;
|
||||
}
|
||||
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
|
||||
DBUG_RETURN(error);
|
||||
|
|
@ -146,7 +146,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
|
|||
{
|
||||
mysql_unlock_tables(thd, thd->lock);
|
||||
thd->lock= 0;
|
||||
thd->query_error= 1;
|
||||
thd->is_slave_error= 1;
|
||||
const_cast<Relay_log_info*>(rli)->clear_tables_to_lock();
|
||||
DBUG_RETURN(Rows_log_event::ERR_BAD_TABLE_DEF);
|
||||
}
|
||||
|
|
@ -255,7 +255,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
|
|||
"Error in %s event: row application failed. %s",
|
||||
ev->get_type_str(),
|
||||
thd->net.last_error ? thd->net.last_error : "");
|
||||
thd->query_error= 1;
|
||||
thd->is_slave_error= 1;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ Old_rows_log_event::do_apply_event(Rows_log_event *ev, const Relay_log_info *rli
|
|||
*/
|
||||
thd->reset_current_stmt_binlog_row_based();
|
||||
const_cast<Relay_log_info*>(rli)->cleanup_context(thd, error);
|
||||
thd->query_error= 1;
|
||||
thd->is_slave_error= 1;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue