Details
-
New Feature
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
Description
Currently JSON_TABLE explicitly limits supported column types to a basic subset of types. Other types cause syntax error:
|
bb-10.6-mdev17399-psergey2 8b533cc1d5 |
MariaDB [test]> select * from json_table('["foo"]', '$[*]' columns(a enum('foo','bar') path '$')) a; |
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'enum('foo','bar') path '$')) a' at line 1 |
Works in MySQL:
|
MySQL 8.0.23 |
MySQL [test]> select * from json_table('["foo"]', '$[*]' columns(a enum('foo','bar') path '$')) a; |
+------+ |
| a |
|
+------+ |
| foo |
|
+------+ |
1 row in set (0.001 sec) |
This is unexpected and, for example, MySQL, doesn't do that.
Attachments
Issue Links
- relates to
-
MDEV-17399 Add support for JSON_TABLE
-
- Closed
-
-
MDEV-39253 Incorrect data type handling in JSON_TABLE
-
- Needs Feedback
-