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

Assertion `!(index)->is_spatial()' failed | Assertion `!index->is_spatial()' failed. | Assertion `!dict_index_is_spatial(index)' failed | All in btr_estimate_number_of_different_key_vals

    XMLWordPrintable

Details

    Description

      CREATE TABLE t(c POINT NOT NULL) ENGINE=InnoDB;
      DROP TABLE mysql.innodb_table_stats;
      CREATE SPATIAL INDEX i ON t(c);
      

      Leads to:

      10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

      mysqld: /test/10.6_dbg/storage/innobase/btr/btr0cur.cc:6575: std::vector<index_field_stats_t> btr_estimate_number_of_different_key_vals(dict_index_t*): Assertion `!(index)->is_spatial()' failed.
      

      10.6.0 9118fd360a3da0bba521caf2a35c424968235ac4 (Debug)

      Core was generated by `/test/MD010121-mariadb-10.6.0-linux-x86_64-dbg/bin/mysqld --no-defaults --core-'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x145a54097700 (LWP 2837029))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055c2735c00d7 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x000055c272d54ab1 in handle_fatal_signal (sig=6) at /test/10.6_dbg/sql/signal_handler.cc:330
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000145a57c55859 in __GI_abort () at abort.c:79
      #6  0x0000145a57c55729 in __assert_fail_base (fmt=0x145a57deb588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55c273960a4c "!(index)->is_spatial()", file=0x55c2739d5230 "/test/10.6_dbg/storage/innobase/btr/btr0cur.cc", line=6575, function=<optimized out>) at assert.c:92
      #7  0x0000145a57c66f36 in __GI___assert_fail (assertion=assertion@entry=0x55c273960a4c "!(index)->is_spatial()", file=file@entry=0x55c2739d5230 "/test/10.6_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=6575, function=function@entry=0x55c2739d86c8 "std::vector<index_field_stats_t> btr_estimate_number_of_different_key_vals(dict_index_t*)") at assert.c:101
      #8  0x000055c2733e9420 in btr_estimate_number_of_different_key_vals (index=index@entry=0x145a0001f088) at /test/10.6_dbg/storage/innobase/include/dict0mem.h:1171
      #9  0x000055c27349c2a4 in dict_stats_update_transient_for_index (index=index@entry=0x145a0001f088) at /test/10.6_dbg/storage/innobase/dict/dict0stats.cc:881
      #10 0x000055c27349fb0f in dict_stats_update_for_index (index=index@entry=0x145a0001f088) at /test/10.6_dbg/storage/innobase/dict/dict0stats.cc:3167
      #11 0x000055c273198473 in alter_stats_norebuild (thd=0x145a00000db8, ctx=0x145a00013d40, ha_alter_info=0x145a540941b0) at /test/10.6_dbg/storage/innobase/handler/handler0alter.cc:10609
      #12 ha_innobase::commit_inplace_alter_table (this=0x145a0006b3b0, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /test/10.6_dbg/storage/innobase/handler/handler0alter.cc:11378
      #13 0x000055c272d632c5 in handler::ha_commit_inplace_alter_table (this=0x145a0006b3b0, altered_table=altered_table@entry=0x145a54094250, ha_alter_info=ha_alter_info@entry=0x145a540941b0, commit=commit@entry=true) at /test/10.6_dbg/sql/handler.cc:4848
      #14 0x000055c272b5843e in mysql_inplace_alter_table (thd=thd@entry=0x145a00000db8, table_list=0x145a000127b0, table=table@entry=0x145a0006aab8, altered_table=altered_table@entry=0x145a54094250, ha_alter_info=ha_alter_info@entry=0x145a540941b0, target_mdl_request=target_mdl_request@entry=0x145a540947a0, alter_ctx=0x145a540952f0) at /test/10.6_dbg/sql/sql_table.cc:8107
      #15 0x000055c272b6bb1f in mysql_alter_table (thd=thd@entry=0x145a00000db8, new_db=new_db@entry=0x145a000127c8, new_name=new_name@entry=0x145a000127d8, create_info=create_info@entry=0x145a54095f60, table_list=<optimized out>, table_list@entry=0x145a000127b0, alter_info=alter_info@entry=0x145a54095e90, order_num=0, order=0x0, ignore=false, if_exists=false) at /test/10.6_dbg/sql/sql_table.cc:10651
      #16 0x000055c272a9083c in mysql_execute_command (thd=thd@entry=0x145a00000db8) at /test/10.6_dbg/sql/structs.h:559
      #17 0x000055c272a7c072 in mysql_parse (thd=thd@entry=0x145a00000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x145a540963d0) at /test/10.6_dbg/sql/sql_parse.cc:7881
      #18 0x000055c272a8a1ec in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x145a00000db8, packet=packet@entry=0x145a00008d39 "CREATE SPATIAL INDEX i ON t(c)", packet_length=packet_length@entry=30) at /test/10.6_dbg/sql/sql_class.h:1293
      #19 0x000055c272a8d52d in do_command (thd=0x145a00000db8) at /test/10.6_dbg/sql/sql_parse.cc:1348
      #20 0x000055c272be97fc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55c27584bb68, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #21 0x000055c272be9f03 in handle_one_connection (arg=arg@entry=0x55c27584bb68) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #22 0x000055c27309f88f in pfs_spawn_thread (arg=0x55c275752898) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #23 0x0000145a58163609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #24 0x0000145a57d52293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.3 And 10.2 give a slightly different assert:

      10.3.28 e59c1cef3bc4016f9fa9d7a0f6935463b7283a58 (Debug)

      mysqld: /test/10.3_dbg/storage/innobase/btr/btr0cur.cc:6597: std::vector<index_field_stats_t> btr_estimate_number_of_different_key_vals(dict_index_t*): Assertion `!dict_index_is_spatial(index)' failed.
      

      10.3.28 e59c1cef3bc4016f9fa9d7a0f6935463b7283a58 (Debug)

      Core was generated by `/test/MD010121-mariadb-10.3.28-linux-x86_64-dbg/bin/mysqld --no-defaults --core'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x146e7c0eb700 (LWP 2862199))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x000055deaeef6b50 in my_write_core (sig=sig@entry=6) at /test/10.3_dbg/mysys/stacktrace.c:386
      #2  0x000055deae6aeb6a in handle_fatal_signal (sig=6) at /test/10.3_dbg/sql/signal_handler.cc:343
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000146e91bb7859 in __GI_abort () at abort.c:79
      #6  0x0000146e91bb7729 in __assert_fail_base (fmt=0x146e91d4d588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55deaf1371d7 "!dict_index_is_spatial(index)", file=0x55deaf1ad738 "/test/10.3_dbg/storage/innobase/btr/btr0cur.cc", line=6597, function=<optimized out>) at assert.c:92
      #7  0x0000146e91bc8f36 in __GI___assert_fail (assertion=assertion@entry=0x55deaf1371d7 "!dict_index_is_spatial(index)", file=file@entry=0x55deaf1ad738 "/test/10.3_dbg/storage/innobase/btr/btr0cur.cc", line=line@entry=6597, function=function@entry=0x55deaf1af838 "std::vector<index_field_stats_t> btr_estimate_number_of_different_key_vals(dict_index_t*)") at assert.c:101
      #8  0x000055deaeb9d330 in btr_estimate_number_of_different_key_vals (index=index@entry=0x146e3001ecd0) at /test/10.3_dbg/storage/innobase/btr/btr0cur.cc:6597
      #9  0x000055deaec77a4a in dict_stats_update_transient_for_index (index=index@entry=0x146e3001ecd0) at /test/10.3_dbg/storage/innobase/dict/dict0stats.cc:883
      #10 0x000055deaec7faab in dict_stats_update_for_index (index=index@entry=0x146e3001ecd0) at /test/10.3_dbg/storage/innobase/dict/dict0stats.cc:3182
      #11 0x000055deae925ee2 in alter_stats_norebuild (thd=<optimized out>, ctx=0x146e30012a78, ha_alter_info=0x146e7c0e7820) at /test/10.3_dbg/storage/innobase/handler/handler0alter.cc:9169
      #12 ha_innobase::commit_inplace_alter_table (this=0x146e3004e888, altered_table=<optimized out>, ha_alter_info=<optimized out>, commit=<optimized out>) at /test/10.3_dbg/storage/innobase/handler/handler0alter.cc:10055
      #13 0x000055deae6bc1cf in handler::ha_commit_inplace_alter_table (this=0x146e3004e888, altered_table=altered_table@entry=0x146e30052730, ha_alter_info=ha_alter_info@entry=0x146e7c0e7820, commit=commit@entry=true) at /test/10.3_dbg/sql/handler.cc:4602
      #14 0x000055deae4db054 in mysql_inplace_alter_table (thd=thd@entry=0x146e30000d90, table_list=0x146e30011640, table=table@entry=0x146e3004d7e0, altered_table=altered_table@entry=0x146e30052730, ha_alter_info=ha_alter_info@entry=0x146e7c0e7820, inplace_supported=inplace_supported@entry=HA_ALTER_INPLACE_NOCOPY_LOCK, target_mdl_request=0x146e7c0e7a40, alter_ctx=0x146e7c0e8210) at /test/10.3_dbg/sql/sql_table.cc:7735
      #15 0x000055deae4e71f1 in mysql_alter_table (thd=thd@entry=0x146e30000d90, new_db=new_db@entry=0x146e30011658, new_name=new_name@entry=0x146e30011668, create_info=create_info@entry=0x146e7c0e8e70, table_list=<optimized out>, table_list@entry=0x146e30011640, alter_info=alter_info@entry=0x146e7c0e8db0, order_num=0, order=0x0, ignore=false) at /test/10.3_dbg/sql/sql_table.cc:9980
      #16 0x000055deae420fcb in mysql_execute_command (thd=thd@entry=0x146e30000d90) at /test/10.3_dbg/sql/sql_parse.cc:4124
      #17 0x000055deae42a641 in mysql_parse (thd=thd@entry=0x146e30000d90, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x146e7c0ea540, 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:7840
      #18 0x000055deae42cdee in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x146e30000d90, packet=packet@entry=0x146e300198d1 "CREATE SPATIAL INDEX i ON t(c)", packet_length=packet_length@entry=30, 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:1139
      #19 0x000055deae42ff94 in do_command (thd=0x146e30000d90) at /test/10.3_dbg/sql/sql_parse.cc:1398
      #20 0x000055deae55743c in do_handle_one_connection (connect=connect@entry=0x55deb0eb7c60) at /test/10.3_dbg/sql/sql_connect.cc:1403
      #21 0x000055deae557673 in handle_one_connection (arg=0x55deb0eb7c60) at /test/10.3_dbg/sql/sql_connect.cc:1308
      #22 0x0000146e920bd609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #23 0x0000146e91cb4293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.37 (dbg), 10.3.28 (dbg), 10.4.18 (dbg), 10.5.9 (dbg), 10.6.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.2.37 (opt), 10.3.28 (opt), 10.4.18 (opt), 10.5.9 (opt), 10.6.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.50 (dbg), 5.6.50 (opt), 5.7.32 (dbg), 5.7.32 (opt), 8.0.22 (dbg), 8.0.22 (opt)

      Attachments

        Activity

          People

            vlad.lesin Vladislav Lesin
            Roel Roel Van de Paar
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.