diff options
author | unknown <ibabaev@bk-internal.mysql.com> | 2007-06-02 00:57:25 +0200 |
---|---|---|
committer | unknown <ibabaev@bk-internal.mysql.com> | 2007-06-02 00:57:25 +0200 |
commit | bcfe3d30151b7ccec9ea4222a517e77af594e229 (patch) | |
tree | 5339c6747631cb919dd972d0b8a25a0958bceba5 /sql/sql_update.cc | |
parent | 1b4234e43cece93593558bda32ec84622028168e (diff) | |
parent | 75485dc3498596b53d3e0eb04e6f4fe101996908 (diff) | |
download | mariadb-git-bcfe3d30151b7ccec9ea4222a517e77af594e229.tar.gz |
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
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 314f67c79c5..8be495fd0fb 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -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); |