null+****@clear*****
null+****@clear*****
2011年 9月 2日 (金) 10:47:31 JST
Kouhei Sutou 2011-09-02 01:47:31 +0000 (Fri, 02 Sep 2011)
New Revision: 77273cb4e3781ba6c55180890fc49303de269037
Log:
[test][wrapper] add tests for binary log.
Added files:
test/sql/groonga_wrapper/r/binlog.result
test/sql/groonga_wrapper/t/binlog.test
Modified files:
test/sql/groonga_wrapper/r/Makefile.am
test/sql/groonga_wrapper/t/Makefile.am
Modified: test/sql/groonga_wrapper/r/Makefile.am (+2 -0)
===================================================================
--- test/sql/groonga_wrapper/r/Makefile.am 2011-09-02 01:39:03 +0000 (0e7c0e6)
+++ test/sql/groonga_wrapper/r/Makefile.am 2011-09-02 01:47:31 +0000 (d50fb2e)
@@ -1,8 +1,10 @@
# echo "EXTRA_DIST = \\"; ls *.result | sort | sed -e 's/^/\t/' -e 's,$, \\,'; echo -n "\t\$(NULL)"
EXTRA_DIST = \
+ binlog.result \
create_table.result \
delete.result \
fulltext.result \
+ fulltext_drop_index.result \
fulltext_many_records.result \
fulltext_multiple_column_index_delete.result \
fulltext_multiple_column_index_insert.result \
Added: test/sql/groonga_wrapper/r/binlog.result (+34 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_wrapper/r/binlog.result 2011-09-02 01:47:31 +0000 (46d8c15)
@@ -0,0 +1,34 @@
+drop table if exists t1;
+show variables like 'log_bin';
+Variable_name Value
+log_bin ON
+set binlog_format="STATEMENT";
+create table t1 (c1 int primary key, c2 int) engine = groonga COMMENT = 'engine "innodb"';
+insert into t1 values(1,100);
+insert into t1 values(2,100);
+commit;
+select * from t1;
+c1 c2
+1 100
+2 100
+drop table t1;
+set binlog_format="ROW";
+create table t1 (c1 int primary key, c2 int) engine = groonga COMMENT = 'engine "innodb"';
+insert into t1 values(1,100);
+insert into t1 values(2,100);
+commit;
+select * from t1;
+c1 c2
+1 100
+2 100
+drop table t1;
+set binlog_format="MIXED";
+create table t1 (c1 int primary key, c2 int) engine = groonga COMMENT = 'engine "innodb"';
+insert into t1 values(1,100);
+insert into t1 values(2,100);
+commit;
+select * from t1;
+c1 c2
+1 100
+2 100
+drop table t1;
Modified: test/sql/groonga_wrapper/t/Makefile.am (+2 -0)
===================================================================
--- test/sql/groonga_wrapper/t/Makefile.am 2011-09-02 01:39:03 +0000 (f93ac28)
+++ test/sql/groonga_wrapper/t/Makefile.am 2011-09-02 01:47:31 +0000 (5ac6c30)
@@ -1,8 +1,10 @@
# echo "EXTRA_DIST = \\"; ls *.test | sort | sed -e 's/^/\t/' -e 's,$, \\,'; echo -n "\t\$(NULL)"
EXTRA_DIST = \
+ binlog.test \
create_table.test \
delete.test \
fulltext.test \
+ fulltext_drop_index.test \
fulltext_many_records.test \
fulltext_multiple_column_index_delete.test \
fulltext_multiple_column_index_insert.test \
Added: test/sql/groonga_wrapper/t/binlog.test (+54 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_wrapper/t/binlog.test 2011-09-02 01:47:31 +0000 (599f29c)
@@ -0,0 +1,54 @@
+# Copyright(C) 2010 Tetsuro IKEDA
+# Copyright(C) 2011 Kouhei Sutou <kou****@clear*****>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+source include/have_log_bin.inc;
+source suite/groonga_include/groonga_init.inc;
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+show variables like 'log_bin';
+
+set binlog_format="STATEMENT";
+
+create table t1 (c1 int primary key, c2 int) engine = groonga COMMENT = 'engine "innodb"';
+insert into t1 values(1,100);
+insert into t1 values(2,100);
+commit;
+select * from t1;
+drop table t1;
+
+set binlog_format="ROW";
+
+create table t1 (c1 int primary key, c2 int) engine = groonga COMMENT = 'engine "innodb"';
+insert into t1 values(1,100);
+insert into t1 values(2,100);
+commit;
+select * from t1;
+drop table t1;
+
+set binlog_format="MIXED";
+
+create table t1 (c1 int primary key, c2 int) engine = groonga COMMENT = 'engine "innodb"';
+insert into t1 values(1,100);
+insert into t1 values(2,100);
+commit;
+select * from t1;
+drop table t1;
+
+source suite/groonga_include/groonga_deinit.inc;