Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-29872

MSAN/Valgrind uninitialised value errors in TABLE::vers_switch_partition

Details

    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).

      Attachments

        Issue Links

          Activity

            Please review bb-10.9-midenok

            midenok Aleksey Midenkov added a comment - Please review bb-10.9-midenok

            Looks good. Ok to push

            nikitamalyavin Nikita Malyavin added a comment - Looks good. Ok to push

            People

              midenok Aleksey Midenkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.