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

Locking assertion for system_time partitioning

    XMLWordPrintable

    Details

      Description

      Assertion `thd->locked_tables_mode <= LTM_LOCK_TABLES || !thd->lex->requires_prelocking()' failed in lock_tables

      --source include/have_partition.inc
       
      CREATE OR REPLACE TABLE t1 (i INT) WITH SYSTEM VERSIONING PARTITION BY system_time INTERVAL 1 WEEK (PARTITION p1 HISTORY, PARTITION pn CURRENT);
      CREATE OR REPLACE TABLE t2 (f INT);
      CREATE TRIGGER tr BEFORE INSERT ON t2 FOR EACH ROW SELECT COUNT(*) from t1 INTO @a;
      INSERT INTO t2 VALUES (1);
       
      # Cleanup
      DROP TABLE t1, t2;
      

      bb-10.3-temporal e6c5eb5c583b

      mysqld: /data/src/bb-10.3-temporal/sql/sql_base.cc:4976: bool lock_tables(THD*, TABLE_LIST*, uint, uint): Assertion `thd->locked_tables_mode <= LTM_LOCK_TABLES || !thd->lex->requires_prelocking()' failed.
      171221 19:08:12 [ERROR] mysqld got signal 6 ;
       
      #7  0x00007face479aee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x00005612797a7e2d in lock_tables (thd=0x7faccc000b00, tables=0x7faccc014d28, count=2, flags=0) at /data/src/bb-10.3-temporal/sql/sql_base.cc:4975
      #9  0x00005612797a7650 in open_and_lock_tables (thd=0x7faccc000b00, options=..., tables=0x7faccc014d28, derived=true, flags=0, prelocking_strategy=0x7facdea081c0) at /data/src/bb-10.3-temporal/sql/sql_base.cc:4751
      #10 0x000056127979a137 in open_and_lock_tables (thd=0x7faccc000b00, tables=0x7faccc014d28, derived=true, flags=0) at /data/src/bb-10.3-temporal/sql/sql_base.h:496
      #11 0x00005612797f2d9b in mysql_insert (thd=0x7faccc000b00, table_list=0x7faccc014d28, fields=..., values_list=..., update_fields=..., update_values=..., duplic=DUP_ERROR, ignore=false) at /data/src/bb-10.3-temporal/sql/sql_insert.cc:777
      #12 0x0000561279829bfe in mysql_execute_command (thd=0x7faccc000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:4706
      #13 0x0000561279834358 in mysql_parse (thd=0x7faccc000b00, rawbuf=0x7faccc014c48 "INSERT INTO t2 VALUES (1)", length=25, parser_state=0x7facdea095f0, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:7991
      #14 0x0000561279821af9 in dispatch_command (command=COM_QUERY, thd=0x7faccc000b00, packet=0x7faccc11ef11 "INSERT INTO t2 VALUES (1)", packet_length=25, is_com_multi=false, is_next_command=false) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1825
      #15 0x000056127982052d in do_command (thd=0x7faccc000b00) at /data/src/bb-10.3-temporal/sql/sql_parse.cc:1370
      #16 0x00005612799881dc in do_handle_one_connection (connect=0x56127d1e6c40) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1420
      #17 0x0000561279987f69 in handle_one_connection (arg=0x56127d1e6c40) at /data/src/bb-10.3-temporal/sql/sql_connect.cc:1326
      #18 0x0000561279e22b92 in pfs_spawn_thread (arg=0x56127d1eecb0) at /data/src/bb-10.3-temporal/storage/perfschema/pfs.cc:1863
      #19 0x00007face6471494 in start_thread (arg=0x7facdea0a700) at pthread_create.c:333
      #20 0x00007face485793f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Reproducible with at least MyISAM and InnoDB.

        Attachments

          Activity

            People

            Assignee:
            midenok Aleksey Midenkov
            Reporter:
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.