summaryrefslogtreecommitdiff
path: root/storage/connect/mysql-test
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-11-22 14:49:51 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2015-11-22 14:49:51 +0100
commit1d239d8c94106561a017c7534674003042180015 (patch)
treef42487fe3b75fc7cdd1746a43ed44d633cfd9e02 /storage/connect/mysql-test
parent0a852591dbaee4c33ab87d92d70a56cab225a2ca (diff)
downloadmariadb-git-1d239d8c94106561a017c7534674003042180015.tar.gz
Make changes required by version 10.1.9 (see Sergei's mmail):
Use PlgDBSuballoc in JbinAlloc to avoid unsupported longjmp's. modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h modified: storage/connect/mysql-test/connect/r/json_udf.result modified: storage/connect/mysql-test/connect/t/json_udf.inc modified: storage/connect/tabjson.cpp modified: storage/connect/value.cpp Add new UDF functions jsoncontains, jsoncontains_path, json_set_item, json_insert_item, json_update_item, jbin_set_item, jbin_insert_item, jbin_update_item modified: storage/connect/json.cpp modified: storage/connect/json.h modified: storage/connect/jsonudf.cpp modified: storage/connect/jsonudf.h
Diffstat (limited to 'storage/connect/mysql-test')
-rw-r--r--storage/connect/mysql-test/connect/r/json_udf.result4
-rw-r--r--storage/connect/mysql-test/connect/t/json_udf.inc68
2 files changed, 34 insertions, 38 deletions
diff --git a/storage/connect/mysql-test/connect/r/json_udf.result b/storage/connect/mysql-test/connect/r/json_udf.result
index 81acbea91a6..e9a1265d0fe 100644
--- a/storage/connect/mysql-test/connect/r/json_udf.result
+++ b/storage/connect/mysql-test/connect/r/json_udf.result
@@ -334,8 +334,6 @@ JsonGet_Int(@j2,'qty')
SELECT JsonGet_Int('{"qty":56,"price":3.141600,"truc":"machin","garanty":null}','chose');
JsonGet_Int('{"qty":56,"price":3.141600,"truc":"machin","garanty":null}','chose')
NULL
-Warnings:
-Warning 1105 Value not found
SELECT JsonGet_Int(JsonGet_String(Json_Array(Json_Array(45,28),Json_Array(36,45,89)),'[1]:*'),'[+]') sum;
sum
170
@@ -381,8 +379,6 @@ JsonGet_Real('{"qty":56,"price":3.141600,"truc":"machin","garanty":null}','price
SELECT JsonGet_Real('{"qty":56,"price":3.141600,"truc":"machin","garanty":null}','chose');
JsonGet_Real('{"qty":56,"price":3.141600,"truc":"machin","garanty":null}','chose')
NULL
-Warnings:
-Warning 1105 Value not found
SELECT department, JsonGet_Real(Json_Object(department, Json_Array_Grp(salary) "Json_salaries"),'salaries:[+]') Sumsal FROM t3 GROUP BY department;
department Sumsal
0021 28500.000000000000000
diff --git a/storage/connect/mysql-test/connect/t/json_udf.inc b/storage/connect/mysql-test/connect/t/json_udf.inc
index de411696885..600f95a3d29 100644
--- a/storage/connect/mysql-test/connect/t/json_udf.inc
+++ b/storage/connect/mysql-test/connect/t/json_udf.inc
@@ -9,40 +9,40 @@ if (!$HA_CONNECT_SO) {
--skip Needs a dynamically built ha_connect.so
}
-CREATE FUNCTION json_array RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_array_add RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_array_add_values RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_array_delete 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_object_add RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_object_delete RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_object_list RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jsonvalue 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';
-CREATE FUNCTION json_item_merge RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_get_item RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jsonget_string RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jsonget_int RETURNS INTEGER SONAME 'ha_connect';
-CREATE FUNCTION jsonget_real RETURNS REAL SONAME 'ha_connect';
-CREATE FUNCTION jsonlocate RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_locate_all RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_file RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jfile_make RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION json_serialize RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_array RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_array_add_values RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_array_add RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_array_delete RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_object RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_object_nonull RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_object_add RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_object_delete RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_object_list RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_get_item RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_item_merge RETURNS STRING SONAME 'ha_connect';
-CREATE FUNCTION jbin_file RETURNS STRING SONAME 'ha_connect';
+--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_array_add_values RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_array_delete 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_object_add RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_object_delete RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_object_list RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonvalue 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';
+--eval CREATE FUNCTION json_item_merge RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_get_item RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonget_string RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonget_int RETURNS INTEGER SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonget_real RETURNS REAL SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jsonlocate RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_locate_all RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_file RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jfile_make RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION json_serialize RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_array RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_array_add_values RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_array_add RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_array_delete RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_object RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_object_nonull RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_object_add RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_object_delete RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_object_list RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_get_item RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_item_merge RETURNS STRING SONAME '$HA_CONNECT_SO';
+--eval CREATE FUNCTION jbin_file RETURNS STRING SONAME '$HA_CONNECT_SO';
--enable_query_log