mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge bk-internal.mysql.com:/data0/bk/mysql-5.0
into bk-internal.mysql.com:/data0/bk/mysql-5.0-opt mysql-test/r/sp.result: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/t/subselect3.test: Auto merged sql/mysqld.cc: Auto merged sql/sp_head.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_table.cc: Auto merged sql/sql_update.cc: Auto merged sql/sql_view.cc: Manual merge
This commit is contained in:
@@ -521,6 +521,37 @@ int mysql_update(THD *thd,
|
||||
table->file->unlock_row();
|
||||
thd->row_count++;
|
||||
}
|
||||
|
||||
/*
|
||||
todo bug#27571: to avoid asynchronization of `error' and
|
||||
`error_code' of binlog event constructor
|
||||
|
||||
The concept, which is a bit different for insert(!), is to
|
||||
replace `error' assignment with the following lines
|
||||
|
||||
killed_status= thd->killed; // get the status of the volatile
|
||||
|
||||
Notice: thd->killed is type of "state" whereas the lhs has
|
||||
"status" the suffix which translates according to WordNet: a state
|
||||
at a particular time - at the time of the end of per-row loop in
|
||||
our case. Binlogging ops are conducted with the status.
|
||||
|
||||
error= (killed_status == THD::NOT_KILLED)? error : 1;
|
||||
|
||||
which applies to most mysql_$query functions.
|
||||
Event's constructor will accept `killed_status' as an argument:
|
||||
|
||||
Query_log_event qinfo(..., killed_status);
|
||||
|
||||
thd->killed might be changed after killed_status had got cached and this
|
||||
won't affect binlogging event but other effects remain.
|
||||
|
||||
Open issue: In a case the error happened not because of KILLED -
|
||||
and then KILLED was caught later still within the loop - we shall
|
||||
do something to avoid binlogging of incorrect ER_SERVER_SHUTDOWN
|
||||
error_code.
|
||||
*/
|
||||
|
||||
if (thd->killed && !error)
|
||||
error= 1; // Aborted
|
||||
end_read_record(&info);
|
||||
|
Reference in New Issue
Block a user