null+****@clear*****
null+****@clear*****
2011年 10月 3日 (月) 17:44:56 JST
Kouhei Sutou 2011-10-03 08:44:56 +0000 (Mon, 03 Oct 2011) New Revision: 953495a9bf3ba7a5855fcbad6ae5f4f6ebcab463 Log: [wrapper][test] split update and fulltext test. Added files: test/sql/groonga_wrapper/r/update_fulltext.result Copied files: test/sql/groonga_wrapper/t/update_fulltext.test (from test/sql/groonga_wrapper/t/update.test) Modified files: test/sql/groonga_wrapper/r/update.result test/sql/groonga_wrapper/t/update.test Modified: test/sql/groonga_wrapper/r/update.result (+0 -35) =================================================================== --- test/sql/groonga_wrapper/r/update.result 2011-09-28 15:35:28 +0000 (c89c641) +++ test/sql/groonga_wrapper/r/update.result 2011-10-03 08:44:56 +0000 (655d242) @@ -1,39 +1,4 @@ drop table if exists t1, t2, t3; -create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` int(11) NOT NULL, - `c2` int(11) DEFAULT NULL, - PRIMARY KEY (`c1`) -) ENGINE=groonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' -insert into t1 values (1, 100); -insert into t1 values (2, 101); -insert into t1 values (3, 102); -select * from t1; -c1 c2 -1 100 -2 101 -3 102 -update t1 set c2=c2+100 where c1=1; -select * from t1; -c1 c2 -1 200 -2 101 -3 102 -update t1 set c2=c2+100 where c1=2; -select * from t1; -c1 c2 -1 200 -2 201 -3 102 -update t1 set c2=c2+100 where c1=3; -select * from t1; -c1 c2 -1 200 -2 201 -3 202 -drop table t1; create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT = 'engine "innodb"'; insert into t1 values(10, "aa ii uu ee"); insert into t1 values(20, "ka ki ku ke"); Added: test/sql/groonga_wrapper/r/update_fulltext.result (+36 -0) 100644 =================================================================== --- /dev/null +++ test/sql/groonga_wrapper/r/update_fulltext.result 2011-10-03 08:44:56 +0000 (1517656) @@ -0,0 +1,36 @@ +drop table if exists t1, t2, t3; +create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` int(11) NOT NULL, + `c2` int(11) DEFAULT NULL, + PRIMARY KEY (`c1`) +) ENGINE=groonga DEFAULT CHARSET=latin1 COMMENT='engine "innodb"' +insert into t1 values (1, 100); +insert into t1 values (2, 101); +insert into t1 values (3, 102); +select * from t1; +c1 c2 +1 100 +2 101 +3 102 +update t1 set c2=c2+100 where c1=1; +select * from t1; +c1 c2 +1 200 +2 101 +3 102 +update t1 set c2=c2+100 where c1=2; +select * from t1; +c1 c2 +1 200 +2 201 +3 102 +update t1 set c2=c2+100 where c1=3; +select * from t1; +c1 c2 +1 200 +2 201 +3 202 +drop table t1; Modified: test/sql/groonga_wrapper/t/update.test (+0 -16) =================================================================== --- test/sql/groonga_wrapper/t/update.test 2011-09-28 15:35:28 +0000 (d57790c) +++ test/sql/groonga_wrapper/t/update.test 2011-10-03 08:44:56 +0000 (3235d43) @@ -21,22 +21,6 @@ drop table if exists t1, t2, t3; --enable_warnings -create table t1 (c1 int primary key, c2 int) COMMENT = 'engine "innodb"'; -show create table t1; -insert into t1 values (1, 100); -insert into t1 values (2, 101); -insert into t1 values (3, 102); -select * from t1; - -update t1 set c2=c2+100 where c1=1; -select * from t1; -update t1 set c2=c2+100 where c1=2; -select * from t1; -update t1 set c2=c2+100 where c1=3; -select * from t1; - -drop table t1; - create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT = 'engine "innodb"'; insert into t1 values(10, "aa ii uu ee"); insert into t1 values(20, "ka ki ku ke"); Copied: test/sql/groonga_wrapper/t/update_fulltext.test (+0 -18) 70% =================================================================== --- test/sql/groonga_wrapper/t/update.test 2011-09-28 15:35:28 +0000 (d57790c) +++ test/sql/groonga_wrapper/t/update_fulltext.test 2011-10-03 08:44:56 +0000 (0ca32bc) @@ -37,22 +37,4 @@ select * from t1; drop table t1; -create table t1 (c1 int primary key, c2 text, fulltext index (c2)) COMMENT = 'engine "innodb"'; -insert into t1 values(10, "aa ii uu ee"); -insert into t1 values(20, "ka ki ku ke"); -insert into t1 values(30, "sa si su se"); - -select * from t1; -update t1 set c2="ta ti tu te" where c1=20; -select * from t1; -select * from t1 where match(c2) against("ti"); -select * from t1 where match(c2) against("ki"); - -update t1 set c1=40 where c1=20; -select * from t1; -select * from t1 where match(c2) against("ti"); -select * from t1 where match(c2) against("ki"); - -drop table t1; - --source suite/groonga_include/groonga_deinit.inc