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

Assertion `trans_safe || !updated || thd->transaction->stmt.modified_non_trans_table' failed in virtual bool multi_update::send_eof()

    XMLWordPrintable

    Details

      Description

      CREATE TABLE ti (a INT UNSIGNED, b SMALLINT, id BIGINT NOT NULL, KEY(b), PRIMARY KEY(id)) ENGINE=InnoDB;
      CREATE TABLE tm (a INT PRIMARY KEY, b MEDIUMTEXT) ENGINE=MyISAM;
      START TRANSACTION;
      INSERT INTO tm SET b=NULL, a=2;
      SET sql_mode=only_full_group_by;
      INSERT INTO ti VALUES (1,2,4);
      SET GLOBAL wsrep_max_ws_rows=2;
      UPDATE tm AS t1, ti AS t2 SET t1.a=t1.a * 2, t2.a=t2.a * 2;
      UPDATE tm AS t1, ti AS t2 SET t1.a=t1.a * 2, t2.a=t2.a * 2;
      

      Leads to

      10.9.1 5dba54bfef31d91c082362065cd091086e20ee9a (Debug)

      mysqld: /test/10.9_dbg/sql/sql_update.cc:3098: virtual bool multi_update::send_eof(): Assertion `trans_safe || !updated || thd->transaction->stmt.modified_non_trans_table' failed.
      

      10.9.1 5dba54bfef31d91c082362065cd091086e20ee9a (Debug)

      Core was generated by `/test/GAL_MD160522-mariadb-10.9.1-linux-x86_64-dbg/bin/mysqld --defaults-file=/'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6)
          at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      [Current thread is 1 (Thread 0x147c0b91b700 (LWP 2681316))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000561227a2ada5 in my_write_core (sig=sig@entry=6) at /test/10.9_dbg/mysys/stacktrace.c:424
      #2  0x00005612272d2631 in handle_fatal_signal (sig=6) at /test/10.9_dbg/sql/signal_handler.cc:345
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000147c59359859 in __GI_abort () at abort.c:79
      #6  0x0000147c59359729 in __assert_fail_base (fmt=0x147c594ef588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x561227bfbb60 "trans_safe || !updated || thd->transaction->stmt.modified_non_trans_table", file=0x561227bfb618 "/test/10.9_dbg/sql/sql_update.cc", line=3098, function=<optimized out>) at assert.c:92
      #7  0x0000147c5936af36 in __GI___assert_fail (assertion=assertion@entry=0x561227bfbb60 "trans_safe || !updated || thd->transaction->stmt.modified_non_trans_table", file=file@entry=0x561227bfb618 "/test/10.9_dbg/sql/sql_update.cc", line=line@entry=3098, function=function@entry=0x561227bfbbb0 "virtual bool multi_update::send_eof()") at assert.c:101
      #8  0x00005612270f7b81 in multi_update::send_eof (this=0x147be0015318) at /test/10.9_dbg/sql/sql_update.cc:3098
      #9  0x000056122707ed13 in do_select (procedure=<optimized out>, join=0x147be0015448) at /test/10.9_dbg/sql/sql_select.cc:20726
      #10 JOIN::exec_inner (this=this@entry=0x147be0015448) at /test/10.9_dbg/sql/sql_select.cc:4778
      #11 0x000056122707f12b in JOIN::exec (this=this@entry=0x147be0015448) at /test/10.9_dbg/sql/sql_select.cc:4556
      #12 0x000056122707cead in mysql_select (thd=thd@entry=0x147be0000db8, tables=tables@entry=0x147be0013d20, fields=@0x147c0b919df0: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x5612284c7bc0 <end_of_list>, last = 0x147c0b919df0, elements = 0}, <No data fields>}, conds=conds@entry=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2200096997504, result=0x147be0015318, unit=0x147be0004fd8, select_lex=0x147be00057d8) at /test/10.9_dbg/sql/sql_select.cc:5036
      #13 0x00005612270f6208 in mysql_multi_update (thd=thd@entry=0x147be0000db8, table_list=0x147be0013d20, fields=fields@entry=0x147be0005a78, values=values@entry=0x147be0005ea8, conds=0x0, options=0, handle_duplicates=DUP_ERROR, ignore=false, unit=0x147be0004fd8, select_lex=0x147be00057d8, result=0x147c0b919fd0) at /test/10.9_dbg/sql/sql_update.cc:1976
      #14 0x0000561226ff66fd in mysql_execute_command (thd=thd@entry=0x147be0000db8, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/10.9_dbg/sql/sql_parse.cc:4505
      #15 0x0000561226fe2e3f in mysql_parse (thd=thd@entry=0x147be0000db8, rawbuf=rawbuf@entry=0x147be0013bf0 "UPDATE tm AS t1, ti AS t2 SET t1.a=t1.a * 2, t2.a=t2.a * 2", length=length@entry=58, parser_state=parser_state@entry=0x147c0b91a470) at /test/10.9_dbg/sql/sql_parse.cc:8047
      #16 0x0000561226fe2848 in wsrep_mysql_parse (thd=thd@entry=0x147be0000db8, rawbuf=0x147be0013bf0 "UPDATE tm AS t1, ti AS t2 SET t1.a=t1.a * 2, t2.a=t2.a * 2", length=58, parser_state=parser_state@entry=0x147c0b91a470) at /test/10.9_dbg/sql/sql_parse.cc:7860
      #17 0x0000561226ff0838 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x147be0000db8, packet=packet@entry=0x147be000b699 "UPDATE tm AS t1, ti AS t2 SET t1.a=t1.a * 2, t2.a=t2.a * 2", packet_length=packet_length@entry=58, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_class.h:1364
      #18 0x0000561226ff2f31 in do_command (thd=0x147be0000db8, blocking=blocking@entry=true) at /test/10.9_dbg/sql/sql_parse.cc:1409
      #19 0x0000561227152fa5 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x561229a87088, put_in_cache=put_in_cache@entry=true) at /test/10.9_dbg/sql/sql_connect.cc:1418
      #20 0x00005612271534b1 in handle_one_connection (arg=0x561229a87088) at /test/10.9_dbg/sql/sql_connect.cc:1312
      #21 0x0000147c59868609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #22 0x0000147c59456293 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.3.35 (dbg), 10.4.25 (dbg), 10.5.16 (dbg), 10.6.8 (dbg), 10.7.4 (dbg), 10.8.3 (dbg), 10.9.1 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.3.35 (opt), 10.4.25 (opt), 10.5.16 (opt), 10.6.8 (opt), 10.7.4 (opt), 10.8.3 (opt), 10.9.1 (opt)

        Attachments

          Activity

            People

            Assignee:
            jplindst Jan Lindström
            Reporter:
            ramesh Ramesh Sivaraman
            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.