Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PS-9314 fix: Signal 11 when using JSON_TABLE #5368

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mysql-test/r/func_str.result
Original file line number Diff line number Diff line change
Expand Up @@ -5299,6 +5299,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 22032: Invalid data type for JSON data in argument 1 to function json_table; a JSON string or JSON type is required.
#
# 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 @@ -2181,6 +2181,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_INVALID_TYPE_FOR_JSON
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 @@ -1044,9 +1044,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
Loading