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

Assertion `0' failed in bool Stat_table::update_stat()

    XMLWordPrintable

    Details

      Description

      SET use_stat_tables=PREFERABLY;
      SET GLOBAL aria_encrypt_tables=ON;
      TRUNCATE mysql.table_stats;
      CREATE TABLE t1 (c1 CHAR(1)) ENGINE=INNODB;
      ANALYZE TABLE t1;
      ANALYZE TABLE t1;
      

      Leads to:

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      mysqld: /test/10.8_dbg/sql/sql_statistics.cc:657: bool Stat_table::update_stat(): Assertion `0' failed.
      

      10.8.0 1e8bcbd0a0bfa07052e9458830672ea215c8664a (Debug)

      Core was generated by `/test/MD091221-mariadb-10.8.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      [Current thread is 1 (Thread 0x14c5a8163700 (LWP 1255173))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014c5bce17859 in __GI_abort () at abort.c:79
      #2  0x000014c5bce17729 in __assert_fail_base (fmt=0x14c5bcfad588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x560571f7d562 "0", file=0x560571ddbb48 "/test/10.8_dbg/sql/sql_statistics.cc", line=657, function=<optimized out>) at assert.c:92
      #3  0x000014c5bce28f36 in __GI___assert_fail (assertion=assertion@entry=0x560571f7d562 "0", file=file@entry=0x560571ddbb48 "/test/10.8_dbg/sql/sql_statistics.cc", line=line@entry=657, function=function@entry=0x560571ddbba0 "bool Stat_table::update_stat()") at assert.c:101
      #4  0x00005605711b3585 in Stat_table::update_stat (this=0x14c5a815e020) at /test/10.8_dbg/sql/sql_statistics.cc:657
      #5  update_statistics_for_table (thd=thd@entry=0x14c564000db8, table=0x14c5640365a8) at /test/10.8_dbg/sql/sql_statistics.cc:2803
      #6  0x00005605712768c0 in mysql_admin_table (thd=thd@entry=0x14c564000db8, tables=tables@entry=0x14c564013e88, check_opt=check_opt@entry=0x14c564006468, operator_name=operator_name@entry=0x560572511090 <msg_analyze>, lock_type=lock_type@entry=TL_READ_NO_INSERT, org_open_for_modify=org_open_for_modify@entry=true, repair_table_use_frm=false, extra_open_options=0, prepare_func=0x0, operator_func=(int (handler::*)(class handler * const, class THD *, HA_CHECK_OPT *)) 0x5605713f4ca8 <handler::ha_analyze(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/10.8_dbg/sql/sql_admin.cc:1043
      #7  0x0000560571278473 in Sql_cmd_analyze_table::execute (this=<optimized out>, thd=0x14c564000db8) at /test/10.8_dbg/sql/sql_admin.cc:1515
      #8  0x00005605710f1114 in mysql_execute_command (thd=thd@entry=0x14c564000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.8_dbg/sql/sql_parse.cc:5989
      #9  0x00005605710d7c64 in mysql_parse (thd=thd@entry=0x14c564000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c5a8162400) at /test/10.8_dbg/sql/sql_parse.cc:8028
      #10 0x00005605710e68e9 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c564000db8, packet=packet@entry=0x14c56400b879 "", packet_length=packet_length@entry=16, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_class.h:1360
      #11 0x00005605710e9d2b in do_command (thd=0x14c564000db8, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:1402
      #12 0x00005605712631c0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560573ae99e8, put_in_cache=put_in_cache@entry=true) at /test/10.8_dbg/sql/sql_connect.cc:1418
      #13 0x00005605712637c5 in handle_one_connection (arg=arg@entry=0x560573ae99e8) at /test/10.8_dbg/sql/sql_connect.cc:1312
      #14 0x00005605716e5de6 in pfs_spawn_thread (arg=0x5605739fd678) at /test/10.8_dbg/storage/perfschema/pfs.cc:2201
      #15 0x000014c5bd325609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x000014c5bcf14293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.4.22 (dbg), 10.5.13 (dbg), 10.6.5 (dbg), 10.7.1 (dbg), 10.8.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.41 (dbg), 10.2.41 (opt), 10.3.32 (dbg), 10.3.32 (opt), 10.4.22 (opt), 10.5.13 (opt), 10.6.5 (opt), 10.7.1 (opt), 10.8.0 (opt)

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Git Integration

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