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

Assertion failure in Diagnostics_area::set_error_status / Reprepare_observer::report_error

    XMLWordPrintable

Details

    Description

      The test case is almost identical to MDEV-30277, however MDEV-30277 fix is already in 10.11 branch, while the test case below still fails there (but not on 11.4 and higher).

      CREATE TABLE t (a INT);
      PREPARE stmt FROM " UPDATE t SET a = ? LIMIT ?";
      ALTER TABLE t FORCE;
      EXECUTE stmt USING 1, DEFAULT;
       
      # Cleanup
      DROP TABLE t;
      

      10.11 faf1a76516626fb3393cb6501f319bc146f44d97

      mariadbd: /data/bld/10.11-asan-ubsan/sql/sql_error.cc:468: void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*): Assertion `! is_set() || m_can_overwrite_status' failed.
      260103 14:41:10 [ERROR] /share8t/bld/10.11-asan-ubsan/sql/mariadbd got signal 6 ;
       
      #9  0x00007fcd52845395 in __assert_fail_base (fmt=0x7fcd529b9a90 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x5606d8801ea0 "! is_set() || m_can_overwrite_status", file=file@entry=0x5606d8802d40 "/data/bld/10.11-asan-ubsan/sql/sql_error.cc", line=line@entry=468, function=function@entry=0x5606d8801f00 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:92
      #10 0x00007fcd52853eb2 in __GI___assert_fail (assertion=0x5606d8801ea0 "! is_set() || m_can_overwrite_status", file=0x5606d8802d40 "/data/bld/10.11-asan-ubsan/sql/sql_error.cc", line=468, function=0x5606d8801f00 "void Diagnostics_area::set_error_status(uint, const char*, const char*, const Sql_user_condition_identity&, const Sql_condition*)") at ./assert/assert.c:101
      #11 0x00005606d4cc3f72 in Diagnostics_area::set_error_status (this=this@entry=0x62c0000b6368, sql_errno=sql_errno@entry=1615, message=<optimized out>, sqlstate=sqlstate@entry=0x5606d88fbd20 "HY000", ucid=..., error_condition=error_condition@entry=0x0) at /data/bld/10.11-asan-ubsan/sql/sql_error.cc:468
      #12 0x00005606d4cc4594 in Diagnostics_area::set_error_status (this=this@entry=0x62c0000b6368, sql_errno=sql_errno@entry=1615) at /data/bld/10.11-asan-ubsan/sql/sql_error.cc:430
      #13 0x00005606d4fc3133 in Reprepare_observer::report_error (this=this@entry=0x7fcd487cfa90, thd=thd@entry=0x62c0000b0218) at /data/bld/10.11-asan-ubsan/sql/sql_prepare.cc:4061
      #14 0x00005606d4b16312 in check_and_update_table_version (thd=thd@entry=0x62c0000b0218, tables=tables@entry=0x62d00026e298, table_share=0x625000249138) at /data/bld/10.11-asan-ubsan/sql/sql_base.cc:3140
      #15 0x00005606d4b3c145 in open_and_process_table (thd=thd@entry=0x62c0000b0218, tables=tables@entry=0x62d00026e298, counter=counter@entry=0x7fcd487ce3f0, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7fcd487ce2b0, has_prelocking_list=has_prelocking_list@entry=false, ot_ctx=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/sql_base.cc:4292
      #16 0x00005606d4b700c0 in open_tables (thd=thd@entry=0x62c0000b0218, options=..., start=start@entry=0x7fcd487ce510, counter=counter@entry=0x7fcd487ce3f0, flags=flags@entry=0, prelocking_strategy=prelocking_strategy@entry=0x7fcd487ce2b0) at /data/bld/10.11-asan-ubsan/sql/sql_base.cc:4722
      #17 0x00005606d4aec6cd in open_tables (thd=thd@entry=0x62c0000b0218, tables=tables@entry=0x7fcd487ce510, counter=counter@entry=0x7fcd487ce3f0, flags=flags@entry=0) at /data/bld/10.11-asan-ubsan/sql/sql_base.h:489
      #18 0x00005606d54eb7a3 in mysql_update (thd=thd@entry=0x62c0000b0218, table_list=<optimized out>, fields=..., values=..., conds=conds@entry=0x0, order_num=order_num@entry=0, order=<optimized out>, limit=<optimized out>, ignore=<optimized out>, found_return=<optimized out>, updated_return=<optimized out>) at /data/bld/10.11-asan-ubsan/sql/sql_update.cc:415
      #19 0x00005606d4ed02db in mysql_execute_command (thd=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:4487
      #20 0x00005606d4fe5208 in Prepared_statement::execute (this=this@entry=0x619000059b98, expanded_query=expanded_query@entry=0x7fcd487cfba0, open_cursor=open_cursor@entry=false) at /data/bld/10.11-asan-ubsan/sql/sql_prepare.cc:5299
      #21 0x00005606d4fe93f2 in Prepared_statement::execute_loop (this=this@entry=0x619000059b98, expanded_query=expanded_query@entry=0x7fcd487cfba0, open_cursor=open_cursor@entry=false, packet=packet@entry=0x0, packet_end=packet_end@entry=0x0) at /data/bld/10.11-asan-ubsan/sql/sql_prepare.cc:4700
      #22 0x00005606d4feb823 in mysql_sql_stmt_execute (thd=thd@entry=0x62c0000b0218) at /data/bld/10.11-asan-ubsan/sql/sql_prepare.cc:3727
      #23 0x00005606d4ecb4a8 in mysql_execute_command (thd=thd@entry=0x62c0000b0218, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:4040
      #24 0x00005606d4eee2c3 in mysql_parse (thd=thd@entry=0x62c0000b0218, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fcd487d0ab0) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:8230
      #25 0x00005606d4ef7670 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x62c0000b0218, packet=packet@entry=0x62900024e219 "EXECUTE stmt USING 1, DEFAULT", packet_length=packet_length@entry=29, blocking=blocking@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:1924
      #26 0x00005606d4f04375 in do_command (thd=thd@entry=0x62c0000b0218, blocking=blocking@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_parse.cc:1434
      #27 0x00005606d56fe31e in do_handle_one_connection (connect=<optimized out>, connect@entry=0x6080000039b8, put_in_cache=put_in_cache@entry=true) at /data/bld/10.11-asan-ubsan/sql/sql_connect.cc:1475
      #28 0x00005606d56ff47b in handle_one_connection (arg=0x6080000039b8) at /data/bld/10.11-asan-ubsan/sql/sql_connect.cc:1387
      #29 0x00005606d70801d3 in pfs_spawn_thread (arg=0x617000005b98) at /data/bld/10.11-asan-ubsan/storage/perfschema/pfs.cc:2201
      #30 0x00007fcd528a81c4 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #31 0x00007fcd5292885c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      The non-debug error is still the same

      ER_INVALID_DEFAULT_PARAM (4032): Default/ignore value is not supported for such parameter usage
      

      Attachments

        Issue Links

          Activity

            People

              rucha174 Rucha Deodhar
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.