mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 03:51:50 +01:00
branches/zip:
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
This commit is contained in:
parent
fd41c6a315
commit
a5b8b883c8
3 changed files with 1150 additions and 1 deletions
2
mysql-test/innodb_bug36169.result
Normal file
2
mysql-test/innodb_bug36169.result
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
SET GLOBAL innodb_file_format='Barracuda';
|
||||||
|
SET GLOBAL innodb_file_per_table=ON;
|
1139
mysql-test/innodb_bug36169.test
Normal file
1139
mysql-test/innodb_bug36169.test
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1909,6 +1909,7 @@ row_create_index_for_mysql(
|
||||||
ulint err;
|
ulint err;
|
||||||
ulint i;
|
ulint i;
|
||||||
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));
|
||||||
|
@ -1918,6 +1919,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.
|
||||||
|
@ -1991,13 +1997,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue