Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add for a bug that records_in_range returns 0 unexpectedly
This is groonga's bug. It will be fixed soon in groonga. It is not related to neither single column index nor multiple column index. [groonga-dev,01192] Reported by b senboku. Thanks!!!
- Loading branch information
Showing
4 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
test/sql/suite/mroonga/storage/index/update/r/multiple_column.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,18 @@ | ||
| DROP TABLE IF EXISTS scores; | ||
| SET NAMES utf8; | ||
| CREATE TABLE scores ( | ||
| deleted BOOLEAN, | ||
| value INT, | ||
| INDEX (deleted, value) | ||
| ); | ||
| INSERT INTO scores VALUES (FALSE, 1); | ||
| INSERT INTO scores VALUES (FALSE, 1); | ||
| INSERT INTO scores VALUES (FALSE, 2); | ||
| SELECT count(*) FROM scores WHERE deleted = FALSE; | ||
| count(*) | ||
| 3 | ||
| UPDATE scores SET deleted = TRUE WHERE value = 1; | ||
| SELECT count(*) FROM scores WHERE deleted = FALSE; | ||
| count(*) | ||
| 1 | ||
| DROP TABLE scores; |
17 changes: 17 additions & 0 deletions
17
test/sql/suite/mroonga/storage/index/update/r/single_column.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,17 @@ | ||
| DROP TABLE IF EXISTS scores; | ||
| SET NAMES utf8; | ||
| CREATE TABLE scores ( | ||
| value INT, | ||
| INDEX (value) | ||
| ); | ||
| INSERT INTO scores VALUES (21); | ||
| INSERT INTO scores VALUES (21); | ||
| INSERT INTO scores VALUES (22); | ||
| SELECT count(*) FROM scores WHERE value >= 20; | ||
| count(*) | ||
| 3 | ||
| UPDATE scores SET value = 11 WHERE value = 21; | ||
| SELECT count(*) FROM scores WHERE value >= 20; | ||
| count(*) | ||
| 1 | ||
| DROP TABLE scores; |
40 changes: 40 additions & 0 deletions
40
test/sql/suite/mroonga/storage/index/update/t/multiple_column.test
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,40 @@ | ||
| # Copyright(C) 2013 Kouhei Sutou <kou@clear-code.com> | ||
| # | ||
| # This library is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU Lesser General Public | ||
| # License as published by the Free Software Foundation; either | ||
| # version 2.1 of the License, or (at your option) any later version. | ||
| # | ||
| # This library is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| # Lesser General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU Lesser General Public | ||
| # License along with this library; if not, write to the Free Software | ||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
|
||
| --source include/have_mroonga.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS scores; | ||
| --enable_warnings | ||
|
|
||
| SET NAMES utf8; | ||
| CREATE TABLE scores ( | ||
| deleted BOOLEAN, | ||
| value INT, | ||
| INDEX (deleted, value) | ||
| ); | ||
|
|
||
| INSERT INTO scores VALUES (FALSE, 1); | ||
| INSERT INTO scores VALUES (FALSE, 1); | ||
| INSERT INTO scores VALUES (FALSE, 2); | ||
|
|
||
| SELECT count(*) FROM scores WHERE deleted = FALSE; | ||
| UPDATE scores SET deleted = TRUE WHERE value = 1; | ||
| SELECT count(*) FROM scores WHERE deleted = FALSE; | ||
|
|
||
| DROP TABLE scores; | ||
|
|
||
| --source include/have_mroonga_deinit.inc |
39 changes: 39 additions & 0 deletions
39
test/sql/suite/mroonga/storage/index/update/t/single_column.test
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,39 @@ | ||
| # Copyright(C) 2013 Kouhei Sutou <kou@clear-code.com> | ||
| # | ||
| # This library is free software; you can redistribute it and/or | ||
| # modify it under the terms of the GNU Lesser General Public | ||
| # License as published by the Free Software Foundation; either | ||
| # version 2.1 of the License, or (at your option) any later version. | ||
| # | ||
| # This library is distributed in the hope that it will be useful, | ||
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| # Lesser General Public License for more details. | ||
| # | ||
| # You should have received a copy of the GNU Lesser General Public | ||
| # License along with this library; if not, write to the Free Software | ||
| # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
|
|
||
| --source include/have_mroonga.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS scores; | ||
| --enable_warnings | ||
|
|
||
| SET NAMES utf8; | ||
| CREATE TABLE scores ( | ||
| value INT, | ||
| INDEX (value) | ||
| ); | ||
|
|
||
| INSERT INTO scores VALUES (21); | ||
| INSERT INTO scores VALUES (21); | ||
| INSERT INTO scores VALUES (22); | ||
|
|
||
| SELECT count(*) FROM scores WHERE value >= 20; | ||
| UPDATE scores SET value = 11 WHERE value = 21; | ||
| SELECT count(*) FROM scores WHERE value >= 20; | ||
|
|
||
| DROP TABLE scores; | ||
|
|
||
| --source include/have_mroonga_deinit.inc |