[Groonga-mysql-commit] mroonga/mroonga [master] [storage][test] add a test for delete for multipul column index.

アーカイブの一覧に戻る

null+****@clear***** null+****@clear*****
2011年 9月 23日 (金) 21:21:01 JST


Kouhei Sutou	2011-09-23 12:21:01 +0000 (Fri, 23 Sep 2011)

  New Revision: 43486b5882a669c924fd7318623a81089fa2e07b

  Log:
    [storage][test] add a test for delete for multipul column index.
    
    refs #455

  Added files:
    test/sql/groonga_storage/r/multiple_column_index_delete.result

  Added: test/sql/groonga_storage/r/multiple_column_index_delete.result (+32 -0) 100644
===================================================================
--- /dev/null
+++ test/sql/groonga_storage/r/multiple_column_index_delete.result    2011-09-23 12:21:01 +0000 (1c3d425)
@@ -0,0 +1,32 @@
+drop table if exists listing;
+set names utf8;
+create table scores (
+id int primary key auto_increment not null,
+name char(30) not null,
+score int not null,
+index property (name, score)
+) default charset utf8;
+show create table scores;
+Table	Create Table
+scores	CREATE TABLE `scores` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `name` char(30) NOT NULL,
+  `score` int(11) NOT NULL,
+  PRIMARY KEY (`id`),
+  KEY `property` (`name`,`score`)
+) ENGINE=groonga DEFAULT CHARSET=utf8
+insert into scores (name, score) values("Taro Yamada", 29);
+insert into scores (name, score) values("Taro Yamada", -12);
+insert into scores (name, score) values("Jiro Yamada", 27);
+insert into scores (name, score) values("Taro Yamada", 10);
+select * from scores;
+id	name	score
+1	Taro Yamada	29
+2	Taro Yamada	-12
+3	Jiro Yamada	27
+4	Taro Yamada	10
+delete from scores where name = "Taro Yamada" and score = 10;
+select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29);
+id	name	score
+2	Taro Yamada	-12
+drop table scores;




Groonga-mysql-commit メーリングリストの案内
アーカイブの一覧に戻る