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

Assertion `!conds' failed in mysql_delete upon 2nd execution of SP with DELETE HISTORY

    XMLWordPrintable

    Details

      Description

      CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING;
      CREATE OR REPLACE PROCEDURE pr() DELETE HISTORY FROM t1 BEFORE SYSTEM_TIME NOW(); 
      CALL pr;
      CALL pr;
       
      # Cleanup
      DROP PROCEDURE pr;
      DROP TABLE t1;
      

      10.3 141a5b2484

      mysqld: /data/src/10.3/sql/sql_delete.cc:329: bool mysql_delete(THD*, TABLE_LIST*, COND*, SQL_I_List<st_order>*, ha_rows, ulonglong, select_result*): Assertion `!conds' failed.
      180720  1:07:01 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007fd860948ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x000055be080c5fa8 in mysql_delete (thd=0x7fd848000b00, table_list=0x7fd8481464b0, conds=0x7fd848147030, order_list=0x7fd848126628, limit=18446744073709551615, options=0, result=0x0) at /data/src/10.3/sql/sql_delete.cc:329
      #9  0x000055be07c3934f in mysql_execute_command (thd=0x7fd848000b00) at /data/src/10.3/sql/sql_parse.cc:4920
      #10 0x000055be07b61f2a in sp_instr_stmt::exec_core (this=0x7fd848146be8, thd=0x7fd848000b00, nextp=0x7fd85aaed754) at /data/src/10.3/sql/sp_head.cc:3594
      #11 0x000055be07b61387 in sp_lex_keeper::reset_lex_and_exec_core (this=0x7fd848146c30, thd=0x7fd848000b00, nextp=0x7fd85aaed754, open_tables=false, instr=0x7fd848146be8) at /data/src/10.3/sql/sp_head.cc:3322
      #12 0x000055be07b61b0c in sp_instr_stmt::execute (this=0x7fd848146be8, thd=0x7fd848000b00, nextp=0x7fd85aaed754) at /data/src/10.3/sql/sp_head.cc:3500
      #13 0x000055be07b5b887 in sp_head::execute (this=0x7fd848145788, thd=0x7fd848000b00, merge_da_on_success=true) at /data/src/10.3/sql/sp_head.cc:1354
      #14 0x000055be07b5e24e in sp_head::execute_procedure (this=0x7fd848145788, thd=0x7fd848000b00, args=0x7fd848005740) at /data/src/10.3/sql/sp_head.cc:2294
      #15 0x000055be07c33560 in do_execute_sp (thd=0x7fd848000b00, sp=0x7fd848145788) at /data/src/10.3/sql/sql_parse.cc:2945
      #16 0x000055be07c340de in Sql_cmd_call::execute (this=0x7fd848014dc0, thd=0x7fd848000b00) at /data/src/10.3/sql/sql_parse.cc:3187
      #17 0x000055be07c3e2f1 in mysql_execute_command (thd=0x7fd848000b00) at /data/src/10.3/sql/sql_parse.cc:6280
      #18 0x000055be07c432eb in mysql_parse (thd=0x7fd848000b00, rawbuf=0x7fd848014d08 "CALL pr", length=7, parser_state=0x7fd85aaef5f0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8073
      #19 0x000055be07c3064a in dispatch_command (command=COM_QUERY, thd=0x7fd848000b00, packet=0x7fd84800b211 "CALL pr", packet_length=7, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1847
      #20 0x000055be07c2f06e in do_command (thd=0x7fd848000b00) at /data/src/10.3/sql/sql_parse.cc:1392
      #21 0x000055be07d953a5 in do_handle_one_connection (connect=0x55be0b4c1c10) at /data/src/10.3/sql/sql_connect.cc:1402
      #22 0x000055be07d95129 in handle_one_connection (arg=0x55be0b4c1c10) at /data/src/10.3/sql/sql_connect.cc:1308
      #23 0x000055be08226b27 in pfs_spawn_thread (arg=0x55be0b4d54b0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #24 0x00007fd86261f494 in start_thread (arg=0x7fd85aaf0700) at pthread_create.c:333
      #25 0x00007fd860a0593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with at least MyISAM and InnoDB.
      No visible effect on a non-debug build.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              serg Sergei Golubchik
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: