diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-16 17:19:53 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-16 17:19:53 +0200 |
commit | e53b603f7c12d61ffb5da945d67510c84cf95f05 (patch) | |
tree | 62fc1c5122151223a8ed6e5a5fc08a38a75246e7 /storage/sequence | |
parent | 08a1ac9d35d8435d73c0c37d971563e6a0775bc5 (diff) | |
download | mariadb-git-e53b603f7c12d61ffb5da945d67510c84cf95f05.tar.gz |
MDEV-4451 Attempt to write-lock a SEQUENCE table with log-bin enabled causes ER_BINLOG_ROW_ENGINE
mark the SEQUENCE engine as both SBR and RBR capable :)
Diffstat (limited to 'storage/sequence')
-rw-r--r-- | storage/sequence/mysql-test/sequence/simple.result | 4 | ||||
-rw-r--r-- | storage/sequence/mysql-test/sequence/simple.test | 9 | ||||
-rw-r--r-- | storage/sequence/sequence.cc | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/storage/sequence/mysql-test/sequence/simple.result b/storage/sequence/mysql-test/sequence/simple.result index 24619e47ce2..a1dbd33ec19 100644 --- a/storage/sequence/mysql-test/sequence/simple.result +++ b/storage/sequence/mysql-test/sequence/simple.result @@ -269,3 +269,7 @@ master-bin.000001 # Query # # use test; insert t1 select * from seq_1_to_10 master-bin.000001 # Xid # # COMMIT /* XID */ drop table t1; drop table seq_1_to_1; +set binlog_format=statement; +lock table seq_1_to_2 write; +set binlog_format=row; +lock table seq_1_to_2 write; diff --git a/storage/sequence/mysql-test/sequence/simple.test b/storage/sequence/mysql-test/sequence/simple.test index 040c91d1d77..7c76997dddf 100644 --- a/storage/sequence/mysql-test/sequence/simple.test +++ b/storage/sequence/mysql-test/sequence/simple.test @@ -95,3 +95,12 @@ drop table t1; # MDEV-4449 SEQUENCE depends on TEST_SQL_DISCOVERY for discovering tables upon DDL # drop table seq_1_to_1; + +# +# MDEV-4451 Attempt to write-lock a SEQUENCE table with log-bin enabled causes ER_BINLOG_ROW_ENGINE_AND_STMT_ENGINE +# +set binlog_format=statement; +lock table seq_1_to_2 write; +set binlog_format=row; +lock table seq_1_to_2 write; + diff --git a/storage/sequence/sequence.cc b/storage/sequence/sequence.cc index c92ef0b16e0..60b360592ce 100644 --- a/storage/sequence/sequence.cc +++ b/storage/sequence/sequence.cc @@ -45,7 +45,8 @@ private: public: ha_seq(handlerton *hton, TABLE_SHARE *table_arg) : handler(hton, table_arg), seqs(0) { } - ulonglong table_flags() const { return 0; } + ulonglong table_flags() const + { return HA_BINLOG_ROW_CAPABLE | HA_BINLOG_STMT_CAPABLE; } /* open/close/locking */ int create(const char *name, TABLE *table_arg, |