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 #133 from naoa/support-zstd
Support zstd flag Patch by Naoya Murakami. Thanks!!!
- Loading branch information
Showing
10 changed files
with
222 additions
and
0 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
20 changes: 20 additions & 0 deletions
20
mysql-test/mroonga/include/mroonga/check_libgroonga_support_zstd.inc
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,20 @@ | ||
| # Copyright(C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
|
||
| --disable_query_log | ||
| let $libgroonga_support_zstd = | ||
| `SELECT @@mroonga_libgroonga_support_zstd;`; | ||
| --enable_query_log |
22 changes: 22 additions & 0 deletions
22
mysql-test/mroonga/include/mroonga/support_libgroonga_zstd.inc
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,22 @@ | ||
| # Copyright(C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
|
||
| --source ../../include/mroonga/check_libgroonga_support_zstd.inc | ||
|
|
||
| if (!$libgroonga_support_zstd) { | ||
| --source ../../include/mroonga/have_mroonga_deinit.inc | ||
| skip "This test is for libgroonga supports zstd"; | ||
| } |
22 changes: 22 additions & 0 deletions
22
mysql-test/mroonga/include/mroonga/unsupport_libgroonga_zstd.inc
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,22 @@ | ||
| # Copyright(C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
|
||
| --source ../../include/mroonga/check_libgroonga_support_zstd.inc | ||
|
|
||
| if ($libgroonga_support_zstd) { | ||
| --source ../../include/mroonga/have_mroonga_deinit.inc | ||
| skip "This test is for libgroonga doesn't support zstd"; | ||
| } |
10 changes: 10 additions & 0 deletions
10
mysql-test/mroonga/storage/column/groonga/scalar/r/support_zstd.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,10 @@ | ||
| DROP TABLE IF EXISTS entries; | ||
| CREATE TABLE entries ( | ||
| id INT UNSIGNED PRIMARY KEY, | ||
| content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' | ||
| ) DEFAULT CHARSET=utf8; | ||
| INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); | ||
| SELECT * FROM entries; | ||
| id content | ||
| 1 I found Mroonga that is a MySQL storage engine to use Groonga! | ||
| DROP TABLE entries; |
12 changes: 12 additions & 0 deletions
12
mysql-test/mroonga/storage/column/groonga/scalar/r/unsupport_zstd.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 @@ | ||
| DROP TABLE IF EXISTS entries; | ||
| CREATE TABLE entries ( | ||
| id INT UNSIGNED PRIMARY KEY, | ||
| content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' | ||
| ) DEFAULT CHARSET=utf8; | ||
| Warnings: | ||
| Warning 16506 The column flag 'COMPRESS_ZSTD' is unsupported. It is ignored | ||
| INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); | ||
| SELECT * FROM entries; | ||
| id content | ||
| 1 I found Mroonga that is a MySQL storage engine to use Groonga! | ||
| DROP TABLE entries; |
37 changes: 37 additions & 0 deletions
37
mysql-test/mroonga/storage/column/groonga/scalar/t/support_zstd.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,37 @@ | ||
| # Copyright(C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
|
||
| --source ../../../../../include/mroonga/have_mroonga.inc | ||
| --source ../../../../../include/mroonga/support_libgroonga_zstd.inc | ||
| --source ../../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS entries; | ||
| --enable_warnings | ||
|
|
||
| CREATE TABLE entries ( | ||
| id INT UNSIGNED PRIMARY KEY, | ||
| content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' | ||
| ) DEFAULT CHARSET=utf8; | ||
|
|
||
| INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); | ||
|
|
||
| SELECT * FROM entries; | ||
|
|
||
| DROP TABLE entries; | ||
|
|
||
| --source ../../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../../include/mroonga/have_mroonga_deinit.inc |
37 changes: 37 additions & 0 deletions
37
mysql-test/mroonga/storage/column/groonga/scalar/t/unsupport_zstd.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,37 @@ | ||
| # Copyright(C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
|
||
| --source ../../../../../include/mroonga/have_mroonga.inc | ||
| --source ../../../../../include/mroonga/unsupport_libgroonga_zstd.inc | ||
| --source ../../../../../include/mroonga/load_mroonga_functions.inc | ||
|
|
||
| --disable_warnings | ||
| DROP TABLE IF EXISTS entries; | ||
| --enable_warnings | ||
|
|
||
| CREATE TABLE entries ( | ||
| id INT UNSIGNED PRIMARY KEY, | ||
| content TEXT COMMENT 'flags "COLUMN_SCALAR|COMPRESS_ZSTD"' | ||
| ) DEFAULT CHARSET=utf8; | ||
|
|
||
| INSERT INTO entries (id, content) VALUES (1, "I found Mroonga that is a MySQL storage engine to use Groonga!"); | ||
|
|
||
| SELECT * FROM entries; | ||
|
|
||
| DROP TABLE entries; | ||
|
|
||
| --source ../../../../../include/mroonga/unload_mroonga_functions.inc | ||
| --source ../../../../../include/mroonga/have_mroonga_deinit.inc |