maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #12336
Review for: MDEV-17399 Add support for JSON_TABLE, part #8
Hi Alexey,
Did you try running MySQL's test?
It needs some adjustments to run, but these can be done. I've found four
crashes:
--echo #
--echo # Bug#26500384: ASSERT FAILURE IN QUERY WITH WINDOW FUNCTION AND
--echo # JSON_TABLE
--echo #
--disable_parsing
## psergey: crash!
CREATE TABLE t (x INT);
INSERT INTO t VALUES (1), (2), (3);
--error ER_BAD_FIELD_ERROR
SELECT MAX(t.x) OVER () m, jt.* FROM t,
JSON_TABLE(JSON_ARRAY(m), '$[*]' COLUMNS (i INT PATH '$')) jt;
DROP TABLE t;
--enable_parsing
--echo #
--echo # Bug#26679671: SIG 11 IN JSON_BINARY::PARSE_BINARY()
--echo #
CREATE TABLE t1(id INT, f1 JSON);
INSERT INTO t1 VALUES (1, '{\"1\": 1}'), (2, '{\"1\": 2}'), (3, '{\"1\": 3}'),
(4, '{\"1\": 4}'), (5, '{\"1\": 5}'), (6, '{\"1\": 6}');
ANALYZE TABLE t1;
# ...
SELECT * FROM t1 WHERE id IN
(SELECT id FROM t1 as tt2,
JSON_TABLE(f1, "$" COLUMNS (jf FOR ORDINALITY)) AS tbl);
EXPLAIN SELECT * FROM t1 WHERE id IN
(SELECT id FROM t1 as tt2,
JSON_TABLE(f1, "$" COLUMNS (jf FOR ORDINALITY)) AS tbl);
--echo #
--echo # Bug#26500384: ASSERT FAILURE IN QUERY WITH WINDOW FUNCTION AND
--echo # JSON_TABLE
--echo #
--disable_parsing
## psergey: crash!
CREATE TABLE t (x INT);
INSERT INTO t VALUES (1), (2), (3);
--error ER_BAD_FIELD_ERROR
SELECT MAX(t.x) OVER () m, jt.* FROM t,
JSON_TABLE(JSON_ARRAY(m), '$[*]' COLUMNS (i INT PATH '$')) jt;
DROP TABLE t;
--enable_parsing
There are some interesting non-crash issues, too.
Here's the file I've ended up with:
https://gist.github.com/spetrunia/6e567f77a42bd0df3a3c9bae0b4f3a9c
BR
Sergei
--
Sergei Petrunia, Software Developer
MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog
References