[9.1.21] Unresolved error when using JSON_TABLE function against simple scalar JSON array.
For some strange reason, the following valid and correct JSON_TABLE command generates an error when executing the following statement in a new query window or stored procedure.
- SET @json = CONVERT('[1095, 1106, 1193, 1288, 1357, 1385, 1390]', JSON);
- SELECT ids.* FROM JSON_TABLE(@json, '$[*]' COLUMNS (id INT UNSIGNED PATH '$')) `ids`;
The command returns correct results in the rows section below, but still generates a SQL error as shown:
The exact error in plain text format is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.`json_table` WHERE non_unique = 0' at line 1
This issue was reported back in October 2022 and is still not resolved. Thank you.