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

Assertion `index->type & 32' failed in int ha_innobase::defragment_table(const char*)

    XMLWordPrintable

Details

    Description

      SET GLOBAL innodb_defragment=1;
      CREATE TABLE t (val INT);
      ALTER TABLE t DISCARD TABLESPACE;
      OPTIMIZE TABLE t;
      

      Leads to:

      10.5.19 fe330b63fe4ee51a26ac6e222d8eb4ee44a73d50 (Debug)

      mysqld: /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:14687: int ha_innobase::defragment_table(const char*): Assertion `index->type & 32' failed.
      

      10.5.19 fe330b63fe4ee51a26ac6e222d8eb4ee44a73d50 (Debug)

      Core was generated by `/test/MD081122-mariadb-10.5.19-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 0x149a70065700 (LWP 3444688))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x0000149a7b9f8859 in __GI_abort () at abort.c:79
      #2  0x0000149a7b9f8729 in __assert_fail_base (fmt=0x149a7bb8e588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55baed8bb238 "index->type & 32", file=0x55baed8aefa0 "/test/10.5_dbg/storage/innobase/handler/ha_innodb.cc", line=14687, function=<optimized out>) at assert.c:92
      #3  0x0000149a7ba09fd6 in __GI___assert_fail (assertion=assertion@entry=0x55baed8bb238 "index->type & 32", file=file@entry=0x55baed8aefa0 "/test/10.5_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=14687, function=function@entry=0x55baed8bb250 "int ha_innobase::defragment_table(const char*)") at assert.c:101
      #4  0x000055baed0ac1c4 in ha_innobase::defragment_table (this=<optimized out>, name=<optimized out>) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:14687
      #5  0x000055baed08a47f in ha_innobase::optimize (this=0x149a28022270, thd=0x149a28000d48) at /test/10.5_dbg/storage/innobase/handler/ha_innodb.cc:14764
      #6  0x000055baecd5e1ec in handler::ha_optimize (this=0x149a28022270, thd=0x149a28000d48, check_opt=0x149a28005fe0) at /test/10.5_dbg/sql/handler.cc:4777
      #7  0x000055baecc0c904 in mysql_admin_table (thd=thd@entry=0x149a28000d48, tables=tables@entry=0x149a28012df8, check_opt=check_opt@entry=0x149a28005fe0, operator_name=operator_name@entry=0x55baed8ad7bd "optimize", lock_type=lock_type@entry=TL_WRITE, 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 *)) 0x55baecd5e150 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/10.5_dbg/sql/sql_admin.cc:832
      #8  0x000055baecc0f142 in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x149a28000d48) at /test/10.5_dbg/sql/sql_admin.cc:1461
      #9  0x000055baecacc1c9 in mysql_execute_command (thd=thd@entry=0x149a28000d48) at /test/10.5_dbg/sql/sql_parse.cc:6057
      #10 0x000055baecab4771 in mysql_parse (thd=thd@entry=0x149a28000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x149a70064310, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_parse.cc:8087
      #11 0x000055baecac21c6 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x149a28000d48, packet=packet@entry=0x149a2800a9a9 "", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.5_dbg/sql/sql_class.h:1297
      #12 0x000055baecac49e9 in do_command (thd=0x149a28000d48) at /test/10.5_dbg/sql/sql_parse.cc:1375
      #13 0x000055baecbfcca2 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55baf006f998, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1416
      #14 0x000055baecbfd170 in handle_one_connection (arg=0x55baf006f998) at /test/10.5_dbg/sql/sql_connect.cc:1318
      #15 0x0000149a7bf09609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x0000149a7baf5133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.4.28 e9dc39572f2416a01d9908da98b904748d235298 (Debug)

      mysqld: /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:14667: int ha_innobase::defragment_table(const char*): Assertion `index->type & 32' failed.
      

      10.4.28 e9dc39572f2416a01d9908da98b904748d235298 (Debug)

      Core was generated by `/test/MD081122-mariadb-10.4.28-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 0x14b914256700 (LWP 3444919))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014b91671b859 in __GI_abort () at abort.c:79
      #2  0x000014b91671b729 in __assert_fail_base (fmt=0x14b9168b1588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55ed78560e0a "index->type & 32", file=0x55ed78553478 "/test/10.4_dbg/storage/innobase/handler/ha_innodb.cc", line=14667, function=<optimized out>) at assert.c:92
      #3  0x000014b91672cfd6 in __GI___assert_fail (assertion=assertion@entry=0x55ed78560e0a "index->type & 32", file=file@entry=0x55ed78553478 "/test/10.4_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=14667, function=function@entry=0x55ed78560e20 "int ha_innobase::defragment_table(const char*)") at assert.c:101
      #4  0x000055ed77d461c1 in ha_innobase::defragment_table (this=<optimized out>, name=<optimized out>) at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:14667
      #5  0x000055ed77d248f1 in ha_innobase::optimize (this=0x14b8ac022eb0, thd=0x14b8ac000d28) at /test/10.4_dbg/storage/innobase/handler/ha_innodb.cc:14744
      #6  0x000055ed77a14f02 in handler::ha_optimize (this=0x14b8ac022eb0, thd=0x14b8ac000d28, check_opt=0x14b8ac005dd0) at /test/10.4_dbg/sql/handler.cc:4541
      #7  0x000055ed778cbf1f in mysql_admin_table (thd=thd@entry=0x14b8ac000d28, tables=tables@entry=0x14b8ac012558, check_opt=check_opt@entry=0x14b8ac005dd0, operator_name=operator_name@entry=0x55ed78552756 "optimize", lock_type=lock_type@entry=TL_WRITE, 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 *)) 0x55ed77a14e66 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/10.4_dbg/sql/sql_admin.cc:821
      #8  0x000055ed778cdf26 in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x14b8ac000d28) at /test/10.4_dbg/sql/sql_admin.cc:1432
      #9  0x000055ed7779c753 in mysql_execute_command (thd=thd@entry=0x14b8ac000d28) at /test/10.4_dbg/sql/sql_parse.cc:6193
      #10 0x000055ed7779eb6e in mysql_parse (thd=thd@entry=0x14b8ac000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14b9142553b0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_parse.cc:7982
      #11 0x000055ed777a14d7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14b8ac000d28, packet=packet@entry=0x14b8ac0194e9 "", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.4_dbg/sql/sql_class.h:1208
      #12 0x000055ed777a3c8a in do_command (thd=0x14b8ac000d28) at /test/10.4_dbg/sql/sql_parse.cc:1378
      #13 0x000055ed778bdf05 in do_handle_one_connection (connect=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1420
      #14 0x000055ed778bdfc1 in handle_one_connection (arg=<optimized out>) at /test/10.4_dbg/sql/sql_connect.cc:1324
      #15 0x000014b916c2c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x000014b916818133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3.38 01ac7455e2c974affbf335c4bc1acbfe71b7127b (Debug)

      mysqld: /test/10.3_dbg/storage/innobase/handler/ha_innodb.cc:14665: int ha_innobase::defragment_table(const char*): Assertion `index->type & 32' failed.
      

      10.3.38 01ac7455e2c974affbf335c4bc1acbfe71b7127b (Debug)

      Core was generated by `/test/MD081122-mariadb-10.3.38-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 0x1497a4159700 (LWP 3444693))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x00001497bc605859 in __GI_abort () at abort.c:79
      #2  0x00001497bc605729 in __assert_fail_base (fmt=0x1497bc79b588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x557303a29a2a "index->type & 32", file=0x557303a1bb20 "/test/10.3_dbg/storage/innobase/handler/ha_innodb.cc", line=14665, function=<optimized out>) at assert.c:92
      #3  0x00001497bc616fd6 in __GI___assert_fail (assertion=assertion@entry=0x557303a29a2a "index->type & 32", file=file@entry=0x557303a1bb20 "/test/10.3_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=14665, function=function@entry=0x557303a29a40 "int ha_innobase::defragment_table(const char*)") at assert.c:101
      #4  0x000055730326301e in ha_innobase::defragment_table (this=<optimized out>, name=<optimized out>) at /test/10.3_dbg/storage/innobase/handler/ha_innodb.cc:14665
      #5  0x000055730323fda1 in ha_innobase::optimize (this=0x14975c022650, thd=0x14975c000d28) at /test/10.3_dbg/storage/innobase/handler/ha_innodb.cc:14742
      #6  0x0000557303040ab4 in handler::ha_optimize (this=0x14975c022650, thd=0x14975c000d28, check_opt=0x14975c005a38) at /test/10.3_dbg/sql/handler.cc:4502
      #7  0x0000557302f037c7 in mysql_admin_table (thd=thd@entry=0x14975c000d28, tables=tables@entry=0x14975c010a58, check_opt=check_opt@entry=0x14975c005a38, operator_name=operator_name@entry=0x557303a1adfa "optimize", lock_type=lock_type@entry=TL_WRITE, 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 *)) 0x557303040a18 <handler::ha_optimize(THD*, st_ha_check_opt*)>, view_operator_func=0x0, is_cmd_replicated=true) at /test/10.3_dbg/sql/sql_admin.cc:821
      #8  0x0000557302f054db in Sql_cmd_optimize_table::execute (this=<optimized out>, thd=0x14975c000d28) at /test/10.3_dbg/sql/sql_admin.cc:1416
      #9  0x0000557302de787f in mysql_execute_command (thd=thd@entry=0x14975c000d28) at /test/10.3_dbg/sql/sql_parse.cc:6076
      #10 0x0000557302de91fb in mysql_parse (thd=thd@entry=0x14975c000d28, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x1497a41585c0, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_parse.cc:7855
      #11 0x0000557302deb260 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14975c000d28, packet=packet@entry=0x14975c018ad9 "", packet_length=packet_length@entry=16, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /test/10.3_dbg/sql/sql_class.h:1153
      #12 0x0000557302ded68a in do_command (thd=0x14975c000d28) at /test/10.3_dbg/sql/sql_parse.cc:1398
      #13 0x0000557302ef77b1 in do_handle_one_connection (connect=<optimized out>) at /test/10.3_dbg/sql/sql_connect.cc:1403
      #14 0x0000557302ef78e1 in handle_one_connection (arg=<optimized out>) at /test/10.3_dbg/sql/sql_connect.cc:1308
      #15 0x00001497bc7dd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #16 0x00001497bc702133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.3.38 (dbg), 10.4.28 (dbg), 10.5.19 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.3.38 (opt), 10.4.28 (opt), 10.5.19 (opt), 10.6.12 (dbg), 10.6.12 (opt), 10.7.8 (dbg), 10.7.8 (opt), 10.8.7 (dbg), 10.8.7 (opt), 10.9.5 (dbg), 10.9.5 (opt), 10.10.3 (dbg), 10.10.3 (opt), 10.11.1 (dbg), 10.11.1 (opt)

      Attachments

        Activity

          People

            marko Marko Mäkelä
            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.