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

UPDATE/DELETE statements on ENGINE=DuckDB fail when binlog_format is set to ROW

    XMLWordPrintable

Details

    • Can result in unexpected behaviour

    Description

      UPDATE/DELETE statements on ENGINE=DuckDB fail when binlog_format is set to ROW, while the statements execute successfully with MIXED/STATEMENT binlog_format.

      Test case

      INSTALL SONAME 'ha_duckdb';
      CREATE TABLE t1 (id INT PRIMARY KEY, v VARCHAR(10)) ENGINE=DuckDB;
      INSERT INTO t1 VALUES (1,'a'),(2,'b');
      SET SESSION binlog_format=ROW;      -- log_bin can be OFF, this alone is enough
      UPDATE t1 SET v='x' WHERE id=1;
      DELETE FROM t1 WHERE id=1; 
      

      CLI Output

      13.1.0-opt>INSTALL SONAME 'ha_duckdb';
      Query OK, 0 rows affected (0.417 sec)
       
      13.1.0-opt>CREATE TABLE t1 (id INT PRIMARY KEY, v VARCHAR(10)) ENGINE=DuckDB;
      Query OK, 0 rows affected (0.012 sec)
       
      13.1.0-opt>INSERT INTO t1 VALUES (1,'a'),(2,'b');
      Query OK, 2 rows affected (0.013 sec)
      Records: 2  Duplicates: 0  Warnings: 0
       
      13.1.0-opt>SET SESSION binlog_format=ROW;
      Query OK, 0 rows affected (0.000 sec)
       
      13.1.0-opt>UPDATE t1 SET v='x' WHERE id=1;
      ERROR 1031 (HY000): Storage engine DUCKDB of the table `test`.`t1` doesn't have this option
      13.1.0-opt>
      13.1.0-opt>DELETE FROM t1 WHERE id=1;
      ERROR 1031 (HY000): Storage engine DUCKDB of the table `test`.`t1` doesn't have this option
      13.1.0-opt>
      13.1.0-opt>
      13.1.0-opt>SET SESSION binlog_format=MIXED;
      Query OK, 0 rows affected (0.000 sec)
       
      13.1.0-opt>UPDATE t1 SET v='x' WHERE id=1;
      Query OK, 1 row affected (0.016 sec)
      Rows matched: 1  Changed: 1  Warnings: 0
       
      13.1.0-opt>
      

      Attachments

        Issue Links

          Activity

            People

              drrtuy Roman
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 0.5h
                  0.5h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.