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

InnoDB: Failing assertion: len < sizeof(tmp_buff) in get_foreign_key_info

    XMLWordPrintable

Details

    Description

      CREATE DATABASE `db_new..............................................end`;
      SET SESSION foreign_key_checks=0;
      USE `db_new..............................................end`;
      CREATE TABLE mytable_ref (id int,constraint FOREIGN KEY (id) REFERENCES FOO(id) ON DELETE CASCADE) ;
      SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, table_schema, table_name, column_name FROM information_schema.key_column_usage WHERE (constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL) AND table_name != 'abcdefghijklmnopqrstuvwxyz' ORDER BY constraint_name, table_name, column_name;
      

      Leads to:

      10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Optimized)

      InnoDB: Failing assertion: len < sizeof(tmp_buff)
      

      10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Optimized)

      Core was generated by `/test/MD201020-mariadb-10.6.0-linux-x86_64-opt/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 0x1488c0129700 (LWP 356177))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000559d2579fa4f in my_write_core (sig=sig@entry=6) at /test/10.6_opt/mysys/stacktrace.c:424
      #2  0x0000559d251c3130 in handle_fatal_signal (sig=6) at /test/10.6_opt/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  0x00001488d4faa859 in __GI_abort () at abort.c:79
      #6  0x0000559d24e87f98 in ut_dbg_assertion_failed (expr=expr@entry=0x559d25a934a7 "len < sizeof(tmp_buff)", file=file@entry=0x559d25a8c510 "/test/10.6_opt/storage/innobase/handler/ha_innodb.cc", line=line@entry=14821) at /test/10.6_opt/storage/innobase/ut/ut0dbg.cc:60
      #7  0x0000559d24e5ce98 in get_foreign_key_info (thd=0x148880000c58, foreign=0x14888001d320) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:14821
      #8  0x0000559d254e1fbd in ha_innobase::get_foreign_key_list (this=<optimized out>, thd=0x148880000c58, f_key_list=<optimized out>) at /test/10.6_opt/storage/innobase/handler/ha_innodb.cc:14953
      #9  0x0000559d25034363 in get_schema_key_column_usage_record (res=false, table_name=0x14888002aec8, db_name=0x148880029380, table=0x148880021120, tables=<optimized out>, thd=0x148880000c58) at /test/10.6_opt/sql/sql_class.h:4052
      #10 get_schema_key_column_usage_record (thd=0x148880000c58, tables=<optimized out>, table=0x148880021120, res=<optimized out>, db_name=0x148880029380, table_name=0x14888002aec8) at /test/10.6_opt/sql/sql_show.cc:7126
      #11 0x0000559d25025628 in fill_schema_table_by_open (thd=0x148880000c58, mem_root=<optimized out>, is_show_fields_or_keys=<optimized out>, table=0x148880021120, schema_table=0x559d2604e0c0 <schema_tables+1024>, orig_db_name=0x148880029380, orig_table_name=0x14888002aec8, open_tables_state_backup=0x1488c01261d0, can_deadlock=false) at /test/10.6_opt/sql/sql_show.cc:4641
      #12 0x0000559d25039aae in get_all_tables (thd=0x148880000c58, tables=0x148880011550, cond=<optimized out>) at /test/10.6_opt/sql/sql_show.cc:5245
      #13 0x0000559d2503b1d1 in get_schema_tables_result (join=join@entry=0x148880013bd0, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /test/10.6_opt/sql/sql_show.cc:8696
      #14 0x0000559d25020c87 in JOIN::exec_inner (this=0x148880013bd0) at /test/10.6_opt/sql/sql_select.cc:4421
      #15 0x0000559d250212b9 in JOIN::exec (this=this@entry=0x148880013bd0) at /test/10.6_opt/sql/sql_select.cc:4246
      #16 0x0000559d2501f367 in mysql_select (thd=0x148880000c58, tables=0x148880011550, fields=<optimized out>, conds=0x148880012600, og_num=3, order=0x1488800130b8, group=0x0, having=0x0, proc_param=0x0, select_options=2751728384, result=0x148880013ba8, unit=0x148880004c20, select_lex=0x1488800106c0) at /test/10.6_opt/sql/sql_select.cc:4673
      #17 0x0000559d2501fd67 in handle_select (thd=thd@entry=0x148880000c58, lex=lex@entry=0x148880004b58, result=result@entry=0x148880013ba8, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_opt/sql/sql_select.cc:417
      #18 0x0000559d24faf951 in execute_sqlcom_select (thd=0x148880000c58, all_tables=0x148880011550) at /test/10.6_opt/sql/sql_parse.cc:6062
      #19 0x0000559d24fbd380 in mysql_execute_command (thd=0x148880000c58) at /test/10.6_opt/sql/sql_parse.cc:3784
      #20 0x0000559d24faa03f in mysql_parse (thd=0x148880000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/10.6_opt/sql/sql_parse.cc:7833
      #21 0x0000559d24fb5967 in dispatch_command (command=COM_QUERY, thd=0x148880000c58, packet=0x148880008009 "SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, table_schema, table_name, column_name FROM information_schema.key_column_usage WHERE (constraint_catalog IS NOT NULL OR ta"..., packet_length=<optimized out>) at /test/10.6_opt/sql/sql_class.h:1253
      #22 0x0000559d24fb7d42 in do_command (thd=0x148880000c58) at /test/10.6_opt/sql/sql_parse.cc:1343
      #23 0x0000559d250bb6e1 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x559d2727e5e8, put_in_cache=put_in_cache@entry=true) at /test/10.6_opt/sql/sql_connect.cc:1410
      #24 0x0000559d250bbb5d in handle_one_connection (arg=arg@entry=0x559d2727e5e8) at /test/10.6_opt/sql/sql_connect.cc:1312
      #25 0x0000559d25441266 in pfs_spawn_thread (arg=0x559d271f9888) at /test/10.6_opt/storage/perfschema/pfs.cc:2201
      #26 0x00001488d54b8609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #27 0x00001488d50a7293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Debug)

      InnoDB: Failing assertion: len < sizeof(tmp_buff)
      

      10.6.0 5d4599f9750140f92cfdbbe4d292ae1b8dd456f8 (Debug)

      Core was generated by `/test/MD211020-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 0x151ab0991700 (LWP 366632))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000560964e8e021 in my_write_core (sig=sig@entry=6) at /test/10.6_dbg/mysys/stacktrace.c:424
      #2  0x00005609645d5321 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  0x0000151ab3553859 in __GI_abort () at abort.c:79
      #6  0x0000560964c4b9d5 in ut_dbg_assertion_failed (expr=expr@entry=0x56096522d07e "len < sizeof(tmp_buff)", file=file@entry=0x56096522ef98 "/test/10.6_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=14821) at /test/10.6_dbg/storage/innobase/ut/ut0dbg.cc:60
      #7  0x00005609649e359d in get_foreign_key_info (thd=thd@entry=0x151a58000db8, foreign=0x151a58022ac8) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:14821
      #8  0x00005609649e7b3e in ha_innobase::get_foreign_key_list (this=0x151a5847d020, thd=0x151a58000db8, f_key_list=0x151ab098c3e0) at /test/10.6_dbg/storage/innobase/handler/ha_innodb.cc:14953
      #9  0x00005609643b6515 in get_schema_key_column_usage_record (thd=0x151a58000db8, tables=<optimized out>, table=0x151a5801f2a0, res=<optimized out>, db_name=0x151a5802e270, table_name=0x151a58030198) at /test/10.6_dbg/sql/sql_show.cc:7174
      #10 0x000056096439b4d5 in fill_schema_table_by_open (thd=thd@entry=0x151a58000db8, mem_root=mem_root@entry=0x151ab098e240, is_show_fields_or_keys=is_show_fields_or_keys@entry=false, table=table@entry=0x151a5801f2a0, schema_table=schema_table@entry=0x5609658833c0 <schema_tables+1024>, orig_db_name=orig_db_name@entry=0x151a5802e270, orig_table_name=0x151a58030198, open_tables_state_backup=0x151ab098e280, can_deadlock=false) at /test/10.6_dbg/sql/sql_show.cc:4641
      #11 0x00005609643be311 in get_all_tables (thd=0x151a58000db8, tables=0x151a58013820, cond=<optimized out>) at /test/10.6_dbg/sql/sql_show.cc:5245
      #12 0x00005609643bf5ad in get_schema_tables_result (join=join@entry=0x151a58015ea0, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /test/10.6_dbg/sql/sql_show.cc:8696
      #13 0x0000560964393c3f in JOIN::exec_inner (this=this@entry=0x151a58015ea0) at /test/10.6_dbg/sql/sql_select.cc:4442
      #14 0x0000560964394733 in JOIN::exec (this=this@entry=0x151a58015ea0) at /test/10.6_dbg/sql/sql_select.cc:4246
      #15 0x0000560964392944 in mysql_select (thd=thd@entry=0x151a58000db8, tables=0x151a58013820, fields=@0x151a58012ae0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x151a58012f58, last = 0x151a580137a0, elements = 7}, <No data fields>}, conds=0x151a580148d0, og_num=3, order=0x151a58015388, group=0x0, having=0x0, proc_param=0x0, select_options=2751728384, result=0x151a58015e78, unit=0x151a58004f40, select_lex=0x151a58012990) at /test/10.6_dbg/sql/sql_select.cc:4673
      #16 0x0000560964392c72 in handle_select (thd=thd@entry=0x151a58000db8, lex=lex@entry=0x151a58004e78, result=result@entry=0x151a58015e78, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.6_dbg/sql/sql_select.cc:417
      #17 0x000056096430638e in execute_sqlcom_select (thd=thd@entry=0x151a58000db8, all_tables=0x151a58013820) at /test/10.6_dbg/sql/sql_parse.cc:6062
      #18 0x0000560964312aea in mysql_execute_command (thd=thd@entry=0x151a58000db8) at /test/10.6_dbg/sql/sql_parse.cc:3784
      #19 0x00005609642fefd2 in mysql_parse (thd=thd@entry=0x151a58000db8, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x151ab09903d0) at /test/10.6_dbg/sql/sql_parse.cc:7833
      #20 0x000056096430d0c7 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x151a58000db8, packet=packet@entry=0x151a58008ce9 "SELECT constraint_catalog, constraint_schema, constraint_name, table_catalog, table_schema, table_name, column_name FROM information_schema.key_column_usage WHERE (constraint_catalog IS NOT NULL OR ta"..., packet_length=packet_length@entry=321) at /test/10.6_dbg/sql/sql_class.h:1253
      #21 0x00005609643103d2 in do_command (thd=0x151a58000db8) at /test/10.6_dbg/sql/sql_parse.cc:1343
      #22 0x000056096446a994 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x560968bf9778, put_in_cache=put_in_cache@entry=true) at /test/10.6_dbg/sql/sql_connect.cc:1410
      #23 0x000056096446b09b in handle_one_connection (arg=arg@entry=0x560968bf9778) at /test/10.6_dbg/sql/sql_connect.cc:1312
      #24 0x000056096491eabb in pfs_spawn_thread (arg=0x560968b00418) at /test/10.6_dbg/storage/perfschema/pfs.cc:2201
      #25 0x0000151ab3a61609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #26 0x0000151ab3650293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.2.42 (dbg), 10.2.42 (opt), 10.3.33 (dbg), 10.3.33 (opt), 10.4.23 (dbg), 10.4.23 (opt), 10.5.14 (dbg), 10.5.14 (opt), 10.6.6 (dbg), 10.6.6 (opt), 10.7.2 (dbg), 10.7.2 (opt), 10.8.0 (dbg), 10.8.0 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.36 (dbg), 5.7.36 (opt)

      Bug (or feature/syntax) confirmed not present in:
      MySQL: 8.0.27 (dbg), 8.0.27 (opt)

      Attachments

        Issue Links

          Activity

            People

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