[MDEV-29872] MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition Created: 2022-10-25  Updated: 2023-12-07

Status: Stalled
Project: MariaDB Server
Component/s: Partitioning, Versioned Tables
Affects Version/s: 10.9, 10.10
Fix Version/s: 10.11

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Aleksey Midenkov
Resolution: Unresolved Votes: 0
Labels: pushing

Issue Links:
Problem/Incident
is caused by MDEV-17554 Auto-create history partitions for sy... Closed

 Description   

--source include/have_partition.inc
 
CREATE TABLE t (a INT) WITH SYSTEM VERSIONING PARTITION BY SYSTEM_TIME LIMIT 100 PARTITIONS 3;
--error ER_DELAYED_NOT_SUPPORTED
INSERT DELAYED INTO t () VALUES ();
 
# Cleanup
DROP TABLE t;

10.9 d86ad1f1

==220086== Conditional jump or move depends on uninitialised value(s)
==220086==    at 0xA217F9: TABLE::vers_switch_partition(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:1705)
==220086==    by 0xA22A2E: open_table(THD*, TABLE_LIST*, Open_table_context*) (sql_base.cc:2215)
==220086==    by 0xA26E63: open_and_process_table(THD*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) (sql_base.cc:4108)
==220086==    by 0xA2815A: open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:4595)
==220086==    by 0xA2A14B: open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5569)
==220086==    by 0xA1E16C: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.h:279)
==220086==    by 0xA29A34: open_n_lock_single_table(THD*, TABLE_LIST*, thr_lock_type, unsigned int, Prelocking_strategy*) (sql_base.cc:5414)
==220086==    by 0xA8C1D5: Delayed_insert::open_and_lock_table() (sql_insert.cc:3118)
==220086==    by 0xA8C4F0: handle_delayed_insert (sql_insert.cc:3228)
==220086==    by 0x11C7AF5: pfs_spawn_thread (pfs.cc:2201)
==220086==    by 0x4CE2EA6: start_thread (pthread_create.c:477)
==220086==    by 0x512CAEE: clone (clone.S:95)

MSAN errors are the same.

The failure appeared in 10.9 after these two commits

commit 92bfc0e8c4bb5c86359c29458d67f3e7836ec18a
Author: Aleksey Midenkov
Date:   Fri May 6 10:45:17 2022 +0300
 
    MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT
 
commit 75ede427e429b24001fc55bb284c110875fbf85a
Author: Aleksey Midenkov
Date:   Fri May 6 10:45:17 2022 +0300
 
    MDEV-27328 Change of SYSTEM_TIME partitioning options is not possible without data copy

(I can't build 75ede427, so can't be sure which one is to blame).



 Comments   
Comment by Aleksey Midenkov [ 2023-09-24 ]

Please review bb-10.9-midenok

Comment by Nikita Malyavin [ 2023-10-19 ]

Looks good. Ok to push

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