Skip to content

Commit

Permalink
Merge branch 'dev/PS-9314-8.0-json_table_load_file' into dev/PS-9314-…
Browse files Browse the repository at this point in the history
…8.4-json_table_load_file
  • Loading branch information
percona-ysorokin committed Aug 27, 2024
2 parents 238b3c0 + 036b7d6 commit 130217a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions mysql-test/r/func_str.result
Original file line number Diff line number Diff line change
Expand Up @@ -5271,6 +5271,11 @@ is null
DROP PROCEDURE p1;
DROP TABLE t1;
#
# PS-9314: Signal 11 when using JSON_TABLE
# (https://perconadev.atlassian.net/browse/PS-9314)
SELECT ele AS domain FROM JSON_TABLE('["TEST' + (SELECT LOAD_FILE('test')) + '"]', "$[*]" COLUMNS (ele VARCHAR(70) PATH "$" )) AS json_elements;
ERROR HY000: Incorrect arguments to JSON_TABLE
#
# Bug #32163391 ASSERTION `CRC32_Z(CRC, POS, LENGTH)
# < STD::NUMERIC_LIMITS<HA_CHECKSUM>::MAX()' FAILED.
do crc32(char(1.134475e+308));
Expand Down
6 changes: 6 additions & 0 deletions mysql-test/t/func_str.test
Original file line number Diff line number Diff line change
Expand Up @@ -2165,6 +2165,12 @@ DROP TABLE t1;
#isable_query_log;
remove_file $file;

--echo #
--echo # PS-9314: Signal 11 when using JSON_TABLE
--echo # (https://perconadev.atlassian.net/browse/PS-9314)
--error ER_WRONG_ARGUMENTS
SELECT ele AS domain FROM JSON_TABLE('["TEST' + (SELECT LOAD_FILE('test')) + '"]', "$[*]" COLUMNS (ele VARCHAR(70) PATH "$" )) AS json_elements;

--echo #
--echo # Bug #32163391 ASSERTION `CRC32_Z(CRC, POS, LENGTH)
--echo # < STD::NUMERIC_LIMITS<HA_CHECKSUM>::MAX()' FAILED.
Expand Down
3 changes: 0 additions & 3 deletions sql/item_strfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1057,9 +1057,6 @@ class Item_load_file final : public Item_str_func {
func_arg->banned_function_name = func_name();
return true;
}

// prevent caching of the item value in Item_func_isnull
table_map used_tables() const override { return (table_map)1L; }
};

class Item_func_export_set final : public Item_str_func {
Expand Down

0 comments on commit 130217a

Please sign in to comment.