summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-26 14:51:48 +0200
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-11-26 14:51:48 +0200
commitdb8bd7beb83e513870b16ea95381018a48a4079d (patch)
treec48ad0e6cae3c6805e0e56810c191edf4210919f /storage
parent01e0be66ddb4e404ab7ae1e218996d57655635ed (diff)
parentb7e69aef10867289cfd09f3fa8ed41c296ca8647 (diff)
downloadmariadb-git-db8bd7beb83e513870b16ea95381018a48a4079d.tar.gz
merge
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/row/row0mysql.c1
-rw-r--r--storage/innodb_plugin/ChangeLog11
-rw-r--r--storage/innodb_plugin/row/row0mysql.c14
3 files changed, 18 insertions, 8 deletions
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
index 8b770229c16..4fdd92c7cba 100644
--- a/storage/innobase/row/row0mysql.c
+++ b/storage/innobase/row/row0mysql.c
@@ -1981,6 +1981,7 @@ row_create_table_for_mysql(
table already exists */
trx->error_state = DB_SUCCESS;
+ dict_mem_table_free(table);
}
que_graph_free((que_t*) que_node_get_parent(thr));
diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog
index 9990939c0af..5ca60eb73d5 100644
--- a/storage/innodb_plugin/ChangeLog
+++ b/storage/innodb_plugin/ChangeLog
@@ -86,10 +86,17 @@
Fix Bug #57345 btr_pcur_store_position abort for load with
concurrent lock/unlock tables
+2010-10-11 The InnoDB Team
+
+ * row/row0mysql.c, innodb_bug56947.result, innodb_bug56947.test:
+ Fix Bug #56947 InnoDB leaks memory when failing to create a table
+
2010-10-06 The InnoDB Team
+
* row/row0mysql.c, innodb_bug57255.result, innodb_bug57255.test
- Fix Bug #Cascade Delete results in "Got error -1 from storage engine"
-
+ Fix Bug #57255 Cascade Delete results in "Got error -1 from
+ storage engine"
+
2010-09-27 The InnoDB Team
* row/row0sel.c, innodb_bug56716.result, innodb_bug56716.test:
diff --git a/storage/innodb_plugin/row/row0mysql.c b/storage/innodb_plugin/row/row0mysql.c
index 2165ead5f71..fa89f0c0f25 100644
--- a/storage/innodb_plugin/row/row0mysql.c
+++ b/storage/innodb_plugin/row/row0mysql.c
@@ -1880,15 +1880,13 @@ err_exit:
err = trx->error_state;
- if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
+ switch (err) {
+ case DB_SUCCESS:
+ break;
+ case DB_OUT_OF_FILE_SPACE:
trx->error_state = DB_SUCCESS;
trx_general_rollback_for_mysql(trx, NULL);
- /* TO DO: free table? The code below will dereference
- table->name, though. */
- }
- switch (err) {
- case DB_OUT_OF_FILE_SPACE:
ut_print_timestamp(stderr);
fputs(" InnoDB: Warning: cannot create table ",
stderr);
@@ -1903,9 +1901,13 @@ err_exit:
break;
case DB_DUPLICATE_KEY:
+ default:
/* We may also get err == DB_ERROR if the .ibd file for the
table already exists */
+ trx->error_state = DB_SUCCESS;
+ trx_general_rollback_for_mysql(trx, NULL);
+ dict_mem_table_free(table);
break;
}