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

Diagnostics_area::sql_errno() const: Assertion `m_status == DA_ERROR' failed on SELECT after setting tmp_disk_table_size.

    XMLWordPrintable

Details

    Description

      SET @@tmp_disk_table_size=16384;
      CREATE VIEW v AS SELECT 'a';
      SELECT table_name FROM INFORMATION_SCHEMA.views;
      

      Leads to:

      10.5.3 364e7a9ae6b5fbf69494cec30733b5ad28738cbb

      mysqld: /test/10.5_dbg/sql/sql_error.h:1036: uint Diagnostics_area::sql_errno() const: Assertion `m_status == DA_ERROR' failed.
      

      10.5.3 364e7a9ae6b5fbf69494cec30733b5ad28738cbb

      Core was generated by `/test/MD110420-mariadb-10.5.3-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:57
      [Current thread is 1 (Thread 0x7fcd668c3700 (LWP 10020))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:57
      #1  0x000055ec7862621e in my_write_core (sig=sig@entry=6) at /test/10.5_dbg/mysys/stacktrace.c:518
      #2  0x000055ec77dcc08f in handle_fatal_signal (sig=6) at /test/10.5_dbg/sql/signal_handler.cc:329
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #5  0x00007fcd65007801 in __GI_abort () at abort.c:79
      #6  0x00007fcd64ff739a in __assert_fail_base (fmt=0x7fcd6517e7d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x55ec78775490 "m_status == DA_ERROR", file=file@entry=0x55ec78775c28 "/test/10.5_dbg/sql/sql_error.h", line=line@entry=1036, function=function@entry=0x55ec787b4e00 <_ZZNK16Diagnostics_area9sql_errnoEvE19__PRETTY_FUNCTION__> "uint Diagnostics_area::sql_errno() const") at assert.c:92
      #7  0x00007fcd64ff7412 in __GI___assert_fail (assertion=assertion@entry=0x55ec78775490 "m_status == DA_ERROR", file=file@entry=0x55ec78775c28 "/test/10.5_dbg/sql/sql_error.h", line=line@entry=1036, function=function@entry=0x55ec787b4e00 <_ZZNK16Diagnostics_area9sql_errnoEvE19__PRETTY_FUNCTION__> "uint Diagnostics_area::sql_errno() const") at assert.c:101
      #8  0x000055ec77bb5ba4 in Diagnostics_area::sql_errno (this=0x7fcd3901ab80) at /test/10.5_dbg/sql/sql_error.h:1036
      #9  fill_schema_table_by_open (thd=thd@entry=0x7fcd39015088, mem_root=mem_root@entry=0x7fcd668bf480, is_show_fields_or_keys=is_show_fields_or_keys@entry=false, table=table@entry=0x7fcd390810a0, schema_table=schema_table@entry=0x55ec792bfe00 <schema_tables+2496>, orig_db_name=orig_db_name@entry=0x7fcd39078158, orig_table_name=0x7fcd393dc320, open_tables_state_backup=0x7fcd668bf4c0, can_deadlock=false) at /test/10.5_dbg/sql/sql_show.cc:4610
      #10 0x000055ec77bcb9de in get_all_tables (thd=0x7fcd39015088, tables=0x7fcd39074780, cond=<optimized out>) at /test/10.5_dbg/sql/sql_show.cc:5233
      #11 0x000055ec77bcc974 in get_schema_tables_result (join=join@entry=0x7fcd39075d38, executed_place=executed_place@entry=PROCESSED_BY_JOIN_EXEC) at /test/10.5_dbg/sql/sql_show.cc:8647
      #12 0x000055ec77ba02c3 in JOIN::exec_inner (this=this@entry=0x7fcd39075d38) at /test/10.5_dbg/sql/sql_select.cc:4420
      #13 0x000055ec77ba0c6b in JOIN::exec (this=this@entry=0x7fcd39075d38) at /test/10.5_dbg/sql/sql_select.cc:4244
      #14 0x000055ec77b9ef80 in mysql_select (thd=thd@entry=0x7fcd39015088, tables=<optimized out>, fields=..., conds=0x0, og_num=0, order=<optimized out>, group=0x0, having=0x0, proc_param=0x0, select_options=2684619520, result=0x7fcd39075d10, unit=0x7fcd39019090, select_lex=0x7fcd39074160) at /test/10.5_dbg/sql/sql_select.cc:4668
      #15 0x000055ec77b9f2af in handle_select (thd=thd@entry=0x7fcd39015088, lex=lex@entry=0x7fcd39018fc8, result=result@entry=0x7fcd39075d10, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/10.5_dbg/sql/sql_select.cc:417
      #16 0x000055ec77b2999a in execute_sqlcom_select (thd=thd@entry=0x7fcd39015088, all_tables=0x7fcd39074780) at /test/10.5_dbg/sql/sql_parse.cc:6168
      #17 0x000055ec77b223ed in mysql_execute_command (thd=thd@entry=0x7fcd39015088) at /test/10.5_dbg/sql/sql_parse.cc:3901
      #18 0x000055ec77b2f9d1 in mysql_parse (thd=thd@entry=0x7fcd39015088, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fcd668c2450, 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:7953
      #19 0x000055ec77b1b719 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fcd39015088, packet=packet@entry=0x7fcd39067089 "SELECT table_name FROM INFORMATION_SCHEMA.views", packet_length=packet_length@entry=47, 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:1839
      #20 0x000055ec77b19f6f in do_command (thd=0x7fcd39015088) at /test/10.5_dbg/sql/sql_parse.cc:1358
      #21 0x000055ec77c74a53 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x7fcd3d4433a8, put_in_cache=put_in_cache@entry=true) at /test/10.5_dbg/sql/sql_connect.cc:1422
      #22 0x000055ec77c74d82 in handle_one_connection (arg=arg@entry=0x7fcd3d4433a8) at /test/10.5_dbg/sql/sql_connect.cc:1319
      #23 0x000055ec780d5080 in pfs_spawn_thread (arg=0x7fcd64445888) at /test/10.5_dbg/storage/perfschema/pfs.cc:2201
      #24 0x00007fcd65cea6db in start_thread (arg=0x7fcd668c3700) at pthread_create.c:463
      #25 0x00007fcd650e888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.5.2 (dbg), 10.5.3 (dbg)

      Bug confirmed not present in:
      MariaDB: 10.1.45 (dbg), 10.1.45 (opt), 10.2.32 (dbg), 10.2.32 (opt), 10.3.23 (dbg), 10.3.23 (opt), 10.4.13 (dbg), 10.4.13 (opt), 10.5.2 (opt), 10.5.3 (opt)
      MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.47 (dbg), 5.6.47 (opt), 5.7.29 (dbg), 5.7.29 (opt), 8.0.19 (dbg), 8.0.19 (opt)

      The testcases passes without any errors or warnings on MariaDB 10.4.13 (dbg):

      10.4.13>SET @@tmp_disk_table_size=16384;
      Query OK, 0 rows affected (0.000 sec)
      10.4.13>CREATE VIEW v AS SELECT 'a';
      Query OK, 0 rows affected (0.004 sec)
      10.4.13>SELECT table_name FROM INFORMATION_SCHEMA.views;
      +------------+
      | table_name |
      +------------+
      | v          |
      | user       |
      +------------+
      2 rows in set (0.032 sec)
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              Roel Roel Van de Paar
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.