Commit d3a2c2ea authored by Varun Gupta's avatar Varun Gupta

Make the test func_json deterministic

parent baa60b59
......@@ -1332,13 +1332,14 @@ drop table t1;
#
CREATE TABLE t1 (e INT, a VARCHAR(255), v VARCHAR(255));
INSERT INTO t1 VALUES (0, 'a1', '1') , (0, 'a2', '2') , (1, 'b1', '3');
EXPLAIN SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e;
EXPLAIN SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A ALL NULL NULL NULL NULL 3 Using temporary; Using filesort
1 SIMPLE B ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e;
SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
e JSON_OBJECTAGG(B.a, B.v)
0 {"a1":"1", "a1":"1", "a1":"1", "a2":"2", "a2":"2", "a2":"2"}
0 {"a1":"1", "a1":"1", "a1":"1"}
0 {"a2":"2", "a2":"2", "a2":"2"}
1 {"b1":"3", "b1":"3", "b1":"3"}
DROP TABLE t1;
#
......
......@@ -833,8 +833,8 @@ drop table t1;
CREATE TABLE t1 (e INT, a VARCHAR(255), v VARCHAR(255));
INSERT INTO t1 VALUES (0, 'a1', '1') , (0, 'a2', '2') , (1, 'b1', '3');
EXPLAIN SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e;
SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e;
EXPLAIN SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
SELECT B.e, JSON_OBJECTAGG(B.a, B.v) FROM t1 A, t1 B GROUP BY B.e, B.a;
DROP TABLE t1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment