diff options
author | Timothy Smith <timothy.smith@sun.com> | 2008-12-14 13:00:37 -0700 |
---|---|---|
committer | Timothy Smith <timothy.smith@sun.com> | 2008-12-14 13:00:37 -0700 |
commit | fe769c968eac80cae884e3b59b531df5f46ed346 (patch) | |
tree | 2bb067719236af430123066e7f001d6aaaddc5e5 /storage/innobase/row | |
parent | e4591eb25b6ad5b0a3a571c3e415df049a8e37f0 (diff) | |
download | mariadb-git-fe769c968eac80cae884e3b59b531df5f46ed346.tar.gz |
Apply InnoDB snapshot innodb-5.1-ss2858, part 2. Fixes
Bug#38231: Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
branches/5.1:
Fix Bug#38231 Innodb crash in lock_reset_all_on_table() on TRUNCATE + LOCK / UNLOCK
In TRUNCATE TABLE and discard tablespace: do not remove table-level S
and X locks and do not assert on such locks not being wait locks.
Leave such locks alone.
Approved by: Heikki (rb://14)
Diffstat (limited to 'storage/innobase/row')
-rw-r--r-- | storage/innobase/row/row0mysql.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index f5228618a04..74bf2267a3e 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -2451,8 +2451,8 @@ row_discard_tablespace_for_mysql( new_id = dict_hdr_get_new_id(DICT_HDR_TABLE_ID); - /* Remove any locks there are on the table or its records */ - lock_reset_all_on_table(table); + /* Remove all locks except the table-level S and X locks. */ + lock_remove_all_on_table(table, FALSE); info = pars_info_create(); @@ -2787,9 +2787,8 @@ row_truncate_table_for_mysql( goto funct_exit; } - /* Remove any locks there are on the table or its records */ - - lock_reset_all_on_table(table); + /* Remove all locks except the table-level S and X locks. */ + lock_remove_all_on_table(table, FALSE); trx->table_id = table->id; @@ -3139,9 +3138,8 @@ check_next_foreign: goto funct_exit; } - /* Remove any locks there are on the table or its records */ - - lock_reset_all_on_table(table); + /* Remove all locks there are on the table or its records */ + lock_remove_all_on_table(table, TRUE); trx->dict_operation = TRUE; trx->table_id = table->id; |