1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Merge lthalmann@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime

into  mysql.com:/nfsdisk1/lars/bk/mysql-5.1-new-rpl
This commit is contained in:
lars/lthalmann@dl145j.mysql.com
2007-05-31 10:23:37 +02:00
31 changed files with 1091 additions and 153 deletions

View File

@@ -621,6 +621,37 @@ int mysql_update(THD *thd,
thd->row_count++;
}
dup_key_found= 0;
/*
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
else if (will_batch &&