Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[storage][test] add a test for delete for multipul column index.
refs #455
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
test/sql/groonga_storage/r/multiple_column_index_delete.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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; |