Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
N/A
-
None
Description
Upon a missing mandatory JSON table alias, MariaDB produces the generic syntax error ER_PARSE_ERROR:
bb-10.6-mdev17399-psergey2 8b533cc1d5 |
MariaDB [db]> select * from json_table('[]', '$' COLUMNS(x FOR ORDINALITY)); |
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 '' at line 1 |
while MySQL returns a nicer context-specific error:
MySQL 8.0.23 |
MySQL [db]> select * from json_table('[]', '$' COLUMNS(x FOR ORDINALITY)); |
ERROR 3667 (42000): Every table function must have an alias |
It is a cosmetic problem, but deep within a more complicated query it can become confusing.
Attachments
Issue Links
- relates to
-
MDEV-17399 Add support for JSON_TABLE
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link | This issue relates to TODO-2305 [ TODO-2305 ] |
Assignee | Sergei Petrunia [ psergey ] | Alexey Botchkov [ holyfoot ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
issue.field.resolutiondate | 2021-03-16 08:22:08.0 | 2021-03-16 08:22:08.343 |
Fix Version/s | 10.6.0 [ 24431 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 120109 ] | MariaDB v4 [ 159024 ] |