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

LP:704337 - Item_in_subselect::val_int incorrectly called for a DELETE statement in prepared mode resulting in failed assert.

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      When run with --ps-protocol the test file subselect.test crashes with
      a failed assert as follows:

      DELETE FROM t1 WHERE topic IN (SELECT DISTINCT topic FROM t2 WHERE NOT
      EXISTS(SELECT * FROM t3 WHERE numeropost=topic))

      Results in Item_in_subselect::val_int() being called incorrectly,
      resulting in a failed assert.

      function=0xd178a0 "virtual longlong Item_in_subselect::val_int()") at assert.c:81
      #7 0x000000000064787b in Item_in_subselect::val_int (this=0x4eea150) at item_subselect.cc:1287
      #8 0x000000000070ba76 in SQL_SELECT::skip_record (this=0x4e8efa0, thd=0x3d0d018) at opt_range.h:916
      #9 0x000000000078d7cc in mysql_delete (thd=0x3d0d018, table_list=0x3df6140, conds=0x4eea150, order=0x3df56b0, limit=18446744073709551615, options=0,
      reset_auto_increment=false) at sql_delete.cc:321
      #10 0x00000000006bcc39 in mysql_execute_command (thd=0x3d0d018) at sql_parse.cc:3313
      #11 0x0000000000781c37 in Prepared_statement::execute (this=0x4ec8a58, expanded_query=0x7f6b31f7a950, open_cursor=false) at sql_prepare.cc:3631
      #12 0x0000000000780de3 in Prepared_statement::execute_loop (this=0x4ec8a58, expanded_query=0x7f6b31f7a950, open_cursor=false, packet=0x3c951f2 "",
      packet_end=0x3c951f2 "") at sql_prepare.cc:3306
      #13 0x000000000077ebb9 in mysqld_stmt_execute (thd=0x3d0d018, packet_arg=0x3c951e9 "T\001", packet_length=9) at sql_prepare.cc:2516
      #14 0x00000000006b6ffe in dispatch_command (command=COM_STMT_EXECUTE, thd=0x3d0d018, packet=0x3c951e9 "T\001", packet_length=9) at sql_parse.cc:1164
      #15 0x00000000006b653e in do_command (thd=0x3d0d018) at sql_parse.cc:903

      Attachments

        Activity

          People

            timour Timour Katchaounov (Inactive)
            timour Timour Katchaounov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.