diff options
author | Michael Widenius <monty@mariadb.org> | 2014-03-23 18:39:10 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2014-03-23 18:39:10 +0200 |
commit | 9aac54687286b979c9469326f501a4b23aa5e4a3 (patch) | |
tree | dc701d68c87d99f06c1ef348cdad92c6b42df0fa /sql/log.cc | |
parent | 39e6083e35459c9c8b22d37aaa2b74545884c7b0 (diff) | |
download | mariadb-git-9aac54687286b979c9469326f501a4b23aa5e4a3.tar.gz |
MDEV-5930 Server crashes in thd_get_ha_data on CREATE OR REPLACE TABLE
mysql-test/r/create_or_replace.result:
More tests for create or replace
mysql-test/t/create_or_replace.test:
More tests for create or replace
sql/log.cc:
Don't use binlog_hton if binlog is not enabmed
sql/sql_base.cc:
We have to call restart_trans_for_tables also if tables where not locked with LOCK TABLES.
If not, we will get a crash in TokuDB
sql/sql_insert.cc:
Don't call binlog_reset_cache() if we don't have binary log open
sql/sql_table.cc:
Don't log to binary log if not open
Better test if we where using create or replace ... select
storage/tokudb/mysql-test/tokudb_mariadb/r/create_or_replace.result:
More tests for create or replace
storage/tokudb/mysql-test/tokudb_mariadb/t/create_or_replace.test:
More tests for create or replace
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 f000043f7c2..33f15100d67 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2049,8 +2049,8 @@ static int binlog_rollback(handlerton *hton, THD *thd, bool all) void binlog_reset_cache(THD *thd) { - binlog_cache_mngr *const cache_mngr= - (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton); + binlog_cache_mngr *const cache_mngr= opt_bin_log ? + (binlog_cache_mngr*) thd_get_ha_data(thd, binlog_hton) : 0; DBUG_ENTER("binlog_reset_cache"); if (cache_mngr) { |