From b9a9b82f9ec09e7b52b03984b0d25f5dc86b0f73 Mon Sep 17 00:00:00 2001 From: Olivier Bertrand Date: Mon, 2 Mar 2015 00:35:56 +0100 Subject: [PATCH] - Make json_udf test work on Windows modified: storage/connect/mysql-test/connect/t/json_udf.inc --- .../connect/mysql-test/connect/t/json_udf.inc | 57 +++++++++++-------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/storage/connect/mysql-test/connect/t/json_udf.inc b/storage/connect/mysql-test/connect/t/json_udf.inc index 07a970e1fa6..572f8b58c72 100644 --- a/storage/connect/mysql-test/connect/t/json_udf.inc +++ b/storage/connect/mysql-test/connect/t/json_udf.inc @@ -1,24 +1,33 @@ ---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 - +--disable_query_log +# +# Check if server has support for loading plugins +# +if (`SELECT @@have_dynamic_loading != 'YES'`) { + --skip UDF requires dynamic loading +} + +let $is_win = `select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Windows")`; + +if ($is_win) +{ +--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 (!$is_win) +{ +--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 +