mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-28480: Assertion `0' failed in Item_row::illegal_method_call on
SELECT FROM JSON_TABLE Analysis: When fix_fields_if_needed() is called, it doesnt check if operands are valid because check_cols() is not called. So it doesn't error out and eventually crashes. Fix: Use fix_fields_if_needed_for_scalar() instead of fix_fields_if_needed(). It filters the scalar and returns the error if it occurs.
This commit is contained in:
@@ -1005,5 +1005,11 @@ name VARCHAR(10) CHARACTER SET latin1 COLLATE DEFAULT PATH '$.name'
|
||||
name
|
||||
Jeans
|
||||
#
|
||||
# MDEV-28480: Assertion `0' failed in Item_row::illegal_method_call
|
||||
# on SELECT FROM JSON_TABLE
|
||||
#
|
||||
SELECT 1 FROM JSON_TABLE (row(1,2), '$' COLUMNS (o FOR ORDINALITY)) AS j;
|
||||
ERROR 21000: Operand should contain 1 column(s)
|
||||
#
|
||||
# End of 10.6 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user