[MDEV-32725] innodb.import_update_stats accesses uninitialized ib_table->stat_n_rows Created: 2023-11-07  Updated: 2023-12-18  Resolved: 2023-12-15

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2
Fix Version/s: 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Thirunarayanan Balathandayuthapani
Resolution: Fixed Votes: 0
Labels: MSAN, valgrind

Issue Links:
Relates
relates to MDEV-13626 Merge InnoDB test cases from MySQL 5.7 Closed

 Description   

The test innodb.import_update_stats that will be added in MDEV-13626 is failing on Valgrind, and on 10.5 on MSAN. The following patch would almost fix it:

diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 086f30e119e..33ac21a4a7e 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -14316,7 +14316,7 @@ ha_innobase::info_low(
 	DBUG_ASSERT(ib_table->get_ref_count() > 0);
 
 	if (!ib_table->is_readable()) {
-		ib_table->stat_initialized = true;
+		goto func_exit;
 	}
 
 	if (flag & HA_STATUS_TIME) {

However, this patch would make a number of other tests fail:

10.4 2447172afb5afed1687779e46eed217c38f89ebc with patch

Failing test(s): encryption.innodb-bad-key-change3 innodb.innodb_bug14147491 innodb.innodb-wl5522-debug innodb_zip.wl5522_debug_zip



 Comments   
Comment by Thirunarayanan Balathandayuthapani [ 2023-12-12 ]

https://github.com/MariaDB/server/pull/2926

Generated at Thu Feb 08 10:33:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.