Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from naoa/support-index-column-flags
Support specifying index column flags by index comment Patch by Naoya Murakami. Thanks!!!
- Loading branch information
Showing
11 changed files
with
286 additions
and
8 deletions.
There are no files selected for viewing
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
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
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
12 changes: 12 additions & 0 deletions
12
mysql-test/mroonga/storage/create/table/index_flags/r/none.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,12 @@ | ||
| SET NAMES utf8; | ||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"' | ||
| ) DEFAULT CHARSET=utf8; | ||
| SELECT mroonga_command("dump"); | ||
| mroonga_command("dump") | ||
| table_create memos TABLE_NO_KEY | ||
| column_create memos content COLUMN_SCALAR ShortText | ||
| table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI | ||
| column_create memos-content index COLUMN_INDEX memos content | ||
| DROP TABLE memos; |
12 changes: 12 additions & 0 deletions
12
mysql-test/mroonga/storage/create/table/index_flags/r/with_position_and_with_weight.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,12 @@ | ||
| SET NAMES utf8; | ||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"' | ||
| ) DEFAULT CHARSET=utf8; | ||
| SELECT mroonga_command("dump"); | ||
| mroonga_command("dump") | ||
| table_create memos TABLE_NO_KEY | ||
| column_create memos content COLUMN_SCALAR ShortText | ||
| table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI | ||
| column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos content | ||
| DROP TABLE memos; |
38 changes: 38 additions & 0 deletions
38
mysql-test/mroonga/storage/create/table/index_flags/t/none.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,38 @@ | ||
| # Copyright(C) 2015 Naoya Murakami <naoya@createfield.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/mroonga/have_mroonga.inc | ||
| --source ../../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_query_log | ||
| DROP DATABASE test; | ||
| CREATE DATABASE test; | ||
| USE test; | ||
| --enable_query_log | ||
|
|
||
| SET NAMES utf8; | ||
|
|
||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"' | ||
| ) DEFAULT CHARSET=utf8; | ||
|
|
||
| SELECT mroonga_command("dump"); | ||
|
|
||
| DROP TABLE memos; | ||
|
|
||
| --source ../../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../../include/mroonga/have_mroonga_deinit.inc |
38 changes: 38 additions & 0 deletions
38
mysql-test/mroonga/storage/create/table/index_flags/t/with_position_and_with_weight.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,38 @@ | ||
| # Copyright(C) 2015 Naoya Murakami <naoya@createfield.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/mroonga/have_mroonga.inc | ||
| --source ../../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_query_log | ||
| DROP DATABASE test; | ||
| CREATE DATABASE test; | ||
| USE test; | ||
| --enable_query_log | ||
|
|
||
| SET NAMES utf8; | ||
|
|
||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"' | ||
| ) DEFAULT CHARSET=utf8; | ||
|
|
||
| SELECT mroonga_command("dump"); | ||
|
|
||
| DROP TABLE memos; | ||
|
|
||
| --source ../../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../../include/mroonga/have_mroonga_deinit.inc |
11 changes: 11 additions & 0 deletions
11
mysql-test/mroonga/wrapper/create/table/index_flags/r/none.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,11 @@ | ||
| SET NAMES utf8; | ||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL PRIMARY KEY, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"' | ||
| ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; | ||
| SELECT mroonga_command("dump"); | ||
| mroonga_command("dump") | ||
| table_create memos TABLE_HASH_KEY ShortText | ||
| table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI | ||
| column_create memos-content index COLUMN_INDEX memos | ||
| DROP TABLE memos; |
11 changes: 11 additions & 0 deletions
11
mysql-test/mroonga/wrapper/create/table/index_flags/r/with_position_and_with_weight.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,11 @@ | ||
| SET NAMES utf8; | ||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL PRIMARY KEY, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"' | ||
| ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; | ||
| SELECT mroonga_command("dump"); | ||
| mroonga_command("dump") | ||
| table_create memos TABLE_HASH_KEY ShortText | ||
| table_create memos-content TABLE_PAT_KEY ShortText --default_tokenizer TokenBigram --normalizer NormalizerMySQLGeneralCI | ||
| column_create memos-content index COLUMN_INDEX|WITH_WEIGHT|WITH_POSITION memos | ||
| DROP TABLE memos; |
39 changes: 39 additions & 0 deletions
39
mysql-test/mroonga/wrapper/create/table/index_flags/t/none.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) 2015 Naoya Murakami <naoya@createfield.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_innodb.inc | ||
| --source ../../../../../include/mroonga/have_mroonga.inc | ||
| --source ../../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_query_log | ||
| DROP DATABASE test; | ||
| CREATE DATABASE test; | ||
| USE test; | ||
| --enable_query_log | ||
|
|
||
| SET NAMES utf8; | ||
|
|
||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL PRIMARY KEY, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "NONE"' | ||
| ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; | ||
|
|
||
| SELECT mroonga_command("dump"); | ||
|
|
||
| DROP TABLE memos; | ||
|
|
||
| --source ../../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../../include/mroonga/have_mroonga_deinit.inc |
39 changes: 39 additions & 0 deletions
39
mysql-test/mroonga/wrapper/create/table/index_flags/t/with_position_and_with_weight.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) 2015 Naoya Murakami <naoya@createfield.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_innodb.inc | ||
| --source ../../../../../include/mroonga/have_mroonga.inc | ||
| --source ../../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_query_log | ||
| DROP DATABASE test; | ||
| CREATE DATABASE test; | ||
| USE test; | ||
| --enable_query_log | ||
|
|
||
| SET NAMES utf8; | ||
|
|
||
| CREATE TABLE memos ( | ||
| content VARCHAR(64) NOT NULL PRIMARY KEY, | ||
| FULLTEXT INDEX (content) COMMENT 'index_flags "WITH_POSITION|WITH_WEIGHT"' | ||
| ) COMMENT='engine "InnoDB"' DEFAULT CHARSET=utf8; | ||
|
|
||
| SELECT mroonga_command("dump"); | ||
|
|
||
| DROP TABLE memos; | ||
|
|
||
| --source ../../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../../include/mroonga/have_mroonga_deinit.inc |