summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2021-02-05 18:33:36 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2021-02-05 18:34:06 +0100
commite7d9c1d498d0b86ef773f21a95f60af26b2dce75 (patch)
tree433d98bfd3878f67f1064c6650654631ccf1370f /storage
parentdc31627c2d3100ecb45ef71d8040fedff202a2f7 (diff)
downloadmariadb-git-e7d9c1d498d0b86ef773f21a95f60af26b2dce75.tar.gz
Fix connect engine ppc64 fail
Diffstat (limited to 'storage')
-rw-r--r--storage/connect/bsonudf.cpp2
-rw-r--r--storage/connect/mysql-test/connect/r/bson_udf.result12
2 files changed, 7 insertions, 7 deletions
diff --git a/storage/connect/bsonudf.cpp b/storage/connect/bsonudf.cpp
index 0ef2f8ca9e6..29fe0a6bf22 100644
--- a/storage/connect/bsonudf.cpp
+++ b/storage/connect/bsonudf.cpp
@@ -3022,7 +3022,7 @@ void bson_object_grp_add(UDF_INIT *initid, UDF_ARGS *args, char*, char*)
PBVAL bop = (PBVAL)g->Activityp;
if (g->N-- > 0)
- bxp->SetKeyValue(bop, bxp->MakeValue(args, 0), MakePSZ(g, args, 1));
+ bxp->SetKeyValue(bop, bxp->MakeValue(args, 1), MakePSZ(g, args, 0));
} // end of bson_object_grp_add
diff --git a/storage/connect/mysql-test/connect/r/bson_udf.result b/storage/connect/mysql-test/connect/r/bson_udf.result
index 4ec1f0c87fd..fef55f7d3d9 100644
--- a/storage/connect/mysql-test/connect/r/bson_udf.result
+++ b/storage/connect/mysql-test/connect/r/bson_udf.result
@@ -280,13 +280,13 @@ SELECT Bson_Object_Grp(SALARY) FROM t3;
ERROR HY000: Can't initialize function 'bson_object_grp'; This function requires 2 arguments (key, value)
SELECT Bson_Object_Grp(NAME, SALARY) FROM t3;
Bson_Object_Grp(NAME, SALARY)
-{"":"MARTIN","ffffęp§@":"KITTY"}
+{"BANCROFT":9600.00,"SMITH":9000.00,"MERCHANT":8700.00,"FUNNIGUY":8500.00,"BUGHAPPY":8500.00,"BIGHEAD":8000.00,"SHRINKY":7500.00,"WALTER":7400.00,"FODDERMAN":7000.00,"TONGHO":6800.00,"SHORTSIGHT":5500.00,"MESSIFUL":5000.50,"HONEY":4900.00,"GOOSEPEN":4700.00,"CHERRY":4500.00,"MONAPENNY":3800.00,"KITTY":3000.45,"PLUMHEAD":2800.00,"STRONG":23000.00,"BULLOZER":14800.00,"WERTHER":14500.00,"QUINN":14000.00,"ORELLY":13400.00,"BIGHORN":11000.00,"BROWNY":10500.00,"WHEELFOR":10030.00,"MARTIN":10000.00}
SELECT Bson_Make_Object(DEPARTMENT, Bson_Object_Grp(NAME, SALARY) "Json_SALARIES") FROM t3 GROUP BY DEPARTMENT;
Bson_Make_Object(DEPARTMENT, Bson_Object_Grp(NAME, SALARY) "Json_SALARIES")
-{"DEPARTMENT":"0021","SALARIES":{"":"SHORTSIGHT"}}
-{"DEPARTMENT":"0318","SALARIES":{"":"WHEELFOR"}}
-{"DEPARTMENT":"0319","SALARIES":{"":"GOOSEPEN","ffffęp§@":"KITTY"}}
-{"DEPARTMENT":"2452","SALARIES":{"":"CHERRY"}}
+{"DEPARTMENT":"0021","SALARIES":{"STRONG":23000.00,"SHORTSIGHT":5500.00}}
+{"DEPARTMENT":"0318","SALARIES":{"BANCROFT":9600.00,"PLUMHEAD":2800.00,"HONEY":4900.00,"TONGHO":6800.00,"WALTER":7400.00,"SHRINKY":7500.00,"WERTHER":14500.00,"MERCHANT":8700.00,"WHEELFOR":10030.00}}
+{"DEPARTMENT":"0319","SALARIES":{"BULLOZER":14800.00,"QUINN":14000.00,"BROWNY":10500.00,"KITTY":3000.45,"MONAPENNY":3800.00,"MARTIN":10000.00,"FUNNIGUY":8500.00,"BUGHAPPY":8500.00,"FODDERMAN":7000.00,"MESSIFUL":5000.50,"GOOSEPEN":4700.00}}
+{"DEPARTMENT":"2452","SALARIES":{"BIGHEAD":8000.00,"ORELLY":13400.00,"BIGHORN":11000.00,"SMITH":9000.00,"CHERRY":4500.00}}
SELECT Bson_Array_Grp(NAME) FROM t3;
Bson_Array_Grp(NAME)
["BANCROFT","SMITH","MERCHANT","FUNNIGUY","BUGHAPPY","BIGHEAD","SHRINKY","WALTER","FODDERMAN","TONGHO","SHORTSIGHT","MESSIFUL","HONEY","GOOSEPEN","CHERRY","MONAPENNY","KITTY","PLUMHEAD","STRONG","BULLOZER","WERTHER","QUINN","ORELLY","BIGHORN","BROWNY","WHEELFOR","MARTIN"]
@@ -303,7 +303,7 @@ Bson_Object_Key(name, title)
{"WHEELFOR":"SALESMAN"}
SELECT Bson_Object_Grp(name, title) FROM t3 WHERE DEPARTMENT = 318;
Bson_Object_Grp(name, title)
-{"SALESMAN":"WHEELFOR","ADMINISTRATOR":"SHRINKY","ENGINEER":"TONGHO","SECRETARY":"HONEY","TYPIST":"PLUMHEAD","DIRECTOR":"WERTHER"}
+{"BANCROFT":"SALESMAN","MERCHANT":"SALESMAN","SHRINKY":"ADMINISTRATOR","WALTER":"ENGINEER","TONGHO":"ENGINEER","HONEY":"SECRETARY","PLUMHEAD":"TYPIST","WERTHER":"DIRECTOR","WHEELFOR":"SALESMAN"}
#
# Test value getting UDF's
#