summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-11-14 11:12:13 +0800
committerSergei Golubchik <serg@mariadb.org>2017-11-17 13:55:14 +0800
commit4666f015349e5bdd3b7ee3b2eedf50020a460e5b (patch)
tree9234c6e0484184af51cb00744a2edcee5e2b4788
parentd7349e204b873cd882666c2598b1ec1bf1490563 (diff)
downloadmariadb-git-4666f015349e5bdd3b7ee3b2eedf50020a460e5b.tar.gz
mroonga after-merge test fixes
"sed -r" fails on labrador. Don't use sed, use perl.
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc2
-rw-r--r--storage/mroonga/mysql-test/mroonga/include/mroonga/print_groonga_query_log.inc8
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test3
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test3
8 files changed, 15 insertions, 13 deletions
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc
index f78a760a563..0d93ce03bd7 100644
--- a/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/have_mroonga_helper.inc
@@ -14,4 +14,4 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-let $MYSQLD_DATADIR= `select @@datadir`;
+let MYSQLD_DATADIR= `select @@datadir`;
diff --git a/storage/mroonga/mysql-test/mroonga/include/mroonga/print_groonga_query_log.inc b/storage/mroonga/mysql-test/mroonga/include/mroonga/print_groonga_query_log.inc
new file mode 100644
index 00000000000..d5f8c1293d5
--- /dev/null
+++ b/storage/mroonga/mysql-test/mroonga/include/mroonga/print_groonga_query_log.inc
@@ -0,0 +1,8 @@
+SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
+perl;
+open(F, '<', $_="$ENV{MYSQLD_DATADIR}/groonga-query-log.log") or die "open(<$_): $!";
+while (<F>) {
+ s/^[^|]+\|[^|]+\|[^|]+\| *//;
+ print;
+}
+EOF
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test
index 912c2e2bf7d..fdd21cc0f4d 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_empty_value.test
@@ -21,8 +21,7 @@
SET GLOBAL mroonga_log_file = "groonga-query-log.log";
SET GLOBAL mroonga_query_log_file = "";
-SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
---exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log
+--source ../../include/mroonga/print_groonga_query_log.inc
SET GLOBAL mroonga_query_log_file = DEFAULT;
SET GLOBAL mroonga_log_file = DEFAULT;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test
index a63f4f75a74..b84fc3978ed 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_disabled_null_value.test
@@ -21,8 +21,7 @@
SET GLOBAL mroonga_log_file = "groonga-query-log.log";
SET GLOBAL mroonga_query_log_file = NULL;
-SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
---exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log
+--source ../../include/mroonga/print_groonga_query_log.inc
SET GLOBAL mroonga_query_log_file = DEFAULT;
SET GLOBAL mroonga_log_file = DEFAULT;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test
index e37b163b5c5..0cb1a8d243a 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_empty_value.test
@@ -23,8 +23,7 @@ SET GLOBAL mroonga_query_log_file = "groonga-query.log";
SET GLOBAL mroonga_log_file = "groonga-query-log.log";
SET GLOBAL mroonga_query_log_file = "";
-SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
---exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log
+--source ../../include/mroonga/print_groonga_query_log.inc
SET GLOBAL mroonga_query_log_file = DEFAULT;
SET GLOBAL mroonga_log_file = DEFAULT;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test
index 2df00d6a46c..d1704a43d3a 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_enabled_null_value.test
@@ -23,8 +23,7 @@ SET GLOBAL mroonga_query_log_file = "groonga-query.log";
SET GLOBAL mroonga_log_file = "groonga-query-log.log";
SET GLOBAL mroonga_query_log_file = NULL;
-SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
---exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log
+--source ../../include/mroonga/print_groonga_query_log.inc
SET GLOBAL mroonga_query_log_file = DEFAULT;
SET GLOBAL mroonga_log_file = DEFAULT;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test
index a3a7dc9b086..e298aaa43b1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_new_value.test
@@ -23,8 +23,7 @@
SET GLOBAL mroonga_log_file = "groonga-query-log.log";
SET GLOBAL mroonga_query_log_file = "groonga-query.log";
-SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
---exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log
+--source ../../include/mroonga/print_groonga_query_log.inc
SET GLOBAL mroonga_query_log_file = DEFAULT;
SET GLOBAL mroonga_log_file = DEFAULT;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test
index 66024f5cf00..4c500f1e674 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/variable_query_log_file_same_value.test
@@ -24,8 +24,7 @@ SET GLOBAL mroonga_query_log_file = "groonga-query.log";
SET GLOBAL mroonga_log_file = "groonga-query-log.log";
SET GLOBAL mroonga_query_log_file = "groonga-query.log";
-SHOW GLOBAL VARIABLES LIKE "mroonga_query_log_file";
---exec sed -r -e 's/^[^|]+\|[^|]+\|[^|]+\| *//' $MYSQLD_DATADIR/groonga-query-log.log
+--source ../../include/mroonga/print_groonga_query_log.inc
SET GLOBAL mroonga_query_log_file = DEFAULT;
SET GLOBAL mroonga_log_file = DEFAULT;