-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Make json_udf test work on Windows
modified: storage/connect/mysql-test/connect/t/json_udf.inc
- Loading branch information
1 parent
5f4909b
commit b9a9b82
Showing
1 changed file
with
33 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|