Skip to content

Commit

Permalink
Merge pull request percona#3347 from altmannmarcelo/PS-5.7-5325
Browse files Browse the repository at this point in the history
PS-5325 Conditional jump or move depends on uninitialised value on in…
  • Loading branch information
altmannmarcelo authored Dec 17, 2019
2 parents 25be387 + 1daddaf commit c08e5cd
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 5 deletions.
2 changes: 2 additions & 0 deletions mysql-test/suite/encryption/r/innodb-bad-key-change3.result
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
call mtr.add_suppression("cannot be decrypted. Are you using correct keyring that contain the");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
call mtr.add_suppression("InnoDB: Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("InnoDB: Cannot save statistics for table .* because the .ibd file is missing.");
CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTION='KEYRING' ENCRYPTION_KEY_ID=4;
SHOW WARNINGS;
Level Code Message
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/encryption/t/innodb-bad-key-change3.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
call mtr.add_suppression("cannot be decrypted. Are you using correct keyring that contain the");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("InnoDB: Cannot calculate statistics for table .* because the .ibd file is missing. Please refer to .* for how to resolve the issue.");
call mtr.add_suppression("InnoDB: Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("InnoDB: Cannot save statistics for table .* because the .ibd file is missing.");


CREATE TABLE t1 (pk INT PRIMARY KEY, f VARCHAR(255)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED ENCRYPTION='KEYRING' ENCRYPTION_KEY_ID=4;
Expand Down
1 change: 1 addition & 0 deletions mysql-test/suite/innodb/t/alter_kill.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ call mtr.add_suppression("InnoDB: Tablespace open failed for.*bug16720368");
call mtr.add_suppression("InnoDB: Failed to find tablespace.*bug16720368");
call mtr.add_suppression("InnoDB: Header page contains inconsistent data in .*bug16720368.ibd");
call mtr.add_suppression("InnoDB: Could not find.*test/bug16720368");
call mtr.add_suppression("Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("Found 1 prepared XA transactions");
call mtr.add_suppression("InnoDB: .*test.*bug16720368.*missing");
call mtr.add_suppression("InnoDB: Operating system error.*in a file operation");
Expand Down
3 changes: 3 additions & 0 deletions mysql-test/suite/innodb/t/alter_missing_tablespace.test
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ EOF
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for table `test`\.`t` because the \.ibd file is missing");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot delete tablespace [0-9]+ in DISCARD TABLESPACE: Tablespace not found");
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened");
call mtr.add_suppression("\\[Warning\\] InnoDB: Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot save statistics for table `test`\.`t` because the .ibd file is missing.");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot delete tablespace [0-9]+ because it is not found in the tablespace memory cache");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only:");
call mtr.add_suppression("\\[ERROR\\] InnoDB: Could not find a valid tablespace file for");
Expand Down Expand Up @@ -67,6 +69,7 @@ INSERT INTO `x..d` (a) VALUES (1),(2),(3),(4),(5),(6),(7),(8);
--disable_query_log
call mtr.add_suppression("\\[ERROR\\] InnoDB: Failed to find tablespace for table `test`\.`x\.\.d` in the cache");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for table `test`\.`x\.\.d` because the .ibd file is missing.");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot save statistics for table `test`\.`x\.\.d` because the .ibd file is missing.");
--enable_query_log

--error ER_TABLESPACE_MISSING
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/t/innodb-multiple-tablespaces.test
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: The error means the system cannot
call mtr.add_suppression("\\[ERROR\\] InnoDB: Will not open tablespace `test/.*`");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for table `test`\.`.*` because the \.ibd file is missing");
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace `test/.*` because it could not be opened.");
call mtr.add_suppression("\\[Warning\\] InnoDB: Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot save statistics for table `test`\.`.*` because the \.ibd file is missing.");
--enable_query_log

--echo #
Expand Down
2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/t/innodb-wl5980-discard.test
Original file line number Diff line number Diff line change
Expand Up @@ -701,5 +701,7 @@ call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot delete tablespace .+ in DISCARD TABLESPACE. Tablespace not found");
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened");
call mtr.add_suppression("\\[Warning\\] InnoDB: Tablespace for table .* is set as discarded");
call mtr.add_suppression("\\[Warning\\] InnoDB: Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot save statistics for table .* because the \.ibd file is missing.");
-- enable_query_log

2 changes: 2 additions & 0 deletions mysql-test/suite/innodb/t/missing_tablespaces.test
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot open datafile for read-only
call mtr.add_suppression("\\[ERROR\\] InnoDB: Could not find a valid tablespace file for");
call mtr.add_suppression("\\[Warning\\] InnoDB: Ignoring tablespace .* because it could not be opened");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot calculate statistics for table `\.\.*`\.`\.\.*` because the \.ibd file is missing");
call mtr.add_suppression("\\[Warning\\] InnoDB: Trying to access missing tablespace [0-9]+");
call mtr.add_suppression("\\[Warning\\] InnoDB: Cannot save statistics for table `\.\.*`\.`\.\.*` because the \.ibd file is missing.");
--enable_query_log

--error ER_TABLESPACE_MISSING
Expand Down
6 changes: 1 addition & 5 deletions storage/innobase/handler/ha_innodb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7079,11 +7079,7 @@ ha_innobase::open(

innobase_copy_frm_flags_from_table_share(ib_table, table->s);

if (ib_table->is_readable()) {
dict_stats_init(ib_table);
} else {
ib_table->stat_initialized = 1;
}
dict_stats_init(ib_table);

MONITOR_INC(MONITOR_TABLE_OPEN);

Expand Down

0 comments on commit c08e5cd

Please sign in to comment.