Commit 923d34a9 authored by Sergey Vojtovich's avatar Sergey Vojtovich

Applying InnoDB snapshot

Detailed revision comments:

r6800 | marko | 2010-03-11 12:02:57 +0200 (Thu, 11 Mar 2010) | 1 line
branches/zip: Add ut_ad(mtr->state == MTR_ACTIVE) to various places.
parent eb450e18
# #
# Bug#44571 InnoDB Plugin crashes on ADD INDEX # Bug#44571 InnoDB Plugin crashes on ADD INDEX
# http://bugs.mysql.com/44571 # http://bugs.mysql.com/44571
# Please also refer to related fix in
# http://bugs.mysql.com/47621
# #
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc -- source suite/innodb/include/have_innodb_plugin.inc
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB; CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB;
ALTER TABLE bug44571 CHANGE foo bar INT; ALTER TABLE bug44571 CHANGE foo bar INT;
# Create index with the old column name will fail,
# because the CHANGE foo bar is successful. And
# the column name change would communicate to
# InnoDB with the fix from bug #47621
-- error ER_KEY_COLUMN_DOES_NOT_EXITS -- error ER_KEY_COLUMN_DOES_NOT_EXITS
ALTER TABLE bug44571 ADD INDEX bug44571b (foo); ALTER TABLE bug44571 ADD INDEX bug44571b (foo);
# The following will fail, because the CHANGE foo bar was # The following create indexes should succeed,
# not communicated to InnoDB. # indirectly confirm the CHANGE foo bar is successful.
--error ER_NOT_KEYFILE ALTER TABLE bug44571 ADD INDEX bug44571c (bar);
ALTER TABLE bug44571 ADD INDEX bug44571b (bar); DROP INDEX bug44571c ON bug44571;
--error ER_NOT_KEYFILE CREATE INDEX bug44571c ON bug44571 (bar);
CREATE INDEX bug44571b ON bug44571 (bar);
DROP TABLE bug44571; DROP TABLE bug44571;
...@@ -219,6 +219,9 @@ btr_pcur_restore_position_func( ...@@ -219,6 +219,9 @@ btr_pcur_restore_position_func(
ulint old_mode; ulint old_mode;
mem_heap_t* heap; mem_heap_t* heap;
ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor)); index = btr_cur_get_index(btr_pcur_get_btr_cur(cursor));
if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED) if (UNIV_UNLIKELY(cursor->old_stored != BTR_PCUR_OLD_STORED)
......
...@@ -2041,6 +2041,7 @@ buf_page_get_gen( ...@@ -2041,6 +2041,7 @@ buf_page_get_gen(
ulint retries = 0; ulint retries = 0;
ut_ad(mtr); ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad((rw_latch == RW_S_LATCH) ut_ad((rw_latch == RW_S_LATCH)
|| (rw_latch == RW_X_LATCH) || (rw_latch == RW_X_LATCH)
|| (rw_latch == RW_NO_LATCH)); || (rw_latch == RW_NO_LATCH));
...@@ -2397,7 +2398,9 @@ buf_page_optimistic_get( ...@@ -2397,7 +2398,9 @@ buf_page_optimistic_get(
ibool success; ibool success;
ulint fix_type; ulint fix_type;
ut_ad(mtr && block); ut_ad(block);
ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH)); ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH));
mutex_enter(&block->mutex); mutex_enter(&block->mutex);
...@@ -2509,6 +2512,7 @@ buf_page_get_known_nowait( ...@@ -2509,6 +2512,7 @@ buf_page_get_known_nowait(
ulint fix_type; ulint fix_type;
ut_ad(mtr); ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH)); ut_ad((rw_latch == RW_S_LATCH) || (rw_latch == RW_X_LATCH));
mutex_enter(&block->mutex); mutex_enter(&block->mutex);
...@@ -2608,6 +2612,9 @@ buf_page_try_get_func( ...@@ -2608,6 +2612,9 @@ buf_page_try_get_func(
ibool success; ibool success;
ulint fix_type; ulint fix_type;
ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
buf_pool_mutex_enter(); buf_pool_mutex_enter();
block = buf_block_hash_get(space_id, page_no); block = buf_block_hash_get(space_id, page_no);
...@@ -2981,6 +2988,7 @@ buf_page_create( ...@@ -2981,6 +2988,7 @@ buf_page_create(
ulint time_ms = ut_time_ms(); ulint time_ms = ut_time_ms();
ut_ad(mtr); ut_ad(mtr);
ut_ad(mtr->state == MTR_ACTIVE);
ut_ad(space || !zip_size); ut_ad(space || !zip_size);
free_block = buf_LRU_get_free_block(0); free_block = buf_LRU_get_free_block(0);
......
...@@ -70,6 +70,7 @@ mtr_memo_push( ...@@ -70,6 +70,7 @@ mtr_memo_push(
ut_ad(type <= MTR_MEMO_X_LOCK); ut_ad(type <= MTR_MEMO_X_LOCK);
ut_ad(mtr); ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE);
memo = &(mtr->memo); memo = &(mtr->memo);
...@@ -92,6 +93,7 @@ mtr_set_savepoint( ...@@ -92,6 +93,7 @@ mtr_set_savepoint(
ut_ad(mtr); ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE);
memo = &(mtr->memo); memo = &(mtr->memo);
...@@ -149,6 +151,7 @@ mtr_memo_contains( ...@@ -149,6 +151,7 @@ mtr_memo_contains(
ut_ad(mtr); ut_ad(mtr);
ut_ad(mtr->magic_n == MTR_MAGIC_N); ut_ad(mtr->magic_n == MTR_MAGIC_N);
ut_ad(mtr->state == MTR_ACTIVE);
memo = &(mtr->memo); memo = &(mtr->memo);
......
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