diff options
author | Kentoku <kentokushiba@gmail.com> | 2017-10-16 09:50:49 +0900 |
---|---|---|
committer | Kentoku <kentokushiba@gmail.com> | 2017-10-16 09:50:49 +0900 |
commit | ac12ab8f668723dab11ff41076a005dd015cf714 (patch) | |
tree | 6177d5acdf1e85dc64d1cf8df9b9b568f95d72cc /storage | |
parent | 13167e64898da6373fa8cab2ad89514eaf886412 (diff) | |
download | mariadb-git-ac12ab8f668723dab11ff41076a005dd015cf714.tar.gz |
Update Mroonga to the latest version on 2017-10-16T09:50:49+0900
Diffstat (limited to 'storage')
30 files changed, 250 insertions, 41 deletions
diff --git a/storage/mroonga/Makefile.am b/storage/mroonga/Makefile.am index e46d2b2dd3a..69349ea6a8d 100644 --- a/storage/mroonga/Makefile.am +++ b/storage/mroonga/Makefile.am @@ -73,6 +73,8 @@ update-latest-release: ensure-cutter-source-path $(PACKAGE) $(OLD_RELEASE) $(OLD_RELEASE_DATE) \ $(VERSION) $(NEW_RELEASE_DATE) \ packages/rpm/centos/mariadb-mroonga.spec.in \ + packages/rpm/centos/mariadb-10.1-mroonga.spec.in \ + packages/rpm/centos/mariadb-10.2-mroonga.spec.in \ packages/rpm/centos/mysql55-mroonga.spec.in \ packages/rpm/centos/mysql56-community-mroonga.spec.in \ packages/rpm/centos/mysql57-community-mroonga.spec.in \ diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc index 8e583cb738e..aaf4f8dacc8 100644 --- a/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/check_version.inc @@ -22,6 +22,7 @@ let $version_5_5 = `SELECT $version_major_minor = 5.5`; let $version_5_6 = `SELECT $version_major_minor = 5.6`; let $version_5_7 = `SELECT $version_major_minor = 5.7`; let $version_10_0 = `SELECT $version_major_minor = 10.0`; +let $version_10_1 = `SELECT $version_major_minor = 10.1`; let $version_10_2 = `SELECT $version_major_minor = 10.2`; let $version_5_5_or_later = `SELECT $version_major_minor >= 5.5`; diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc new file mode 100644 index 00000000000..b954d1c75f7 --- /dev/null +++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/skip_mariadb_10_1.inc @@ -0,0 +1,24 @@ +# Copyright(C) 2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +--source ../../include/mroonga/check_version.inc +--source ../../include/mroonga/check_mariadb.inc + +if ($version_10_1) { + if ($mariadb) { + --skip This test is not for MariaDB 10.1.x + } +} diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result index e2e712af4b6..bfb263f11b5 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_add.result @@ -17,8 +17,5 @@ articles CREATE TABLE `articles` ( KEY `comment` (`comment`), CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE=Mroonga DEFAULT CHARSET=latin1 -SELECT * FROM information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments DROP TABLE articles; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result index fc3cda00499..101a4a3de4b 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_alter_drop.result @@ -17,7 +17,5 @@ articles CREATE TABLE `articles` ( `comment` int(10) unsigned DEFAULT NULL, KEY `comment` (`comment`) ) ENGINE=Mroonga DEFAULT CHARSET=latin1 -SELECT * FROM information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME DROP TABLE articles; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result index d76fba588b1..c17780c0441 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/foreign_key_create.result @@ -18,7 +18,5 @@ articles CREATE TABLE `articles` ( CONSTRAINT `comment` FOREIGN KEY (`comment`) REFERENCES `test`.`comments` (`comment`) ON DELETE RESTRICT ON UPDATE RESTRICT ) ENGINE=Mroonga DEFAULT CHARSET=latin1 SELECT * FROM information_schema.referential_constraints; -CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG UNIQUE_CONSTRAINT_SCHEMA UNIQUE_CONSTRAINT_NAME MATCH_OPTION UPDATE_RULE DELETE_RULE TABLE_NAME REFERENCED_TABLE_NAME -def test comment def test PRIMARY NONE RESTRICT RESTRICT articles comments DROP TABLE articles; DROP TABLE comments; diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result b/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result index 702f3814933..5a19ab6fb44 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result +++ b/storage/mroonga/mysql-test/mroonga/storage/r/variable_enable_operations_recording_insert.result @@ -1,12 +1,32 @@ -SET GLOBAL mroonga_enable_operations_recording = true; -FLUSH TABLES; +DROP TABLE IF EXISTS diaries; CREATE TABLE diaries ( title TEXT ) DEFAULT CHARSET=utf8; -INSERT INTO diaries VALUES("Research for Mroonga"); -SELECT * FROM diaries; -title -Research for Mroonga -DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +mroonga_command('load --table mroonga_operations --values "[{}]"') +1 +SELECT mroonga_command('select mroonga_operations --output_columns _id'); +mroonga_command('select mroonga_operations --output_columns _id') +[[[1],[["_id","UInt32"]],[2]]] SET GLOBAL mroonga_enable_operations_recording = false; FLUSH TABLES; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +mroonga_command('load --table mroonga_operations --values "[{}]"') +1 +SELECT mroonga_command('select mroonga_operations --output_columns _id'); +mroonga_command('select mroonga_operations --output_columns _id') +[[[1],[["_id","UInt32"]],[1]]] +DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); +mroonga_command('truncate mroonga_operations') +true +SET GLOBAL mroonga_enable_operations_recording = default; +FLUSH TABLES; diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test index 0477954e129..57947bb39b8 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_add.test @@ -16,6 +16,7 @@ --source ../../include/mroonga/skip_mysql_5_5.inc --source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test index 9fd0e918a96..9be7cc7d2ea 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_alter_drop.test @@ -16,6 +16,7 @@ --source ../../include/mroonga/skip_mysql_5_5.inc --source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test index 2b0ece4501b..e8c8540be03 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_create.test @@ -16,6 +16,7 @@ --source ../../include/mroonga/skip_mysql_5_5.inc --source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test index 308117127d0..e93958bab83 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/foreign_key_rename.test @@ -16,6 +16,7 @@ --source ../../include/mroonga/skip_mysql_5_5.inc --source ../../include/mroonga/skip_mariadb_5_5.inc +--source ../../include/mroonga/skip_mariadb_10_1.inc --source include/have_innodb.inc --source ../../include/mroonga/have_mroonga.inc diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test index c6e62c9d1eb..ad2b8167d81 100644 --- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test +++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_enable_operations_recording_insert.test @@ -1,4 +1,5 @@ # Copyright(C) 2017 Naoya Murakami <naoya@createfield.com> +# Copyright(C) 2017 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 @@ -14,23 +15,36 @@ # 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/not_embedded.inc --source ../../include/mroonga/have_mroonga.inc ---source ../../include/mroonga/have_mroonga_helper.inc +--source ../../include/mroonga/load_mroonga_functions.inc -SET GLOBAL mroonga_enable_operations_recording = true; -FLUSH TABLES; +--disable_warnings +DROP TABLE IF EXISTS diaries; +--enable_warnings CREATE TABLE diaries ( title TEXT ) DEFAULT CHARSET=utf8; -INSERT INTO diaries VALUES("Research for Mroonga"); +SELECT mroonga_command('truncate mroonga_operations'); +INSERT INTO diaries VALUES("Unlogged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +SELECT mroonga_command('select mroonga_operations --output_columns _id'); -SELECT * FROM diaries; +SET GLOBAL mroonga_enable_operations_recording = false; +FLUSH TABLES; + +SELECT mroonga_command('truncate mroonga_operations'); +INSERT INTO diaries VALUES("Logged: Research for Mroonga"); +SELECT mroonga_command('load --table mroonga_operations --values "[{}]"'); +SELECT mroonga_command('select mroonga_operations --output_columns _id'); DROP TABLE diaries; +SELECT mroonga_command('truncate mroonga_operations'); -SET GLOBAL mroonga_enable_operations_recording = false; +SET GLOBAL mroonga_enable_operations_recording = default; FLUSH TABLES; +--source ../../include/mroonga/unload_mroonga_functions.inc --source ../../include/mroonga/have_mroonga_deinit.inc diff --git a/storage/mroonga/packages/apt/Vagrantfile b/storage/mroonga/packages/apt/Vagrantfile index 10a6faba115..ee4a6aebc23 100644 --- a/storage/mroonga/packages/apt/Vagrantfile +++ b/storage/mroonga/packages/apt/Vagrantfile @@ -16,7 +16,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| }, { :id => "debian-stretch-i386", - :box_url => "http://packages.groonga.org/tmp/debian-9.0-i386.virtualbox.box", + :box => "bento/debian-9.1-i386", }, { :id => "debian-stretch-amd64", diff --git a/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in index e52a23b9796..d23c499fd44 100644 --- a/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mariadb-mroonga.spec.in @@ -18,7 +18,7 @@ Name: mariadb-mroonga Version: @VERSION@ -Release: 2%{?dist} +Release: 1%{?dist} Summary: A fast fulltext searchable storage engine for MariaDB Group: Applications/Databases @@ -154,6 +154,9 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.07-1 +- new upstream release. + * Fri Sep 15 2017 Kouhei Sutou <kou@clear-code.com> - 7.06-2 - rebuild against the latest MariaDB. diff --git a/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in index 5fa331101f0..8bd2ba540d3 100644 --- a/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mysql55-mroonga.spec.in @@ -163,6 +163,9 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.07-1 +- new upstream release. + * Tue Aug 29 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.06-1 - new upstream release. diff --git a/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in index bf098a5f415..dea7cebc7d9 100644 --- a/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/mysql56-community-mroonga.spec.in @@ -184,6 +184,9 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.07-1 +- new upstream release. + * Tue Aug 29 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.06-1 - new upstream release. diff --git a/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in b/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in index 831bf8719b6..abf3bfdee9e 100644 --- a/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in +++ b/storage/mroonga/packages/rpm/centos/percona-server-56-mroonga.spec.in @@ -179,6 +179,9 @@ fi %doc mysql-mroonga-doc/* %changelog +* Thu Oct 12 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.07-1 +- new upstream release. + * Tue Aug 29 2017 Kentaro Hayashi <hayashi@clear-code.com> - 7.06-1 - new upstream release. diff --git a/storage/mroonga/packages/source/Makefile.am b/storage/mroonga/packages/source/Makefile.am index 4b0dee52ba1..efd09777add 100644 --- a/storage/mroonga/packages/source/Makefile.am +++ b/storage/mroonga/packages/source/Makefile.am @@ -1,7 +1,7 @@ MROONGA_BASE = $(PACKAGE)-$(VERSION) MROONGA_TAR_GZ = $(MROONGA_BASE).tar.gz -GROONGA_VERSION = 7.0.6 +GROONGA_VERSION = 7.0.7 GROONGA_BASE = groonga-$(GROONGA_VERSION) GROONGA_TAR_GZ = $(GROONGA_BASE).tar.gz @@ -11,7 +11,7 @@ GROONGA_NORMALIZER_MYSQL_BASE = \ GROONGA_NORMALIZER_MYSQL_TAR_GZ = \ $(GROONGA_NORMALIZER_MYSQL_BASE).tar.gz -MARIADB_VERSION = 10.1.26 +MARIADB_VERSION = 10.1.28 MARIADB_BASE = mariadb-$(MARIADB_VERSION) MARIADB_TAR_GZ = $(MARIADB_BASE).tar.gz diff --git a/storage/mroonga/packages/yum/Vagrantfile b/storage/mroonga/packages/yum/Vagrantfile index 1c30bcca31d..af14bc9a76b 100644 --- a/storage/mroonga/packages/yum/Vagrantfile +++ b/storage/mroonga/packages/yum/Vagrantfile @@ -16,7 +16,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| }, { :id => "centos-7-x86_64", - :box => "bento/centos-7.3", + :box => "bento/centos-7.4", }, ] diff --git a/storage/mroonga/plugin_version b/storage/mroonga/plugin_version index f5cce03c304..120096f1f8f 100644 --- a/storage/mroonga/plugin_version +++ b/storage/mroonga/plugin_version @@ -1 +1 @@ -7.6
\ No newline at end of file +7.7
\ No newline at end of file diff --git a/storage/mroonga/test/run-sql-test.sh b/storage/mroonga/test/run-sql-test.sh index 570907791cc..d3aaf6aecf7 100755 --- a/storage/mroonga/test/run-sql-test.sh +++ b/storage/mroonga/test/run-sql-test.sh @@ -1,7 +1,7 @@ #!/bin/sh # # Copyright(C) 2010 Tetsuro IKEDA -# Copyright(C) 2010-2015 Kouhei Sutou <kou@clear-code.com> +# Copyright(C) 2010-2017 Kouhei Sutou <kou@clear-code.com> # Copyright(C) 2011 Kazuhiko # # This library is free software; you can redistribute it and/or @@ -228,7 +228,6 @@ mysql_test_run_args="" if [ "${percona}" != "yes" ]; then mysql_test_run_args="${mysql_test_run_args} --mem" fi -mysql_test_run_args="${mysql_test_run_args} --no-check-testcases" mysql_test_run_args="${mysql_test_run_args} --parallel=${n_processors}" mysql_test_run_args="${mysql_test_run_args} --retry=1" mysql_test_run_args="${mysql_test_run_args} --suite=${test_suite_names}" diff --git a/storage/mroonga/tools/travis/install.sh b/storage/mroonga/tools/travis/install.sh index e9f85463029..7596c1ccc32 100755 --- a/storage/mroonga/tools/travis/install.sh +++ b/storage/mroonga/tools/travis/install.sh @@ -22,7 +22,8 @@ set -e # export GROONGA_MASTER=yes # export GROONGA_NORMALIZER_MYSQL_MASTER=yes -mariadb_download_base=http://mirror.jmu.edu/pub/mariadb +#mariadb_download_base=http://mirror.jmu.edu/pub/mariadb +mariadb_download_base=http://ftp.osuosl.org/pub/mariadb version=$(echo "$MYSQL_VERSION" | sed -r -e 's/^(mysql|mariadb|percona-server)-//') series=$(echo "$version" | sed -r -e 's/^([0-9]+\.[0-9]+).*$/\1/g') diff --git a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt index 281bc95a090..a90cea0043e 100644 --- a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt @@ -25,7 +25,8 @@ include_directories( ${LIBZSTD_INCLUDE_DIRS} ${MESSAGE_PACK_INCLUDE_DIRS}) -read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/sources.am LIBGROONGA_SOURCES) +read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/c_sources.am LIBGROONGA_C_SOURCES) +read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/cpp_sources.am LIBGROONGA_CPP_SOURCES) read_file_list(${CMAKE_CURRENT_SOURCE_DIR}/dat/sources.am LIBGRNDAT_SOURCES) string(REGEX REPLACE "([^;]+)" "dat/\\1" LIBGRNDAT_SOURCES "${LIBGRNDAT_SOURCES}") @@ -51,23 +52,27 @@ else() endif() set_source_files_properties( - ${LIBGROONGA_SOURCES} + ${LIBGROONGA_C_SOURCES} ${LIBGRNMRB_SOURCES} ${LIBGRNPROC_SOURCES} ${LIBGRNTS_SOURCES} PROPERTIES COMPILE_FLAGS "${GRN_C_COMPILE_FLAGS}") set_source_files_properties( - ${LIBGROONGA_SOURCES} + ${LIBGROONGA_C_SOURCES} + ${LIBGROONGA_CPP_SOURCES} ${LIBGRNMRB_SOURCES} PROPERTIES COMPILE_DEFINITIONS "${MRUBY_DEFINITIONS}") -set_source_files_properties(dat.cpp ${LIBGRNDAT_SOURCES} +set_source_files_properties( + ${LIBGROONGA_CPP_SOURCES} + ${LIBGRNDAT_SOURCES} PROPERTIES COMPILE_FLAGS "${GRN_CXX_COMPILE_FLAGS}") set(GRN_ALL_SOURCES - ${LIBGROONGA_SOURCES} + ${LIBGROONGA_C_SOURCES} + ${LIBGROONGA_CPP_SOURCES} ${LIBGRNDAT_SOURCES} ${LIBGRNMRB_SOURCES} ${LIBGRNPROC_SOURCES} diff --git a/storage/mroonga/vendor/groonga/lib/Makefile.am b/storage/mroonga/vendor/groonga/lib/Makefile.am index 7a7281ea85f..9a2217ee12d 100644 --- a/storage/mroonga/vendor/groonga/lib/Makefile.am +++ b/storage/mroonga/vendor/groonga/lib/Makefile.am @@ -36,7 +36,11 @@ DEFAULT_INCLUDES = \ DEFS += -D_REENTRANT $(GRN_DEFS) -DGRN_DAT_EXPORT -include sources.am +include c_sources.am +include cpp_sources.am +libgroonga_la_SOURCES = \ + $(libgroonga_c_sources) \ + $(libgroonga_cpp_source) #nfkc.c: # $(RUBY) nfkc.rb --impl=table diff --git a/storage/mroonga/vendor/groonga/lib/sources.am b/storage/mroonga/vendor/groonga/lib/c_sources.am index 268bf67d84f..3b76e69309f 100644 --- a/storage/mroonga/vendor/groonga/lib/sources.am +++ b/storage/mroonga/vendor/groonga/lib/c_sources.am @@ -1,7 +1,6 @@ -libgroonga_la_SOURCES = \ +libgroonga_c_sources = \ alloc.c \ grn_alloc.h \ - arrow.cpp \ cache.c \ grn_cache.h \ column.c \ @@ -15,7 +14,6 @@ libgroonga_la_SOURCES = \ grn_ctx_impl.h \ ctx_impl_mrb.c \ grn_ctx_impl_mrb.h \ - dat.cpp \ grn_dat.h \ db.c \ grn_db.h \ diff --git a/storage/mroonga/vendor/groonga/lib/cpp_sources.am b/storage/mroonga/vendor/groonga/lib/cpp_sources.am new file mode 100644 index 00000000000..c1d09a97a26 --- /dev/null +++ b/storage/mroonga/vendor/groonga/lib/cpp_sources.am @@ -0,0 +1,3 @@ +libgroonga_cpp_source = \ + arrow.cpp \ + dat.cpp diff --git a/storage/mroonga/vendor/groonga/tools/groonga-benchmark-indexing.rb b/storage/mroonga/vendor/groonga/tools/groonga-benchmark-indexing.rb new file mode 100755 index 00000000000..9c64e6d9891 --- /dev/null +++ b/storage/mroonga/vendor/groonga/tools/groonga-benchmark-indexing.rb @@ -0,0 +1,129 @@ +#!/usr/bin/env ruby + +require "fileutils" +require "json" +require "optparse" + +class IndexingBenchmarker + def initialize + @groonga = "groonga" + @database_path = nil + @benchmark_database_dir = detect_benchmark_database_dir + end + + def run + catch(:run) do + parse_options! + end + + dump_no_indexes = dump("dump-no-indexes.grn", + "--dump_indexes", "no") + dump_only_indexes = dump("dump-only-indexes.grn", + "--dump_plugins", "no", + "--dump_schema", "no", + "--dump_records", "no", + "--dump_configs", "no") + dump_no_records = dump("dump-no-records.grn", + "--dump_records", "no") + dump_only_records = dump("dump-only-records.grn", + "--dump_plugins", "no", + "--dump_schema", "no", + "--dump_indexes", "no", + "--dump_configs", "no") + + create_benchmark_database do + p [:load_record, measure(dump_no_indexes)] + p [:static_index_creation, measure(dump_only_indexes)] + end + + create_benchmark_database do + p [:create_schema, measure(dump_no_records)] + p [:load_record_and_create_index, measure(dump_only_records)] + end + + true + end + + private + def detect_benchmark_database_dir + candiates = [ + "/dev/shm", + "tmp", + ] + candiates.find do |candidate| + File.exist?(candidate) + end + end + + def benchmark_database_path + "#{@benchmark_database_dir}/bench-db/db" + end + + def parse_options! + option_parser = OptionParser.new do |parser| + parser.banner += " SOURCE_DATABASE" + + parser.on("--groonga=PATH", + "Use PATH as groonga command path") do |path| + @groonga = path + end + + parser.on("--benchmark-database-dir=DIR", + "Use DIR to put benchmark database") do |dir| + @benchmark_database_dir = dir + end + end + + @database_path, = option_parser.parse!(ARGV) + if @database_path.nil? + puts(option_parser) + throw(:run) + end + end + + def dump(path, *dump_options) + return path if File.exist?(path) + unless system(@groonga, + @database_path, + "dump", + *dump_options, + :out => path) + raise "failed to dump: #{dump_options.inspect}" + end + path + end + + def create_benchmark_database + dir = File.dirname(benchmark_database_path) + FileUtils.rm_rf(dir) + FileUtils.mkdir_p(dir) + system(@groonga, + "-n", benchmark_database_path, + "shutdown", + :out => IO::NULL) + begin + yield + ensure + FileUtils.rm_rf(dir) + end + end + + def measure(dump_path) + result = "result" + begin + system(@groonga, + "--file", dump_path, + benchmark_database_path, + :out => result) + File.open(result) do |output| + output.each_line.inject(0) do |result, line| + result + JSON.parse(line)[0][2] + end + end + ensure + FileUtils.rm_f(result) + end + end +end + +exit(IndexingBenchmarker.new.run) diff --git a/storage/mroonga/version b/storage/mroonga/version index 9505965acd5..5b1f56847ae 100644 --- a/storage/mroonga/version +++ b/storage/mroonga/version @@ -1 +1 @@ -7.06
\ No newline at end of file +7.07
\ No newline at end of file diff --git a/storage/mroonga/version_in_hex b/storage/mroonga/version_in_hex index 34eb4840ee2..33e98aa1934 100644 --- a/storage/mroonga/version_in_hex +++ b/storage/mroonga/version_in_hex @@ -1 +1 @@ -0x0706
\ No newline at end of file +0x0707
\ No newline at end of file diff --git a/storage/mroonga/version_micro b/storage/mroonga/version_micro index 62f9457511f..c7930257dfe 100644 --- a/storage/mroonga/version_micro +++ b/storage/mroonga/version_micro @@ -1 +1 @@ -6
\ No newline at end of file +7
\ No newline at end of file |