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

Assertion `inited==RND' failed in handler::ha_rnd_end on DELETE from partition spider table with read_only_mode=1

    XMLWordPrintable

Details

    Description

      May be related to MDEV-26540, but different arrangements of
      read_only_mode cause different results, so it is different from that
      ticket.

      At 11.2 e81fa345020ec6a067583db6a7019d6404b26f93

      --echo #
      --echo # test delete_read_only_parts
      --echo #
       
      --disable_query_log
      --disable_result_log
      --source ../../t/test_init.inc
      --enable_result_log
      --enable_query_log
       
      set session spider_read_only_mode=-1;
      evalp CREATE SERVER srv FOREIGN DATA WRAPPER MYSQL OPTIONS (SOCKET "$MASTER_1_MYSOCK", DATABASE 'test',user 'root');
       
      CREATE TABLE t1 (a INT);
      CREATE TABLE t2 (a INT);
      CREATE TABLE t (a INT) ENGINE=Spider
      COMMENT='wrapper "mysql", table "t1", srv "srv"'
      PARTITION BY RANGE (a) (
        PARTITION p1 VALUES LESS THAN (3) COMMENT='read_only_mode "0"',
        PARTITION p2 VALUES LESS THAN MAXVALUE COMMENT='read_only_mode "1"'
      );
      # INSERT INTO t VALUES (1), (2);
      DELETE FROM t;
      DROP TABLE t, t1, t2;
      drop server srv;
       
      --disable_query_log
      --disable_result_log
      --source ../t/test_deinit.inc
      --enable_result_log
      --enable_query_log
       
      --echo #
      --echo # end of test delete_read_only_parts
      --echo #
      

      Variants:

      • Removing p1 partition: same failure
      • Change read_only_mode to 0 for p2: pass
      • Set table level read_only_mode to 1 and leave partition level
        comments empty: same failure
      • Set table level read_only_mode to 0 and leave partition level
        comments empty: pass
      • Set table level read_only_mode to 0 and remove partitions: pass
      • Set table level read_only_mode to 1 and remove partitions: fail with
        (12518): Table 'test.t' is read only, which makes sense

      I think the expected behaviour should be a failure 12518 when at least
      one partition has read_only_mode equal 1.

      Attachments

        Issue Links

          Activity

            People

              ycp Yuchen Pei
              ycp Yuchen Pei
              Votes:
              0 Vote for this issue
              Watchers:
              2 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.