[MDEV-22291] JSON_TABLE: SELECT from json_table does not work without default database Created: 2020-04-18  Updated: 2020-04-20  Resolved: 2020-04-20

Status: Closed
Project: MariaDB Server
Component/s: JSON
Affects Version/s: N/A
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexey Botchkov
Resolution: Fixed Votes: 0
Labels: None

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

 Description   

bb-10.5-hf 6dfb3fab2

MariaDB [(none)]> select * from json_table('{"a":0}',"$" columns(a for ordinality)) foo;
ERROR 1046 (3D000): No database selected

It works with MySQL:

MySQL 8.0.19

MySQL [(none)]> select * from json_table('{"a":0}',"$" columns(a for ordinality)) foo;
+------+
| a    |
+------+
|    1 |
+------+
1 row in set (0.001 sec)


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