summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-03-01 23:55:09 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2015-03-01 23:55:09 +0100
commit5f4909b31d63d22232030583aaa6a7b7c749bb36 (patch)
treeaf501c7540b9e15f0f4d659d20e26f8708e42404
parent34c89597effa0d5d4f7a4f7ac167e7f435dc105d (diff)
downloadmariadb-git-5f4909b31d63d22232030583aaa6a7b7c749bb36.tar.gz
- Making json_udf test working on linux
added: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/mysql-test/connect/r/json_udf.result storage/connect/mysql-test/connect/t/json_udf.test
-rw-r--r--storage/connect/mysql-test/connect/r/json_udf.result7
-rw-r--r--storage/connect/mysql-test/connect/t/json_udf.inc24
-rw-r--r--storage/connect/mysql-test/connect/t/json_udf.test10
3 files changed, 26 insertions, 15 deletions
diff --git a/storage/connect/mysql-test/connect/r/json_udf.result b/storage/connect/mysql-test/connect/r/json_udf.result
index 4a672bf0d44..1455bac9017 100644
--- a/storage/connect/mysql-test/connect/r/json_udf.result
+++ b/storage/connect/mysql-test/connect/r/json_udf.result
@@ -1,10 +1,3 @@
-CREATE FUNCTION Json_Array RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Array_Add RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Object RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Object_Nonull RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Value returns STRING SONAME 'ha_connect';
-CREATE AGGREGATE FUNCTION Json_Array_Grp RETURNS STRING SONAME 'ha_connect';
-CREATE AGGREGATE FUNCTION Json_Object_Grp RETURNS STRING SONAME 'ha_connect';
#
# Test UDF's with constant arguments
#
diff --git a/storage/connect/mysql-test/connect/t/json_udf.inc b/storage/connect/mysql-test/connect/t/json_udf.inc
new file mode 100644
index 00000000000..07a970e1fa6
--- /dev/null
+++ b/storage/connect/mysql-test/connect/t/json_udf.inc
@@ -0,0 +1,24 @@
+--disable_query_log
+if ($WINDOWS)
+{
+--eval CREATE FUNCTION Json_Array RETURNS STRING SONAME 'ha_connect.dll';
+--eval CREATE FUNCTION Json_Array_Add RETURNS STRING SONAME 'ha_connect.dll';
+--eval CREATE FUNCTION Json_Object RETURNS STRING SONAME 'ha_connect.dll';
+--eval CREATE FUNCTION Json_Object_Nonull RETURNS STRING SONAME 'ha_connect.dll';
+--eval CREATE FUNCTION Json_Value returns STRING SONAME 'ha_connect.dll';
+--eval CREATE AGGREGATE FUNCTION Json_Array_Grp RETURNS STRING SONAME 'ha_connect.dll';
+--eval CREATE AGGREGATE FUNCTION Json_Object_Grp RETURNS STRING SONAME 'ha_connect.dll';
+}
+
+if (!$WINDOWS)
+{
+--eval CREATE FUNCTION Json_Array RETURNS STRING SONAME 'ha_connect.so';
+--eval CREATE FUNCTION Json_Array_Add RETURNS STRING SONAME 'ha_connect.so';
+--eval CREATE FUNCTION Json_Object RETURNS STRING SONAME 'ha_connect.so';
+--eval CREATE FUNCTION Json_Object_Nonull RETURNS STRING SONAME 'ha_connect.so';
+--eval CREATE FUNCTION Json_Value returns STRING SONAME 'ha_connect.so';
+--eval CREATE AGGREGATE FUNCTION Json_Array_Grp RETURNS STRING SONAME 'ha_connect.so';
+--eval CREATE AGGREGATE FUNCTION Json_Object_Grp RETURNS STRING SONAME 'ha_connect.so';
+}
+--enable_query_log
+
diff --git a/storage/connect/mysql-test/connect/t/json_udf.test b/storage/connect/mysql-test/connect/t/json_udf.test
index 744e1764e3b..c5510bf9cc0 100644
--- a/storage/connect/mysql-test/connect/t/json_udf.test
+++ b/storage/connect/mysql-test/connect/t/json_udf.test
@@ -1,16 +1,10 @@
+--source json_udf.inc
+
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MTR_SUITE_DIR/std_data/biblio.json $MYSQLD_DATADIR/test/biblio.json
--copy_file $MTR_SUITE_DIR/std_data/employee.dat $MYSQLD_DATADIR/test/employee.dat
-CREATE FUNCTION Json_Array RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Array_Add RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Object RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Object_Nonull RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION Json_Value returns STRING SONAME 'ha_connect';
-CREATE AGGREGATE FUNCTION Json_Array_Grp RETURNS STRING SONAME 'ha_connect';
-CREATE AGGREGATE FUNCTION Json_Object_Grp RETURNS STRING SONAME 'ha_connect';
-
--echo #
--echo # Test UDF's with constant arguments
--echo #