Navigation Menu

Skip to content

Commit

Permalink
[storage][test] add a test for delete for multipul column index.
Browse files Browse the repository at this point in the history
refs #455
  • Loading branch information
kou committed Sep 23, 2011
1 parent 4ea1fb4 commit 43486b5
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/sql/groonga_storage/r/multiple_column_index_delete.result
@@ -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;

0 comments on commit 43486b5

Please sign in to comment.