[MDEV-25150] JSON_TABLE: Some data types cause parsing error: ENUM, SET, geometry, INET6 Created: 2021-03-15  Updated: 2022-06-01

Status: Open
Project: MariaDB Server
Component/s: Data types, JSON
Affects Version/s: N/A
Fix Version/s: 10.6

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Rucha Deodhar
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-17399 Add support for JSON_TABLE Closed

 Description   

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)

Other types which cause a syntax error are SET, geometry of different sorts, INET6. The list may be incomplete.


Generated at Thu Feb 08 09:35:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.