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

Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS

Details

    • 10.2.12, 10.1.31

    Description

      CREATE TABLE t1 (a INT);
      CREATE TABLE t2 (b INT);
       
      PREPARE stmt FROM 'EXPLAIN UPDATE t1, t2 SET a = 1';
      EXECUTE stmt;
       
      # Cleanup
      DROP TABLE t1, t2;
      

      10.0 d8ccc61f76d56

      mysqld: /data/src/10.0/sql/sql_error.cc:407: void Diagnostics_area::set_eof_status(THD*): Assertion `! is_set()' failed.
      171205  1:57:04 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007f4d15067ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000000000627afa in Diagnostics_area::set_eof_status (this=0x7f4d0f2a6d80, thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_error.cc:407
      #9  0x00000000005a8e98 in my_eof (thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_class.h:3844
      #10 0x000000000061247b in select_send::send_eof (this=0x7f4d0d8fc048) at /data/src/10.0/sql/sql_class.cc:2602
      #11 0x00000000007980df in Explain_query::send_explain (this=0x7f4d0d8fbf38, thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_explain.cc:147
      #12 0x0000000000719891 in mysql_multi_update (thd=0x7f4d0f2a2070, table_list=0x7f4d0dbaf588, fields=0x7f4d0dbae960, values=0x7f4d0dbaee18, conds=0x0, options=268435456, handle_duplicates=DUP_ERROR, ignore=false, unit=0x7f4d0dbae158, select_lex=0x7f4d0dbae848, result=0x7f4d171366c0) at /data/src/10.0/sql/sql_update.cc:1606
      #13 0x000000000064e621 in mysql_execute_command (thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_parse.cc:3377
      #14 0x000000000066f1ec in Prepared_statement::execute (this=0x7f4d0d981470, expanded_query=0x7f4d17136bd0, open_cursor=false) at /data/src/10.0/sql/sql_prepare.cc:3974
      #15 0x000000000066e2be in Prepared_statement::execute_loop (this=0x7f4d0d981470, expanded_query=0x7f4d17136bd0, open_cursor=false, packet=0x0, packet_end=0x0) at /data/src/10.0/sql/sql_prepare.cc:3629
      #16 0x000000000066c5ac in mysql_sql_stmt_execute (thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_prepare.cc:2779
      #17 0x000000000064c708 in mysql_execute_command (thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_parse.cc:2563
      #18 0x0000000000656dc2 in mysql_parse (thd=0x7f4d0f2a2070, rawbuf=0x7f4d0d8fa088 "EXECUTE stmt", length=12, parser_state=0x7f4d17137640) at /data/src/10.0/sql/sql_parse.cc:6569
      #19 0x0000000000649901 in dispatch_command (command=COM_QUERY, thd=0x7f4d0f2a2070, packet=0x7f4d107e5071 "", packet_length=12) at /data/src/10.0/sql/sql_parse.cc:1296
      #20 0x0000000000648c01 in do_command (thd=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_parse.cc:999
      #21 0x0000000000768ab8 in do_handle_one_connection (thd_arg=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_connect.cc:1377
      #22 0x000000000076882a in handle_one_connection (arg=0x7f4d0f2a2070) at /data/src/10.0/sql/sql_connect.cc:1292
      #23 0x0000000000ac9564 in pfs_spawn_thread (arg=0x7f4d0f1a2370) at /data/src/10.0/storage/perfschema/pfs.cc:1861
      #24 0x00007f4d16d6b494 in start_thread (arg=0x7f4d17138700) at pthread_create.c:333
      #25 0x00007f4d1512493f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      No visible effect on non-debug builds.

      Attachments

        Activity

          elenst Elena Stepanova created issue -
          sanja Oleksandr Byelkin made changes -
          Field Original Value New Value
          Sprint 10.2.12 [ 216 ]
          sanja Oleksandr Byelkin made changes -
          Status Open [ 1 ] In Progress [ 3 ]

          First execution of Multi-update set OK, then explain set EOF.

          set_eof_status/set_ok_status

          sanja Oleksandr Byelkin added a comment - First execution of Multi-update set OK, then explain set EOF. set_eof_status/set_ok_status

          select_options & SELECT_DESCRIBE is not set during SP execution

          sanja Oleksandr Byelkin added a comment - select_options & SELECT_DESCRIBE is not set during SP execution

          /* remove option which was put by mysql_explain_union() */
          sl->options&= ~SELECT_DESCRIBE;

          Above remove the flag, but in deference of INSERT/DELETE we do not (can not) use mysql_explain_union().

          sanja Oleksandr Byelkin added a comment - /* remove option which was put by mysql_explain_union() */ sl->options&= ~SELECT_DESCRIBE; Above remove the flag, but in deference of INSERT/DELETE we do not (can not) use mysql_explain_union().

          github tree: 10.0-bb-MDEV-14572

          revision-id: 980a5c318803d6aa7355e019869597976dcf19bf (mariadb-10.0.33-37-g980a5c31880)
          parent(s): 042f763268c0f209e7c12e0a6a72bb5d204dfe29
          author: Oleksandr Byelkin
          committer: Oleksandr Byelkin
          timestamp: 2017-12-22 14:00:10 +0100
          message:

          MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS

          Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX
          (the same but in other way made before INSERT/DELETE/SELECT)

          —

          sanja Oleksandr Byelkin added a comment - github tree: 10.0-bb- MDEV-14572 revision-id: 980a5c318803d6aa7355e019869597976dcf19bf (mariadb-10.0.33-37-g980a5c31880) parent(s): 042f763268c0f209e7c12e0a6a72bb5d204dfe29 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2017-12-22 14:00:10 +0100 message: MDEV-14572 : Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX (the same but in other way made before INSERT/DELETE/SELECT) —
          sanja Oleksandr Byelkin made changes -
          Status In Progress [ 3 ] Stalled [ 10000 ]
          sanja Oleksandr Byelkin made changes -
          Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
          Status Stalled [ 10000 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Sprint 10.2.12 [ 216 ] 10.2.12, 10.1.31 [ 216, 225 ]
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Oleksandr Byelkin [ sanja ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          sanja Oleksandr Byelkin made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]

          revision-id: 2c7c6f702262284ac8e5c0c2cdb6945d62fd8efc (mariadb-10.0.35-37-g2c7c6f70226)
          parent(s): 24d7cbe1e0a16f75e2325c84f23531742e2a035d
          author: Oleksandr Byelkin
          committer: Oleksandr Byelkin
          timestamp: 2018-06-11 17:32:51 +0200
          message:

          MDEV-14572: Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS

          Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX
          (the same but in other way made before INSERT/DELETE/SELECT)

          Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN.

          —

          sanja Oleksandr Byelkin added a comment - revision-id: 2c7c6f702262284ac8e5c0c2cdb6945d62fd8efc (mariadb-10.0.35-37-g2c7c6f70226) parent(s): 24d7cbe1e0a16f75e2325c84f23531742e2a035d author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2018-06-11 17:32:51 +0200 message: MDEV-14572 : Assertion `! is_set()' failed in Diagnostics_area::set_eof_status upon EXPLAIN UPDATE in PS Restore EXPAIN flag in SELECT_LEX before execution multi-update by flag in LEX (the same but in other way made before INSERT/DELETE/SELECT) Without it, mysql_update() didn't know that there will be EXPLAIN result set and was sending OK at the end of the update, which conflicted with the EOF sent later by EXPLAIN. —
          sanja Oleksandr Byelkin made changes -
          Assignee Oleksandr Byelkin [ sanja ] Sergei Golubchik [ serg ]
          Status In Progress [ 3 ] In Review [ 10002 ]

          ok to push commit 2c7c6f70226

          serg Sergei Golubchik added a comment - ok to push commit 2c7c6f70226
          serg Sergei Golubchik made changes -
          Assignee Sergei Golubchik [ serg ] Oleksandr Byelkin [ sanja ]
          Status In Review [ 10002 ] Stalled [ 10000 ]
          alice Alice Sherepa made changes -
          Affects Version/s 10.3 [ 22126 ]
          alice Alice Sherepa made changes -
          Fix Version/s 10.3 [ 22126 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.4 [ 22408 ]
          sanja Oleksandr Byelkin made changes -
          Fix Version/s 10.1.40 [ 23306 ]
          Fix Version/s 10.2.24 [ 23308 ]
          Fix Version/s 10.3.15 [ 23309 ]
          Fix Version/s 10.4.5 [ 23311 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.0 [ 16000 ]
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1.41 [ 23406 ]
          Fix Version/s 10.1.40 [ 23306 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 84296 ] MariaDB v4 [ 153296 ]

          People

            sanja Oleksandr Byelkin
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.