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 /storage | |
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 'storage')
-rw-r--r-- | storage/tokudb/mysql-test/tokudb_mariadb/r/create_or_replace.result | 9 | ||||
-rw-r--r-- | storage/tokudb/mysql-test/tokudb_mariadb/t/create_or_replace.test | 20 |
2 files changed, 29 insertions, 0 deletions
diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/create_or_replace.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/create_or_replace.result new file mode 100644 index 00000000000..7d7c6026154 --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/create_or_replace.result @@ -0,0 +1,9 @@ +drop table if exists t1,t2,t3; +CREATE TABLE t1 (a INT) engine=myisam; +CREATE TABLE t2 (a INT) ENGINE=TokuDB; +CREATE OR REPLACE TABLE t3 AS SELECT * FROM t2; +CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2; +lock table t1 write,t2 read; +CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2; +unlock tables; +drop table t1,t2,t3; diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/create_or_replace.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/create_or_replace.test new file mode 100644 index 00000000000..30553e7d38e --- /dev/null +++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/create_or_replace.test @@ -0,0 +1,20 @@ +# +# Test's for CREATE OR REPLACE with tokudb +# + +--disable_warnings +drop table if exists t1,t2,t3; +--enable_warnings + +# +# MDEV-5930 Server crashes in thd_get_ha_data on CREATE OR REPLACE TABLE +# + +CREATE TABLE t1 (a INT) engine=myisam; +CREATE TABLE t2 (a INT) ENGINE=TokuDB; +CREATE OR REPLACE TABLE t3 AS SELECT * FROM t2; +CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2; +lock table t1 write,t2 read; +CREATE OR REPLACE TABLE t1 AS SELECT * FROM t2; +unlock tables; +drop table t1,t2,t3; |