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

TokuDB: IGNORE clause doesn't work with ROW binlog format

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.5.36, 10.0.10
    • Fix Version/s: 5.5.38, 10.0.11
    • Component/s: None
    • Labels:

      Description

      When binary log is enabled in ROW format, statements like DELETE IGNORE ... etc. fail with ER_BINLOG_ROW_MODE_AND_STMT_ENGINE (Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging), while the same statements without IGNORE are executed all right. It works the same way on MariaDB-5.5.30-TokuDB-7.0.1, but it would be good to make sure it's an intentional limitation and not an oversight.

      MariaDB [test]> DROP TABLE IF EXISTS t1;
      Query OK, 0 rows affected (0.35 sec)
      
      MariaDB [test]> CREATE TABLE t1 (a INT(11), b CHAR(8)) ENGINE=TokuDB;
      Query OK, 0 rows affected (0.92 sec)
      
      MariaDB [test]> INSERT INTO t1 (a,b) VALUES (10000,'foobar'),(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e');
      Query OK, 6 rows affected (0.43 sec)
      Records: 6  Duplicates: 0  Warnings: 0
      
      MariaDB [test]> DELETE IGNORE FROM t1;
      ERROR 1662 (HY000): Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.
      MariaDB [test]> DELETE FROM t1;
      Query OK, 6 rows affected (0.18 sec)
      

      Test case (for MariaDB):

      # run with --mysqld=--plugin-load=ha_tokudb, 
      # because installing engine at runtime causes assertion failure MDEV-6082
      
      --source include/have_binlog_format_row.inc
      
      # install soname 'ha_tokudb.so';
      DROP TABLE IF EXISTS t1;
      CREATE TABLE t1 (a INT(11), b CHAR(8)) ENGINE=TokuDB;
      INSERT INTO t1 (a,b) VALUES (10000,'foobar'),(1,'a'),(2,'b'),(3,'c'),(4,'d'),(5,'e');
      DELETE IGNORE FROM t1;
      
      # uninstall soname 'ha_tokudb.so';
      

      bzr version-info

      revision-id: holyfoot@askmonty.org-20130514121908-d6tp4zsdkim0q4dg
      revno: 3768
      branch-nick: 5.5-hf-tokudb
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              prohaska7 Rich Prohaska added a comment -

              the workaround is to set tokudb_pk_insert_mode=2.

              Show
              prohaska7 Rich Prohaska added a comment - the workaround is to set tokudb_pk_insert_mode=2.
              Hide
              prohaska7 Rich Prohaska added a comment -

              fixed in tokudb 7.1.6

              Show
              prohaska7 Rich Prohaska added a comment - fixed in tokudb 7.1.6

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  elenst Elena Stepanova
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: