diff options
author | Michael Widenius <monty@askmonty.org> | 2009-02-19 11:01:25 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2009-02-19 11:01:25 +0200 |
commit | 945fa0d913a65c447306e945c44f50828903445b (patch) | |
tree | 5178630451a60c8da965c19e0c339eb4f629de2f /sql/log.cc | |
parent | 8526274c21ce0fd7eedac5275cb210cd2b048dc5 (diff) | |
parent | 6a1bc662d67cdb7716480654ddd63d504508b4fa (diff) | |
download | mariadb-git-945fa0d913a65c447306e945c44f50828903445b.tar.gz |
Merge with mysql-maria tree
mysql-test/t/variables.test:
Reset delay_key_write, otherwise maria.maria test may fail
sql/set_var.cc:
Reset ha_open_options if one resets the delay_key_write variable.
Before there was no way to reset it without restarting mysqld, which caused some tests to fail
Diffstat (limited to 'sql/log.cc')
-rw-r--r-- | sql/log.cc | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/sql/log.cc b/sql/log.cc index 91fe42b4412..73f8b0d8157 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -1495,12 +1495,19 @@ static int binlog_commit(handlerton *hton, THD *thd, bool all) YESNO(in_transaction), YESNO(thd->transaction.all.modified_non_trans_table), YESNO(thd->transaction.stmt.modified_non_trans_table))); - if (!in_transaction || all) + if (thd->options & OPTION_BIN_LOG) { - Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE); - qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) - error= binlog_end_trans(thd, trx_data, &qev, all); - goto end; + if (!in_transaction || all) + { + Query_log_event qev(thd, STRING_WITH_LEN("COMMIT"), TRUE, FALSE); + qev.error_code= 0; // see comment in MYSQL_LOG::write(THD, IO_CACHE) + error= binlog_end_trans(thd, trx_data, &qev, all); + goto end; + } + } + else + { + trx_data->reset(); } end: |