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

Server crashes when using temporary table with BIGINT field on providing incorrect value to CHECK function

    XMLWordPrintable

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11
    • 10.4, 10.5, 10.6
    • None

    Description

      CREATE TEMPORARY TABLE t (c BIGINT CHECK (c=''));
      

      Leads to:

      10.8.7 0751bfbcaf08c7c32de8d90b41b6c50ab525da6f (Debug)

      mysqld: /test/10.8_dbg/sql/sql_error.cc:335: void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*): Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' failed.
      

      10.8.7 0751bfbcaf08c7c32de8d90b41b6c50ab525da6f (Debug)

      Core was generated by `/test/MD071222-mariadb-10.8.7-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 0x14cf78089700 (LWP 1195787))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #1  0x000014cf90a0b859 in __GI_abort () at abort.c:79
      #2  0x000014cf90a0b729 in __assert_fail_base (fmt=0x14cf90ba1588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x5555c2e748d0 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=0x5555c2e747b0 "/test/10.8_dbg/sql/sql_error.cc", line=335, function=<optimized out>) at assert.c:92
      #3  0x000014cf90a1cfd6 in __GI___assert_fail (assertion=assertion@entry=0x5555c2e748d0 "!is_set() || (m_status == DA_OK_BULK && is_bulk_op())", file=file@entry=0x5555c2e747b0 "/test/10.8_dbg/sql/sql_error.cc", line=line@entry=335, function=function@entry=0x5555c2e74908 "void Diagnostics_area::set_ok_status(ulonglong, ulonglong, const char*)") at assert.c:101
      #4  0x00005555c228197d in Diagnostics_area::set_ok_status (this=0x14cf3c006ae0, affected_rows=affected_rows@entry=0, last_insert_id=last_insert_id@entry=0, message=message@entry=0x0) at /test/10.8_dbg/sql/sql_error.h:1038
      #5  0x00005555c23a96fd in my_ok (message=0x0, id=0, affected_rows_arg=0, thd=0x14cf3c000d48) at /test/10.8_dbg/sql/sql_class.h:5608
      #6  Sql_cmd_create_table_like::execute (this=<optimized out>, thd=0x14cf3c000d48) at /test/10.8_dbg/sql/sql_table.cc:12424
      #7  0x00005555c22d80fb in mysql_execute_command (thd=thd@entry=0x14cf3c000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.8_dbg/sql/sql_parse.cc:5989
      #8  0x00005555c22c0e0c in mysql_parse (thd=thd@entry=0x14cf3c000d48, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14cf78088310) at /test/10.8_dbg/sql/sql_parse.cc:8014
      #9  0x00005555c22ce441 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14cf3c000d48, packet=packet@entry=0x14cf3c00ad99 "CREATE TEMPORARY TABLE t (c BIGINT CHECK (c=''))", packet_length=packet_length@entry=48, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_class.h:1369
      #10 0x00005555c22d087a in do_command (thd=0x14cf3c000d48, blocking=blocking@entry=true) at /test/10.8_dbg/sql/sql_parse.cc:1407
      #11 0x00005555c2426fef in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5555c46f1108, put_in_cache=put_in_cache@entry=true) at /test/10.8_dbg/sql/sql_connect.cc:1415
      #12 0x00005555c24274be in handle_one_connection (arg=0x5555c46f1108) at /test/10.8_dbg/sql/sql_connect.cc:1317
      #13 0x000014cf90f1c609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #14 0x000014cf90b08133 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), 10.6.12 (dbg), 10.7.8 (dbg), 10.8.7 (dbg), 10.9.5 (dbg), 10.10.3 (dbg), 10.11.2 (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 (opt), 10.7.8 (opt), 10.8.7 (opt), 10.9.5 (opt), 10.10.3 (opt), 10.11.2 (opt)

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            ramesh Ramesh Sivaraman
            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.