← Back to team overview

maria-developers team mailing list archive

bzr commit into Mariadb 5.2, with Maria 2.0:maria/5.2 branch (knielsen:2764)

 

#At lp:maria/5.2

 2764 knielsen@xxxxxxxxxxxxxxx	2010-04-12
      MBug#524625: OQGraph error with binary logging enabled
      
      Set the correct engine flags for OQGraph to get binlogging working.
      removed:
        mysql-test/suite/oqgraph/t/basic-master.opt
      added:
        mysql-test/suite/oqgraph/r/binlog.result
        mysql-test/suite/oqgraph/t/binlog.test
        mysql-test/suite/oqgraph/t/suite.opt
      modified:
        storage/oqgraph/ha_oqgraph.cc

=== added file 'mysql-test/suite/oqgraph/r/binlog.result'
--- a/mysql-test/suite/oqgraph/r/binlog.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/r/binlog.result	2010-04-12 23:23:51 +0000
@@ -0,0 +1,18 @@
+drop table if exists graph;
+CREATE TABLE graph (
+latch   SMALLINT  UNSIGNED NULL,
+origid  BIGINT    UNSIGNED NULL,
+destid  BIGINT    UNSIGNED NULL,
+weight  DOUBLE    NULL,
+seq     BIGINT    UNSIGNED NULL,
+linkid  BIGINT    UNSIGNED NULL,
+KEY (latch, origid, destid) USING HASH,
+KEY (latch, destid, origid) USING HASH
+) ENGINE=OQGRAPH;
+SET binlog_format = row;
+insert into graph(origid, destid) values (1,3), (3,1);
+SET binlog_format = statement;
+insert into graph(origid, destid) values (3,4), (4,3);
+SET binlog_format = mixed;
+insert into graph(origid, destid) values (3,5), (5,3);
+drop table graph;

=== removed file 'mysql-test/suite/oqgraph/t/basic-master.opt'
--- a/mysql-test/suite/oqgraph/t/basic-master.opt	2010-01-04 08:27:50 +0000
+++ b/mysql-test/suite/oqgraph/t/basic-master.opt	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-$OQGRAPH_PLUGIN_OPT
-$OQGRAPH_PLUGIN_LOAD

=== added file 'mysql-test/suite/oqgraph/t/binlog.test'
--- a/mysql-test/suite/oqgraph/t/binlog.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/t/binlog.test	2010-04-12 23:23:51 +0000
@@ -0,0 +1,28 @@
+-- source suite/oqgraph/include/have_oqgraph_engine.inc
+-- source include/have_log_bin.inc
+
+--disable_warnings
+drop table if exists graph;
+--enable_warnings
+
+CREATE TABLE graph (
+    latch   SMALLINT  UNSIGNED NULL,
+    origid  BIGINT    UNSIGNED NULL,
+    destid  BIGINT    UNSIGNED NULL,
+    weight  DOUBLE    NULL,
+    seq     BIGINT    UNSIGNED NULL,
+    linkid  BIGINT    UNSIGNED NULL,
+    KEY (latch, origid, destid) USING HASH,
+    KEY (latch, destid, origid) USING HASH
+  ) ENGINE=OQGRAPH;
+
+# MBug#524625: OQGraph error with binary logging enabled 
+# Test that OQGraph works with different binlogging modes.
+SET binlog_format = row;
+insert into graph(origid, destid) values (1,3), (3,1);
+SET binlog_format = statement;
+insert into graph(origid, destid) values (3,4), (4,3);
+SET binlog_format = mixed;
+insert into graph(origid, destid) values (3,5), (5,3);
+
+drop table graph;

=== added file 'mysql-test/suite/oqgraph/t/suite.opt'
--- a/mysql-test/suite/oqgraph/t/suite.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/oqgraph/t/suite.opt	2010-04-12 23:23:51 +0000
@@ -0,0 +1,2 @@
+$OQGRAPH_PLUGIN_OPT
+$OQGRAPH_PLUGIN_LOAD

=== modified file 'storage/oqgraph/ha_oqgraph.cc'
--- a/storage/oqgraph/ha_oqgraph.cc	2010-01-04 13:32:42 +0000
+++ b/storage/oqgraph/ha_oqgraph.cc	2010-04-12 23:23:51 +0000
@@ -357,7 +357,8 @@ ulong ha_oqgraph::table_flags() const
 #endif
 {
   return (HA_NO_BLOBS | HA_NULL_IN_KEY |
-          HA_REC_NOT_IN_SEQ | HA_CAN_INSERT_DELAYED);
+          HA_REC_NOT_IN_SEQ | HA_CAN_INSERT_DELAYED |
+          HA_BINLOG_STMT_CAPABLE | HA_BINLOG_ROW_CAPABLE);
 }
 
 ulong ha_oqgraph::index_flags(uint inx, uint part, bool all_parts) const