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

Replication stops with Column 1 of table 'test.D' cannot be converted from type 'geometry' to type 'blob'

    XMLWordPrintable

Details

    Description

      I'm not sure if this is actually a replication problem or not. Before 10.6 with the test case below, the line

      ALTER ONLINE TABLE `DD` RENAME TO t4, ADD geocol4 GEOMETRY DEFAULT ST_GEOMFROMTEXT('Point(1 1)');
      

      doesn't error, and the subsequent commands error. But in 10.6 and above, it errors with:

      ERROR 23000: Can't write; duplicate key in table 'mysql.innodb_table_stats'
      

      and the remaining commands execute.

      To reproduce

      --source include/have_innodb.inc
      --source include/master-slave.inc
      --source include/have_binlog_format_row.inc
      --disable_abort_on_error
       
      --connection master
      USE test;
      CREATE OR REPLACE SEQUENCE `A` Engine=InnoDB;
      CREATE TABLE t4 LIKE `A`;
      # this errors but is needed for replication failure
      ALTER ONLINE TABLE t4 ADD CONSTRAINT g CHECK (icol5 > 3), DROP CONSTRAINT w, DROP CONSTRAINT v, ADD CONSTRAINT h PRIMARY KEY(icol2), ALGORITHM=DEFAULT, LOCK=NONE;
      CREATE OR REPLACE TABLE t4 (scol9 BLOB DEFAULT '' CHECK (`col_int_key` LIKE tcol1) ) Engine=InnoDB;
      CREATE OR REPLACE TABLE `DD` (geocol9 POLYGON ) Engine=InnoDB;
      ALTER ONLINE TABLE `DD` RENAME TO t4, ADD geocol4 GEOMETRY DEFAULT ST_GEOMFROMTEXT('Point(1 1)');
      ALTER TABLE `DD` RENAME TO `D`;
      ALTER TABLE `D` ADD IF NOT EXISTS `col_varchar_key` BLOB NULL DEFAULT NULL, LOCK=SHARED;
      INSERT INTO `D` () VALUES (),(),();
      --connection slave
      --let $status_items= Last_SQL_Error, Slave_SQL_Running
      --source include/show_slave_status.inc
      --let $slave_param= Slave_SQL_Running
      --let $slave_param_value= Yes
      --source include/check_slave_param.inc
      --connection master
      DROP DATABASE test;
      CREATE DATABASE test;
      --source include/rpl_end.inc
      

      Attachments

        Activity

          People

            Elkin Andrei Elkin
            angelique.sklavounos Angelique Sklavounos (Inactive)
            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.