diff options
author | unknown <aelkin/elkin@andrepl.(none)> | 2007-03-23 17:12:58 +0200 |
---|---|---|
committer | unknown <aelkin/elkin@andrepl.(none)> | 2007-03-23 17:12:58 +0200 |
commit | 25dc1f57ec781fa21239b68a2a8954f362f18c8e (patch) | |
tree | 69b3937c478753aaf68e93fe328ccf451a4ab2f6 /sql/log.cc | |
parent | 420ef3ca7df89982e05968126e19b0dea0a51a43 (diff) | |
download | mariadb-git-25dc1f57ec781fa21239b68a2a8954f362f18c8e.tar.gz |
Bug #27395 OPTION_STATUS_NO_TRANS_UPDATE is not preserved at the end of SF()
thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit was not restored at the end of SF() invocation, where
SF() modified non-ta table.
As the result of this artifact it was not possible to detect whether there were any side-effects when
top-level query ends.
If the top level query table was not modified and the bit is lost there would be no binlogging.
Fixed with preserving the bit inside of thd->no_trans_update struct. The struct agregates two bool flags
telling whether the current query and the current transaction modified any non-ta table.
The flags stmt, all are dropped at the end of the query and the transaction.
mysql-test/r/sp_trans.result:
results will be changed once again after bug#23333 will be fixed.
mysql-test/t/sp_trans.test:
regression test added
sql/ha_ndbcluster.cc:
replacing thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit and bool thd->no_trans_update
with thd->no_trans_update as struct
sql/handler.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/log.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/set_var.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sp_head.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_class.h:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_delete.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_insert.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_load.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_parse.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_table.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
sql/sql_update.cc:
replacing operations with thd->options' OPTION_STATUS_NO_TRANS_UPDATE bit
with the member thd->no_trans_update.all;
converting thd->no_trans_update into struct of bools.
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/log.cc b/sql/log.cc index 7d0bef5ca2c..a0068dce1c5 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -162,7 +162,7 @@ static int binlog_rollback(THD *thd, bool all) table. Such cases should be rare (updating a non-transactional table inside a transaction...) */ - if (unlikely(thd->options & OPTION_STATUS_NO_TRANS_UPDATE)) + if (unlikely(thd->no_trans_update.all)) { Query_log_event qev(thd, STRING_WITH_LEN("ROLLBACK"), TRUE, FALSE); qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) @@ -217,7 +217,7 @@ static int binlog_savepoint_rollback(THD *thd, void *sv) non-transactional table. Otherwise, truncate the binlog cache starting from the SAVEPOINT command. */ - if (unlikely(thd->options & OPTION_STATUS_NO_TRANS_UPDATE)) + if (unlikely(thd->no_trans_update.all)) { Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE); DBUG_RETURN(mysql_bin_log.write(&qinfo)); |