[Commits] 056145a3170: Fixed incorrect condition on dict_stats_update_transient()

jan jan.lindstrom at mariadb.com
Sun Mar 26 12:00:04 EEST 2017


revision-id: 056145a3170b44f1758263ce2172b0585c92e009 (mariadb-10.2.4-83-g056145a3170)
parent(s): 76b0c85f47347cf68f90f129cd9bdfaa24f4a241
author: Jan Lindström
committer: Jan Lindström
timestamp: 2017-03-26 11:59:28 +0300
message:

Fixed incorrect condition on dict_stats_update_transient()

function causing test failures. Fixed error code on innodb.innodb
test.

---
 .../encryption/r/innodb-bad-key-change.result      | 30 ++++++++++------------
 .../suite/encryption/t/innodb-bad-key-change.test  |  2 +-
 mysql-test/suite/innodb/r/innodb.result            |  2 +-
 .../suite/innodb/r/innodb_bug14147491.result       |  1 -
 mysql-test/suite/innodb/t/innodb.test              |  3 +--
 storage/innobase/dict/dict0stats.cc                |  4 +--
 6 files changed, 19 insertions(+), 23 deletions(-)

diff --git a/mysql-test/suite/encryption/r/innodb-bad-key-change.result b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
index c5e6340b833..aadae4b6531 100644
--- a/mysql-test/suite/encryption/r/innodb-bad-key-change.result
+++ b/mysql-test/suite/encryption/r/innodb-bad-key-change.result
@@ -29,8 +29,8 @@ SELECT * FROM t1;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
 Level	Code	Message
-Warning	192	Table test/t1 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
-Warning	192	Table test/t1 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
+Warning	192	Table test/t1 in tablespace  is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
+Warning	192	Table test/t1 is encrypted but encryption service or used key_id 2 is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 DROP TABLE t1;
 SHOW WARNINGS;
@@ -45,13 +45,14 @@ SELECT * FROM t2;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
 Level	Code	Message
-Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
+Warning	192	Table test/t2 in tablespace  is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SELECT * FROM t2 where id = 1;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
 Level	Code	Message
+Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SELECT * FROM t2 where b = 1;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
@@ -60,10 +61,10 @@ Level	Code	Message
 Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 INSERT INTO t2 VALUES ('tmp',3,3);
-ERROR HY000: Table test/t2 in tablespace  encrypted.However key management plugin or used key_id is not found or used encryption algorithm or method does not match.
+ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
 Level	Code	Message
-Error	192	Table test/t2 in tablespace  encrypted.However key management plugin or used key_id is not found or used encryption algorithm or method does not match.
+Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 DELETE FROM t2 where b = 3;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
@@ -71,30 +72,25 @@ SHOW WARNINGS;
 Level	Code	Message
 Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 DELETE FROM t2 where id = 3;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
 Level	Code	Message
-Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 UPDATE t2 set b = b +1;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
 Level	Code	Message
+Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 OPTIMIZE TABLE t2;
 Table	Op	Msg_type	Msg_text
-test.t2	optimize	note	Table does not support optimize, doing recreate + analyze instead
-test.t2	optimize	error	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
-test.t2	optimize	status	Operation failed
-Warnings:
-Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
-Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+test.t2	optimize	Warning	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
+test.t2	optimize	Error	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+test.t2	optimize	error	Corrupt
 SHOW WARNINGS;
 Level	Code	Message
-Warning	192	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
-Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 ALTER TABLE t2 ADD COLUMN d INT;
 ERROR HY000: Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 SHOW WARNINGS;
@@ -103,7 +99,9 @@ Warning	192	Table test/t2 is encrypted but encryption service or used key_id is
 Error	1296	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
 ANALYZE TABLE t2;
 Table	Op	Msg_type	Msg_text
-test.t2	analyze	status	Operation failed
+test.t2	analyze	Warning	Table test/t2 is encrypted but encryption service or used key_id is not available.  Can't continue reading table.
+test.t2	analyze	Error	Got error 192 'Table encrypted but decryption failed. This could be because correct encryption management plugin is not loaded, used encryption key is not available or encryption method does not match.' from InnoDB
+test.t2	analyze	error	Corrupt
 SHOW WARNINGS;
 Level	Code	Message
 TRUNCATE TABLE t2;
diff --git a/mysql-test/suite/encryption/t/innodb-bad-key-change.test b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
index 9cd9d8ff1b4..981f4bdf3cb 100644
--- a/mysql-test/suite/encryption/t/innodb-bad-key-change.test
+++ b/mysql-test/suite/encryption/t/innodb-bad-key-change.test
@@ -79,7 +79,7 @@ SELECT * FROM t2 where b = 1;
 --replace_regex /tablespace [0-9]*/tablespace /
 SHOW WARNINGS;
 --replace_regex /tablespace [0-9]*/tablespace /
---error 192
+--error ER_GET_ERRMSG
 INSERT INTO t2 VALUES ('tmp',3,3);
 --replace_regex /tablespace [0-9]*/tablespace /
 SHOW WARNINGS;
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 1b62854efef..889cc0dbaab 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -1390,7 +1390,7 @@ insert into t1 values
 (248, 247), (249, 248), (250, 249), (251, 250),
 (252, 251), (253, 252), (254, 253), (255, 254);
 delete from t1 where id=0;
-Got one of the listed errors
+ERROR HY000: Got error 193 '`test`.`t1`, CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`pid`) REFERENCES `t1` (`id`) ON DELETE CASCADE' from InnoDB
 delete from t1 where id=255;
 delete from t1 where id=0;
 drop table t1;
diff --git a/mysql-test/suite/innodb/r/innodb_bug14147491.result b/mysql-test/suite/innodb/r/innodb_bug14147491.result
index 7227c8760ba..78afe4e3889 100644
--- a/mysql-test/suite/innodb/r/innodb_bug14147491.result
+++ b/mysql-test/suite/innodb/r/innodb_bug14147491.result
@@ -1,6 +1,5 @@
 call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after .* attempts");
 CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ROW_FORMAT=COMPACT ENGINE=InnoDB;
-call mtr.add_suppression("InnoDB: Unable to read tablespace .* page no .* into the buffer pool after .* attempts");
 INSERT INTO t1 (b) VALUES ('corrupt me');
 INSERT INTO t1 (b) VALUES ('corrupt me');
 # Backup the t1.ibd before corrupting
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index c3908abcf34..1d449482854 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1126,10 +1126,9 @@ insert into t1 values
 (244, 243), (245, 244), (246, 245), (247, 246),
 (248, 247), (249, 248), (250, 249), (251, 250),
 (252, 251), (253, 252), (254, 253), (255, 254);
---error ER_GET_ERRMSG,ER_ROW_IS_REFERENCED_2
+--error ER_GET_ERRMSG
 delete from t1 where id=0;
 delete from t1 where id=255;
---error 0,ER_ROW_IS_REFERENCED_2
 delete from t1 where id=0;
 
 drop table t1;
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index 65fd2179c31..9e1649a755e 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -970,8 +970,8 @@ dict_stats_update_transient(
 
 		/* Do not continue if table decryption has failed or
 		table is already marked corrupted. */
-		if (!index->table->file_unreadable &&
-		    !index->table->corrupted) {
+		if (index->table->file_unreadable ||
+		    index->table->corrupted) {
 			break;
 		}
 


More information about the commits mailing list