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

Disallow bulk insert operation during partition update statement

    XMLWordPrintable

Details

    Description

      --source include/galera_cluster.inc
      --source include/have_partition.inc
      --source include/have_innodb.inc
       
      SET UNIQUE_CHECKS=0;
      SET foreign_key_checks=0;
      CREATE OR REPLACE TABLE t(a INT KEY) ENGINE=INNODB PARTITION BY KEY(a) PARTITIONS 16;
      INSERT INTO t VALUES(1);
      UPDATE t SET a=2 WHERE a=1;
      

      Leads to:

      11.5.0 8f0c9340537b84fcd7012d4a31e6f858e7eb919c (Debug)

      mysqld: /test/server_dbg/storage/innobase/handler/ha_innodb.cc:10040: int wsrep_append_key(THD*, trx_t*, TABLE_SHARE*, const char*, uint16_t, Wsrep_service_key_type): Assertion `!trx->is_bulk_insert()' failed.
      

      11.5.0 8f0c9340537b84fcd7012d4a31e6f858e7eb919c (Debug)

      Core was generated by `/test/GAL_MD230324-mariadb-11.5.0-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 0x152560109700 (LWP 2163186))]
      (gdb) bt
      #0  __pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:56
      #1  0x0000562af6b9642e in my_write_core (sig=sig@entry=6) at /test/server_dbg/mysys/stacktrace.c:424
      #2  0x0000562af6475a16 in handle_fatal_signal (sig=6) at /test/server_dbg/sql/signal_handler.cc:357
      #3  <signal handler called>
      #4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
      #5  0x0000152597ce3859 in __GI_abort () at abort.c:79
      #6  0x0000152597ce3729 in __assert_fail_base (fmt=0x152597e79588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x562af6f8d2e4 "!trx->is_bulk_insert()", file=0x562af6f8fae8 "/test/server_dbg/storage/innobase/handler/ha_innodb.cc", line=10040, function=<optimized out>) at assert.c:92
      #7  0x0000152597cf4fd6 in __GI___assert_fail (assertion=assertion@entry=0x562af6f8d2e4 "!trx->is_bulk_insert()", file=file@entry=0x562af6f8fae8 "/test/server_dbg/storage/innobase/handler/ha_innodb.cc", line=line@entry=10040, function=function@entry=0x562af6f90bc0 "int wsrep_append_key(THD*, trx_t*, TABLE_SHARE*, const char*, uint16_t, Wsrep_service_key_type)") at assert.c:101
      #8  0x0000562af6773ca8 in wsrep_append_key (thd=thd@entry=0x15252c000d48, trx=trx@entry=0x15258721d680, table_share=0x15252c028cb0, key=key@entry=0x152560105900 "", key_len=5, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE) at /test/server_dbg/storage/innobase/handler/ha_innodb.cc:10078
      #9  0x0000562af677f802 in ha_innobase::wsrep_append_keys (this=this@entry=0x15252c03b2c0, thd=0x15252c000d48, key_type=key_type@entry=WSREP_SERVICE_KEY_EXCLUSIVE, record0=record0@entry=0x15252c038458 "\377\001", record1=record1@entry=0x0) at /test/server_dbg/storage/innobase/handler/ha_innodb.cc:10246
      #10 0x0000562af679f1f1 in ha_innobase::delete_row (this=0x15252c03b2c0, record=0x15252c038458 "\377\001") at /test/server_dbg/storage/innobase/handler/ha_innodb.cc:8678
      #11 0x0000562af6489bdd in handler::ha_delete_row (this=0x15252c03b2c0, buf=buf@entry=0x15252c038458 "\377\001") at /test/server_dbg/sql/handler.cc:8085
      #12 0x0000562af6730d9c in ha_partition::update_row (this=0x15252c0387e0, old_data=0x15252c038458 "\377\001", new_data=0x15252c038450 "\377\002") at /test/server_dbg/sql/ha_partition.cc:4796
      #13 0x0000562af648ec65 in handler::ha_update_row (this=0x15252c0387e0, old_data=0x15252c038458 "\377\001", new_data=0x15252c038450 "\377\002") at /test/server_dbg/sql/handler.cc:8008
      #14 0x0000562af6274d40 in Sql_cmd_update::update_single_table (this=<optimized out>, thd=0x15252c000d48) at /test/server_dbg/sql/sql_update.cc:997
      #15 0x0000562af6275bba in Sql_cmd_update::execute_inner (this=0x15252c01b628, thd=0x15252c000d48) at /test/server_dbg/sql/sql_update.cc:3081
      #16 0x0000562af618fe9e in Sql_cmd_dml::execute (this=0x15252c01b628, thd=0x15252c000d48) at /test/server_dbg/sql/sql_select.cc:33584
      #17 0x0000562af614cf75 in mysql_execute_command (thd=thd@entry=0x15252c000d48, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/server_dbg/sql/sql_parse.cc:4396
      #18 0x0000562af613cfb3 in mysql_parse (thd=thd@entry=0x15252c000d48, rawbuf=rawbuf@entry=0x15252c01ac50 "UPDATE t SET a=2 WHERE a=1", length=length@entry=26, parser_state=parser_state@entry=0x152560108280) at /test/server_dbg/sql/sql_parse.cc:7821
      #19 0x0000562af613c8b9 in wsrep_mysql_parse (thd=thd@entry=0x15252c000d48, rawbuf=0x15252c01ac50 "UPDATE t SET a=2 WHERE a=1", length=26, parser_state=parser_state@entry=0x152560108280) at /test/server_dbg/sql/sql_parse.cc:7631
      #20 0x0000562af6153a6f in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x15252c000d48, packet=packet@entry=0x15252c00b029 "UPDATE t SET a=2 WHERE a=1", packet_length=packet_length@entry=26, blocking=blocking@entry=true) at /test/server_dbg/sql/sql_class.h:1636
      #21 0x0000562af6156217 in do_command (thd=0x15252c000d48, blocking=blocking@entry=true) at /test/server_dbg/sql/sql_parse.cc:1405
      #22 0x0000562af62d1d3a in do_handle_one_connection (connect=<optimized out>, connect@entry=0x562af9d4d8c8, put_in_cache=put_in_cache@entry=true) at /test/server_dbg/sql/sql_connect.cc:1447
      #23 0x0000562af62d220c in handle_one_connection (arg=0x562af9d4d8c8) at /test/server_dbg/sql/sql_connect.cc:1349
      #24 0x00001525981f4609 in start_thread (arg=<optimized out>) at pthread_create.c:477
      #25 0x0000152597de0133 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      

      Bug confirmed present in:
      MariaDB: 10.6.18 (dbg), 10.11.8 (dbg), 11.0.6 (dbg), 11.1.4 (dbg), 11.2.4 (dbg), 11.3.2 (dbg), 11.4.2 (dbg), 11.5.0 (dbg)

      Bug (or feature/syntax) confirmed not present in:
      MariaDB: 10.4.34 (dbg), 10.4.34 (opt), 10.5.25 (dbg), 10.5.25 (opt), 10.6.18 (opt), 10.11.8 (opt), 11.0.6 (opt), 11.1.4 (opt), 11.2.4 (opt), 11.3.2 (opt), 11.4.2 (opt), 11.5.0 (opt)

      Attachments

        Activity

          People

            thiru Thirunarayanan Balathandayuthapani
            ramesh Ramesh Sivaraman
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.