summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-26 22:32:15 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-26 22:32:15 +0100
commit707dd6b9e937fea193c6981ce1b495c185310be4 (patch)
treef302a3b3dbb7efe01bffa615af8fe6d4048de96c /storage
parent97687f2888bc8c3ff009d3311dea5209e5cfc7de (diff)
downloadmariadb-git-707dd6b9e937fea193c6981ce1b495c185310be4.tar.gz
MDEV-5943 'show table status' does not immediately show tokudb tables
MDEV-5839 TokuDB tables not properly cleaned on DROP DATABASE TokuDB does not support discover_table_names() and writes no files in the database directory, so automatic filename-based discover_table_names() doesn't work either. So, it must force .frm file to disk in ::create()
Diffstat (limited to 'storage')
-rw-r--r--storage/tokudb/ha_tokudb.cc6
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/row_format_alter.result1
-rw-r--r--storage/tokudb/mysql-test/tokudb_mariadb/r/discover_names.result13
-rw-r--r--storage/tokudb/mysql-test/tokudb_mariadb/t/discover_names.test20
4 files changed, 40 insertions, 0 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index 8fa470f1973..32c5e580e78 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -6861,6 +6861,12 @@ int ha_tokudb::create(const char *name, TABLE * form, HA_CREATE_INFO * create_in
THD* thd = ha_thd();
memset(&kc_info, 0, sizeof(kc_info));
+ // TokuDB does not support discover_table_names() and writes no files
+ // in the database directory, so automatic filename-based
+ // discover_table_names() doesn't work either. So, it must force .frm
+ // file to disk.
+ form->s->write_frm_image();
+
trx = (tokudb_trx_data *) thd_data_get(ha_thd(), tokudb_hton->slot);
const srv_row_format_t row_type= (srv_row_format_t)form->s->option_struct->row_format;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/row_format_alter.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/row_format_alter.result
index 818440632f4..6057137da5b 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/row_format_alter.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/row_format_alter.result
@@ -5,6 +5,7 @@ CREATE TABLE foo (c1 int not null primary key) engine=TokuDB;
SELECT CREATE_OPTIONS
FROM INFORMATION_SCHEMA.TABLES WHERE (table_name LIKE 'foo');
CREATE_OPTIONS
+`compression`='tokudb_zlib'
SHOW CREATE TABLE foo;
Table Create Table
foo CREATE TABLE `foo` (
diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/r/discover_names.result b/storage/tokudb/mysql-test/tokudb_mariadb/r/discover_names.result
new file mode 100644
index 00000000000..466964621af
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_mariadb/r/discover_names.result
@@ -0,0 +1,13 @@
+create table t1 (id int primary key) engine=tokudb;
+show tables;
+Tables_in_test
+t1
+drop table t1;
+create database mysqltest1;
+use mysqltest1;
+create table t1 (a int) engine=tokudb;
+drop database mysqltest1;
+create database mysqltest1;
+use mysqltest1;
+create table t1 (a int) engine=tokudb;
+drop database mysqltest1;
diff --git a/storage/tokudb/mysql-test/tokudb_mariadb/t/discover_names.test b/storage/tokudb/mysql-test/tokudb_mariadb/t/discover_names.test
new file mode 100644
index 00000000000..25dba77a519
--- /dev/null
+++ b/storage/tokudb/mysql-test/tokudb_mariadb/t/discover_names.test
@@ -0,0 +1,20 @@
+#
+# MDEV-5943 'show table status' does not immediately show tokudb tables
+#
+create table t1 (id int primary key) engine=tokudb;
+show tables;
+drop table t1;
+
+#
+# MDEV-5839 TokuDB tables not properly cleaned on DROP DATABASE
+#
+create database mysqltest1;
+use mysqltest1;
+create table t1 (a int) engine=tokudb;
+drop database mysqltest1;
+
+create database mysqltest1;
+use mysqltest1;
+create table t1 (a int) engine=tokudb;
+drop database mysqltest1;
+