summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorAnnamalai Gurusami <annamalai.gurusami@oracle.com>2012-10-08 19:40:30 +0530
committerAnnamalai Gurusami <annamalai.gurusami@oracle.com>2012-10-08 19:40:30 +0530
commit378a7d1ef5e60884d21f3e4059aad29d0e4dcefa (patch)
treef4b66e0e1aa0556afbaf7190a833dc54c0792585 /mysql-test/suite
parent52a4ef95e87af8d85f5682e9e643e563d41169c4 (diff)
downloadmariadb-git-378a7d1ef5e60884d21f3e4059aad29d0e4dcefa.tar.gz
Bug #14036214 MYSQLD CRASHES WHEN EXECUTING UPDATE IN TRX WITH
CONSISTENT SNAPSHOT OPTION A transaction is started with a consistent snapshot. After the transaction is started new indexes are added to the table. Now when we issue an update statement, the optimizer chooses an index. When the index scan is being initialized via ha_innobase::change_active_index(), InnoDB reports the error code HA_ERR_TABLE_DEF_CHANGED, with message stating that "insufficient history for index". This error message is propagated up to the SQL layer. But the my_error() api is never called. The statement level diagnostics area is not updated with the correct error status (it remains in Diagnostics_area::DA_EMPTY). Hence the following check in the Protocol::end_statement() fails. 516 case Diagnostics_area::DA_EMPTY: 517 default: 518 DBUG_ASSERT(0); 519 error= send_ok(thd->server_status, 0, 0, 0, NULL); 520 break; The fix is to backport the fix of bugs 14365043, 11761652 and 11746399. 14365043 PROTOCOL::END_STATEMENT(): ASSERTION `0' FAILED 11761652 HA_RND_INIT() RESULT CODE NOT CHECKED 11746399 RETURN VALUES OF HA_INDEX_INIT() AND INDEX_INIT() IGNORED rb://1227 approved by guilhem and mattiasj.
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/innodb/r/innodb_corrupt_bit.result8
-rw-r--r--mysql-test/suite/innodb/t/innodb_corrupt_bit.test6
2 files changed, 7 insertions, 7 deletions
diff --git a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
index c88e1ed2504..7e8792bb5b4 100644
--- a/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
+++ b/mysql-test/suite/innodb/r/innodb_corrupt_bit.result
@@ -40,13 +40,13 @@ test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxā" is co
test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxē" is corrupted.
test.corrupt_bit_test_ā check error Corrupt
select c from corrupt_bit_test_ā;
-ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
+ERROR HY000: Index corrupt_bit_test_ā is corrupted
select z from corrupt_bit_test_ā;
-ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
+ERROR HY000: Index corrupt_bit_test_ā is corrupted
show warnings;
Level Code Message
Warning 179 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted
-Error 1034 Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
+Error 1712 Index corrupt_bit_test_ā is corrupted
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
select * from corrupt_bit_test_ā use index(primary) where a = 10001;
a b c z
@@ -63,7 +63,7 @@ test.corrupt_bit_test_ā check Warning InnoDB: Index "idxē" is marked as corrup
test.corrupt_bit_test_ā check error Corrupt
set names utf8;
select z from corrupt_bit_test_ā;
-ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
+ERROR HY000: Index corrupt_bit_test_ā is corrupted
drop index idxē on corrupt_bit_test_ā;
select z from corrupt_bit_test_ā limit 10;
z
diff --git a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
index 7c4ea00afec..b8d19ddfcee 100644
--- a/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
+++ b/mysql-test/suite/innodb/t/innodb_corrupt_bit.test
@@ -79,10 +79,10 @@ CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
check table corrupt_bit_test_ā;
# This selection intend to use the corrupted index. Expect to fail
--- error ER_NOT_KEYFILE
+-- error ER_INDEX_CORRUPT
select c from corrupt_bit_test_ā;
--- error ER_NOT_KEYFILE
+-- error ER_INDEX_CORRUPT
select z from corrupt_bit_test_ā;
show warnings;
@@ -108,7 +108,7 @@ check table corrupt_bit_test_ā;
set names utf8;
--- error ER_NOT_KEYFILE
+-- error ER_INDEX_CORRUPT
select z from corrupt_bit_test_ā;
# Drop the corrupted index