null+****@clear*****
null+****@clear*****
2011年 9月 28日 (水) 17:49:19 JST
Kouhei Sutou 2011-09-28 08:49:19 +0000 (Wed, 28 Sep 2011)
New Revision: 0e411f097ddd124d0daafab2e429d3580020d76b
Log:
[test][storage] split fulltext value update test.
Added files:
test/sql/groonga_storage/r/update_fulltext.result
Copied files:
test/sql/groonga_storage/t/update_fulltext.test
(from test/sql/groonga_storage/t/update.test)
Modified files:
test/sql/groonga_storage/r/update.result
test/sql/groonga_storage/t/update.test
Modified: test/sql/groonga_storage/r/update.result (+0 -21)
===================================================================
--- test/sql/groonga_storage/r/update.result 2011-09-28 08:48:04 +0000 (b6e5094)
+++ test/sql/groonga_storage/r/update.result 2011-09-28 08:49:19 +0000 (0ef57fb)
@@ -1,25 +1,4 @@
drop table if exists t1, t2, t3;
-create table t1 (c1 int primary key, c2 text, fulltext index (c2));
-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;
-c1 c2
-10 aa ii uu ee
-20 ka ki ku ke
-30 sa si su se
-update t1 set c2="ta ti tu te" where c1=20;
-select * from t1;
-c1 c2
-10 aa ii uu ee
-20 ta ti tu te
-30 sa si su se
-select * from t1 where match(c2) against("ti");
-c1 c2
-20 ta ti tu te
-select * from t1 where match(c2) against("ki");
-c1 c2
-drop table t1;
create table t1 (c1 int, _id int);
insert into t1 values(1,null);
insert into t1 values(2,null);
Added: test/sql/groonga_storage/r/update_fulltext.result (+22 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_storage/r/update_fulltext.result 2011-09-28 08:49:19 +0000 (bf81d5e)
@@ -0,0 +1,22 @@
+drop table if exists t1, t2, t3;
+create table t1 (c1 int primary key, c2 text, fulltext index (c2));
+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;
+c1 c2
+10 aa ii uu ee
+20 ka ki ku ke
+30 sa si su se
+update t1 set c2="ta ti tu te" where c1=20;
+select * from t1;
+c1 c2
+10 aa ii uu ee
+20 ta ti tu te
+30 sa si su se
+select * from t1 where match(c2) against("ti");
+c1 c2
+20 ta ti tu te
+select * from t1 where match(c2) against("ki");
+c1 c2
+drop table t1;
Modified: test/sql/groonga_storage/t/update.test (+0 -13)
===================================================================
--- test/sql/groonga_storage/t/update.test 2011-09-28 08:48:04 +0000 (4bc3044)
+++ test/sql/groonga_storage/t/update.test 2011-09-28 08:49:19 +0000 (ff20f1f)
@@ -20,19 +20,6 @@
drop table if exists t1, t2, t3;
--enable_warnings
-create table t1 (c1 int primary key, c2 text, fulltext index (c2));
-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");
-
-drop table t1;
-
# for virtual columns
create table t1 (c1 int, _id int);
insert into t1 values(1,null);
Copied: test/sql/groonga_storage/t/update_fulltext.test (+0 -37) 57%
===================================================================
--- test/sql/groonga_storage/t/update.test 2011-09-28 08:48:04 +0000 (4bc3044)
+++ test/sql/groonga_storage/t/update_fulltext.test 2011-09-28 08:49:19 +0000 (7a54279)
@@ -33,41 +33,4 @@ select * from t1 where match(c2) against("ki");
drop table t1;
-# for virtual columns
-create table t1 (c1 int, _id int);
-insert into t1 values(1,null);
-insert into t1 values(2,null);
-insert into t1 values(3,null);
-select * from t1;
-set sql_mode="";
-# warning 1265
-update t1 set _id = 10 where c1 = 1;
-select * from t1;
-set sql_mode="strict_all_tables";
---error 1406
-update t1 set _id = 11 where c1 = 1;
-select * from t1;
-drop table t1;
-
-# _id and hash index
-create table t1 (_id int, c1 int, unique key (_id) using hash);
-insert into t1 values(null, 100);
-insert into t1 values(null, 100);
-insert into t1 values(null, 100);
-insert into t1 values(null, 100);
-select * from t1;
-update t1 set c1 = 200 where _id = 2;
-select * from t1;
-drop table t1;
-
-create table t1 (_id int, c1 int, key (_id) using hash);
-insert into t1 values(null, 100);
-insert into t1 values(null, 100);
-insert into t1 values(null, 100);
-insert into t1 values(null, 100);
-select * from t1;
-update t1 set c1 = 200 where _id = 2;
-select * from t1;
-drop table t1;
-
--source suite/groonga_include/groonga_deinit.inc