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

Replica SQL thread stops with 1846 error on ALTER ONLINE after LOCK WRITE

    XMLWordPrintable

Details

    Description

      After a LOCK TABLE WRITE, replica SQL thread stops with:
      Error 'LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED' on query. Default database: 'test'. Query: 'ALTER ONLINE TABLE `BB` ADD COLUMN IF NOT EXISTS scol8 BLOB NOT NULL, ALGORITHM=INPLACE'.
      This error is not seen on the primary, and the column scol8 is added to the table.

      If the ALTER ONLINE statement is not preceded by the LOCK TABLE WRITE, then ERROR 1846 is seen on the primary (and based on my understanding of LOCK TABLE WRITE, I do not see why it should cause a problem).

      Seen in 49ad875902e03ebcf66618f8f4a5a9253c9769a3, but not elsewhere (at least not seen on preview-10.10-gtid branch ed5a3e3d9434d3957ac57dcb75c51b83bb8745f9).

      --source include/have_innodb.inc
      --source include/have_binlog_format_row.inc
      --source include/master-slave.inc
      --source include/have_partition.inc
      --connection master
       
      USE test;
       
      CREATE TABLE BB (
                       col_varchar_key VARCHAR(1),
                       KEY (col_varchar_key)
                   ) ENGINE=InnoDB;
       
      INSERT INTO BB ( col_varchar_key ) VALUES ('g') ;
       
      ALTER TABLE `BB` ADD FULLTEXT KEY(`col_varchar_key`), ALGORITHM=INPLACE;
       
      LOCK TABLE `BB` WRITE;
       
      ALTER ONLINE TABLE `BB` ADD COLUMN IF NOT EXISTS scol8 BLOB NOT NULL, ALGORITHM=INPLACE;
       
      DROP TABLE `BB`;
      --source include/rpl_end.inc
      

      Originally seen with

      perl runall-new.pl --basedir=$BASEDIR --rpl_mode=row --grammar=conf/mariadb/alter_table.yy --threads=1  --queries=7000 --seed=0 --mysqld=--log_warnings=3  --validator=ReplicationWaitForSlave
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              angelique.sklavounos Angelique Sklavounos (Inactive)
              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.