[Groonga-mysql-commit] mroonga/mroonga at dc9cfb2 [master] test: remove needless default_storage_engine check

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Jul 9 18:23:20 JST 2018


Kouhei Sutou	2018-07-09 18:23:20 +0900 (Mon, 09 Jul 2018)

  New Revision: dc9cfb2b3dbc707797a3dc7d5a7c0006fc9d03d6
  https://github.com/mroonga/mroonga/commit/dc9cfb2b3dbc707797a3dc7d5a7c0006fc9d03d6

  Message:
    test: remove needless default_storage_engine check

  Modified files:
    mysql-test/mroonga/include/mroonga/have_mroonga.inc
    mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc

  Modified: mysql-test/mroonga/include/mroonga/have_mroonga.inc (+3 -9)
===================================================================
--- mysql-test/mroonga/include/mroonga/have_mroonga.inc    2018-07-09 18:23:10 +0900 (b88839e5)
+++ mysql-test/mroonga/include/mroonga/have_mroonga.inc    2018-07-09 18:23:20 +0900 (882ebebb)
@@ -1,5 +1,6 @@
 # Copyright(C) 2010 Tetsuro IKEDA
 # Copyright(C) 2013-2014 Kentoku SHIBA
+# Copyright(C) 2018 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
@@ -25,15 +26,8 @@ if (!$have_mroonga_storage_engine) {
   eval INSTALL PLUGIN mroonga_stats SONAME $ha_mroonga_so;
 }
 
-let have_default_storage_engine_variable=`SELECT 1 FROM information_schema.global_variables WHERE variable_name = "default_storage_engine"`;
-if ($have_default_storage_engine_variable) {
-  let original_default_storage_engine=`SELECT variable_value FROM information_schema.global_variables WHERE variable_name = "default_storage_engine"`;
-  set default_storage_engine=Mroonga;
-}
-if (!$have_default_storage_engine_variable) {
-  let original_storage_engine=`SELECT variable_value FROM information_schema.global_variables WHERE variable_name = "storage_engine"`;
-  set storage_engine=Mroonga;
-}
+let original_default_storage_engine=`SELECT @@GLOBAL.default_storage_engine`;
+set default_storage_engine=Mroonga;
 
 let have_default_tmp_storage_engine_variable=`SELECT 1 FROM information_schema.global_variables WHERE variable_name = "default_tmp_storage_engine"`;
 if ($have_default_tmp_storage_engine_variable) {

  Modified: mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc (+2 -7)
===================================================================
--- mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc    2018-07-09 18:23:10 +0900 (bd5242c8)
+++ mysql-test/mroonga/include/mroonga/have_mroonga_deinit.inc    2018-07-09 18:23:20 +0900 (44cb18e5)
@@ -1,5 +1,5 @@
 # Copyright(C) 2010-2014 Kentoku SHIBA
-# Copyright(C) 2011 Kouhei Sutou <kou �� clear-code.com>
+# Copyright(C) 2011-2018 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
@@ -17,12 +17,7 @@
 
 disable_query_log;
 
-if ($have_default_storage_engine_variable) {
-  eval set default_storage_engine=$original_default_storage_engine;
-}
-if (!$have_default_storage_engine_variable) {
-  eval set storage_engine=$original_storage_engine;
-}
+eval set default_storage_engine=$original_default_storage_engine;
 
 if ($have_default_tmp_storage_engine_variable) {
   eval set default_tmp_storage_engine=$original_default_tmp_storage_engine;
-------------- next part --------------
HTML����������������������������...
URL: https://lists.osdn.me/mailman/archives/groonga-mysql-commit/attachments/20180709/1e70b024/attachment-0001.htm 



More information about the Groonga-mysql-commit mailing list
Back to archive index