Commit e361d448 authored by Timothy Smith's avatar Timothy Smith

Completing snapshot innodb-5.1-ss2438, part 2. Fixes

Bug #36169: create innodb compressed table with too large row size crashed


Revision comments:

r2422 | vasil | 2008-04-24 16:00:30 +0300 (Thu, 24 Apr 2008) | 11 lines
branches/5.1:

Fix Bug#36169 create innodb compressed table with too large row size crashed

Sometimes it is possible that
row_drop_table_for_mysql(index->table_name, trx, FALSE); is invoked in
row_create_index_for_mysql() when the index object is freed so copy the
table name to a safe place beforehand and use the copy.

Approved by:	Sunny
parent 040f3e9e
...@@ -1963,6 +1963,7 @@ row_create_index_for_mysql( ...@@ -1963,6 +1963,7 @@ row_create_index_for_mysql(
ulint err; ulint err;
ulint i, j; ulint i, j;
ulint len; ulint len;
char* table_name;
#ifdef UNIV_SYNC_DEBUG #ifdef UNIV_SYNC_DEBUG
ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX));
...@@ -1972,6 +1973,11 @@ row_create_index_for_mysql( ...@@ -1972,6 +1973,11 @@ row_create_index_for_mysql(
trx->op_info = "creating index"; trx->op_info = "creating index";
/* Copy the table name because we may want to drop the
table later, after the index object is freed (inside
que_run_threads()) and thus index->table_name is not available. */
table_name = mem_strdup(index->table_name);
trx_start_if_not_started(trx); trx_start_if_not_started(trx);
/* Check that the same column does not appear twice in the index. /* Check that the same column does not appear twice in the index.
...@@ -2044,13 +2050,15 @@ error_handling: ...@@ -2044,13 +2050,15 @@ error_handling:
trx_general_rollback_for_mysql(trx, FALSE, NULL); trx_general_rollback_for_mysql(trx, FALSE, NULL);
row_drop_table_for_mysql(index->table_name, trx, FALSE); row_drop_table_for_mysql(table_name, trx, FALSE);
trx->error_state = DB_SUCCESS; trx->error_state = DB_SUCCESS;
} }
trx->op_info = ""; trx->op_info = "";
mem_free(table_name);
return((int) err); return((int) err);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment