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

Server crashes when reading routines table after creating a function with "returns type of"

    XMLWordPrintable

Details

    Description

      CREATE FUNCTION f1() RETURNS TYPE OF t1.a RETURN (SELECT min(a) FROM t1);
      SElECT * FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_SCHEMA='test';
      

      Leads to

      CS 11.7.0 cb8496d989a5db6356ddb188aa30d008161284ba (Optimized)

      Core was generated by `/test/mtest/MDEV-12252/MD180924-mariadb-11.7.0-linux-x86_64-opt/bin/mariadbd --'.
      Program terminated with signal SIGSEGV, Segmentation fault.
      #0  my_charset_repertoire (cs=0x0)at /test/mtest/MDEV-12252/11.7_opt/strings/ctype.c:957
      [Current thread is 1 (Thread 0x152230084700 (LWP 3716969))]
      (gdb) bt
      #0  my_charset_repertoire (cs=0x0) at /test/mtest/MDEV-12252/11.7_opt/strings/ctype.c:957
      #1  0x000055ff538b3c14 in DTCollation::DTCollation (collation_arg=<optimized out>, this=0x15223007f7b0) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_type.h:3099
      #2  Type_handler_null::make_table_field_from_def (this=<optimized out>, share=<optimized out>, mem_root=0x1521f4006bf0, name=0x55ff548aade0 <empty_clex_str>, rec=<optimized out>, bit=<optimized out>, attr=0x1521f4063d00, flags=0) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_type.cc:8643
      #3  0x000055ff53959f42 in Column_definition_attributes::make_field (this=this@entry=0x1521f4063d00, share=share@entry=0x15223007ff10, mem_root=<optimized out>, rec=rec@entry=0x15223007f8e0, handler=<optimized out>, field_name=<optimized out>, flags=0) at /test/mtest/MDEV-12252/11.7_opt/sql/field.cc:11015
      #4  0x000055ff53779892 in Column_definition::make_field (field_name_arg=<optimized out>, addr=0x15223007f8e0, mem_root=<optimized out>, share=0x15223007ff10, this=0x1521f4063cf8) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_type.h:7748
      #5  Column_definition::make_field (field_name_arg=<optimized out>, mem_root=<optimized out>, share=0x15223007ff10, this=0x1521f4063cf8) at /test/mtest/MDEV-12252/11.7_opt/sql/field.h:5555
      #6  store_schema_proc (thd=0x1521f4000c58, table=0x1521f401e3c0, proc_table=0x1521f4026638, lookup=<optimized out>, full_access=<optimized out>, sp_user=<optimized out>) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_show.cc:7092
      #7  0x000055ff5377a068 in fill_schema_proc (thd=0x1521f4000c58, tables=<optimized out>, cond=<optimized out>) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_string.h:747
      #8  0x000055ff5377c73e in get_schema_tables_result (join=join@entry=0x1521f401ab40, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_show.cc:9608
      #9  0x000055ff5375d027 in JOIN::exec_inner (this=0x1521f401ab40) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_select.cc:4989
      #10 0x000055ff5375d92e in JOIN::exec (this=this@entry=0x1521f401ab40) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_select.cc:4812
      #11 0x000055ff5375b950 in mysql_select (thd=0x1521f4000c58, tables=0x1521f40187b0, fields=<optimized out>, conds=0x1521f40190b0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x1521f401ab18, unit=0x1521f4004f88, select_lex=0x1521f4018138) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_select.cc:5345
      #12 0x000055ff5375c157 in handle_select (thd=thd@entry=0x1521f4000c58, lex=lex@entry=0x1521f4004ea8, result=result@entry=0x1521f401ab18, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_select.cc:628
      #13 0x000055ff536d382e in execute_sqlcom_select (thd=0x1521f4000c58, all_tables=0x1521f40187b0) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_parse.cc:6154
      #14 0x000055ff536e1f9a in mysql_execute_command (thd=0x1521f4000c58, is_called_from_prepared_stmt=<optimized out>) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_parse.cc:3954
      #15 0x000055ff536cdd66 in mysql_parse (thd=0x1521f4000c58, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_parse.cc:7876
      #16 0x000055ff536daabd in dispatch_command (command=COM_QUERY, thd=0x1521f4000c58, packet=<optimized out>, packet_length=<optimized out>, blocking=<optimized out>) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_class.h:1639
      #17 0x000055ff536dcf2e in do_command (thd=0x1521f4000c58, blocking=blocking@entry=true) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_parse.cc:1405
      #18 0x000055ff53812c17 in do_handle_one_connection (connect=<optimized out>, put_in_cache=true) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_connect.cc:1448
      #19 0x000055ff53812f6d in handle_one_connection (arg=arg@entry=0x55ff56c5dbf8) at /test/mtest/MDEV-12252/11.7_opt/sql/sql_connect.cc:1350
      #20 0x000055ff53be6ca8 in pfs_spawn_thread (arg=0x55ff56c06178) at /test/mtest/MDEV-12252/11.7_opt/storage/perfschema/pfs.cc:2198
      #21 0x000015224894c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x0000152248538133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.