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

Assertion `0' fails in Stat_table::update_stat

Details

    Description

      Upd: See comments for a test case.

      Attachments

        Activity

          alice Alice Sherepa added a comment - - edited

          CREATE TABLE t1 (pk int);
          INSERT INTO t1 VALUES (1),(2),(3);
           
          ANALYZE TABLE t1 PERSISTENT FOR ALL;
          REPAIR LOCAL TABLE  mysql.column_stats USE_FRM  QUICK EXTENDED;
          CHECK TABLE mysql.column_stats EXTENDED;
          CHECK TABLE mysql.column_stats FOR UPGRADE MEDIUM FAST EXTENDED;
          ANALYZE TABLE t1 PERSISTENT FOR ALL;
          CHECK TABLE mysql.column_stats FOR UPGRADE MEDIUM FAST EXTENDED;
          ANALYZE TABLE t1 PERSISTENT FOR ALL;
          
          

          mariadbd: /10.6/src/sql/sql_statistics.cc:700: bool Stat_table::update_stat(): Assertion `0' failed.
          240513 18:49:17 [ERROR] mysqld got signal 6 ;
           
          Server version: 10.6.18-MariaDB-debug-log source revision: 4b4db4a8e54480eccfed99fd7e3a8223ec03d1d7
           
          mysys/stacktrace.c:215(my_print_stacktrace)[0x5638e1ae582e]
          sql/signal_handler.cc:238(handle_fatal_signal)[0x5638e062f1e0]
          sigaction.c:0(__restore_rt)[0x7fa061098420]
          sql/sql_statistics.cc:701(Stat_table::update_stat())[0x5638dfffbab7]
          sql/sql_statistics.cc:2839(update_statistics_for_table(THD*, TABLE*))[0x5638dffeec7e]
          sql/sql_admin.cc:1068(mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool))[0x5638e02499dc]
          sql/sql_admin.cc:1561(Sql_cmd_analyze_table::execute(THD*))[0x5638e024dcb9]
          sql/sql_parse.cc:6124(mysql_execute_command(THD*, bool))[0x5638dfda1914]
          sql/sql_parse.cc:8146(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5638dfdaf120]
          sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5638dfd84475]
          sql/sql_parse.cc:1409(do_command(THD*, bool))[0x5638dfd811b6]
          sql/sql_connect.cc:1415(do_handle_one_connection(CONNECT*, bool))[0x5638e020a5b9]
          sql/sql_connect.cc:1319(handle_one_connection)[0x5638e0209f16]
          perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5638e0ea8506]
          nptl/pthread_create.c:478(start_thread)[0x7fa06108c609]
           
          Query (0x62b0000852a8): ANALYZE TABLE t1 PERSISTENT FOR ALL
          

          alice Alice Sherepa added a comment - - edited CREATE TABLE t1 (pk int ); INSERT INTO t1 VALUES (1),(2),(3);   ANALYZE TABLE t1 PERSISTENT FOR ALL ; REPAIR LOCAL TABLE mysql.column_stats USE_FRM QUICK EXTENDED; CHECK TABLE mysql.column_stats EXTENDED; CHECK TABLE mysql.column_stats FOR UPGRADE MEDIUM FAST EXTENDED; ANALYZE TABLE t1 PERSISTENT FOR ALL ; CHECK TABLE mysql.column_stats FOR UPGRADE MEDIUM FAST EXTENDED; ANALYZE TABLE t1 PERSISTENT FOR ALL ; mariadbd: /10.6/src/sql/sql_statistics.cc:700: bool Stat_table::update_stat(): Assertion `0' failed. 240513 18:49:17 [ERROR] mysqld got signal 6 ;   Server version: 10.6.18-MariaDB-debug-log source revision: 4b4db4a8e54480eccfed99fd7e3a8223ec03d1d7   mysys/stacktrace.c:215(my_print_stacktrace)[0x5638e1ae582e] sql/signal_handler.cc:238(handle_fatal_signal)[0x5638e062f1e0] sigaction.c:0(__restore_rt)[0x7fa061098420] sql/sql_statistics.cc:701(Stat_table::update_stat())[0x5638dfffbab7] sql/sql_statistics.cc:2839(update_statistics_for_table(THD*, TABLE*))[0x5638dffeec7e] sql/sql_admin.cc:1068(mysql_admin_table(THD*, TABLE_LIST*, st_ha_check_opt*, st_mysql_const_lex_string const*, thr_lock_type, bool, bool, unsigned int, int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), int (handler::*)(THD*, st_ha_check_opt*), int (*)(THD*, TABLE_LIST*, st_ha_check_opt*), bool))[0x5638e02499dc] sql/sql_admin.cc:1561(Sql_cmd_analyze_table::execute(THD*))[0x5638e024dcb9] sql/sql_parse.cc:6124(mysql_execute_command(THD*, bool))[0x5638dfda1914] sql/sql_parse.cc:8146(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5638dfdaf120] sql/sql_parse.cc:1898(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5638dfd84475] sql/sql_parse.cc:1409(do_command(THD*, bool))[0x5638dfd811b6] sql/sql_connect.cc:1415(do_handle_one_connection(CONNECT*, bool))[0x5638e020a5b9] sql/sql_connect.cc:1319(handle_one_connection)[0x5638e0209f16] perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5638e0ea8506] nptl/pthread_create.c:478(start_thread)[0x7fa06108c609]   Query (0x62b0000852a8): ANALYZE TABLE t1 PERSISTENT FOR ALL

          The failure from the comment stopped happening after this merge in 10.6.18

          commit 7b53672c63b24572a07cb3ba32f9c9fb1b226cb6 (HEAD)
          Merge: 30d3cfad69b 29c185bd771
          Author: Sergei Golubchik
          Date:   Wed May 8 20:06:00 2024 +0200
           
              Merge branch '10.5' into 10.6
          

          specifically after this commit from the merge

          commit ec6aa9ac42b8fada5927687c6e81a04fa0004393
          Author: Monty
          Date:   Tue May 7 17:21:01 2024 +0300
           
              MDEV-34055 Assertion '...' failure or corruption errors upon REPAIR on Aria tables
          

          and unfortunately I have already removed the original not simplified test case which was attached to the issue, so I can't check whether it was also fixed. Thus closing.

          elenst Elena Stepanova added a comment - The failure from the comment stopped happening after this merge in 10.6.18 commit 7b53672c63b24572a07cb3ba32f9c9fb1b226cb6 (HEAD) Merge: 30d3cfad69b 29c185bd771 Author: Sergei Golubchik Date: Wed May 8 20:06:00 2024 +0200   Merge branch '10.5' into 10.6 specifically after this commit from the merge commit ec6aa9ac42b8fada5927687c6e81a04fa0004393 Author: Monty Date: Tue May 7 17:21:01 2024 +0300   MDEV-34055 Assertion '...' failure or corruption errors upon REPAIR on Aria tables and unfortunately I have already removed the original not simplified test case which was attached to the issue, so I can't check whether it was also fixed. Thus closing.

          People

            Unassigned Unassigned
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.