summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@oracle.com>2010-10-11 11:18:00 +0300
committerMarko Mäkelä <marko.makela@oracle.com>2010-10-11 11:18:00 +0300
commita8da1a3a581a3572edf165ffe1076b0194195a18 (patch)
tree2289138fad80aeba7f90f31c85c89a3f235efe76 /mysql-test
parentdf29195345758a35a2968e85f03cc1e2a0870d76 (diff)
downloadmariadb-git-a8da1a3a581a3572edf165ffe1076b0194195a18.tar.gz
Bug #56947 InnoDB leaks memory when failing to create a table
row_create_table_for_mysql(): When the table creation fails, free the dict_table_t object.
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/suite/innodb_plugin/r/innodb_bug56947.result6
-rw-r--r--mysql-test/suite/innodb_plugin/t/innodb_bug56947.test11
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_plugin/r/innodb_bug56947.result b/mysql-test/suite/innodb_plugin/r/innodb_bug56947.result
new file mode 100644
index 00000000000..42101a46a5b
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/r/innodb_bug56947.result
@@ -0,0 +1,6 @@
+create table bug56947(a int not null) engine = innodb;
+CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
+alter table bug56947 add unique index (a);
+ERROR HY000: Table 'test.bug56947#1' already exists
+drop table `bug56947#1`;
+drop table bug56947;
diff --git a/mysql-test/suite/innodb_plugin/t/innodb_bug56947.test b/mysql-test/suite/innodb_plugin/t/innodb_bug56947.test
new file mode 100644
index 00000000000..88544387567
--- /dev/null
+++ b/mysql-test/suite/innodb_plugin/t/innodb_bug56947.test
@@ -0,0 +1,11 @@
+#
+# Bug #56947 valgrind reports a memory leak in innodb-plugin.innodb-index
+#
+-- source include/have_innodb_plugin.inc
+
+create table bug56947(a int not null) engine = innodb;
+CREATE TABLE `bug56947#1`(a int) ENGINE=InnoDB;
+--error 156
+alter table bug56947 add unique index (a);
+drop table `bug56947#1`;
+drop table bug56947;