Bug #90160 querying the KEYWORDS table fails unless there is a default database
| Submitted: | 21 Mar 2018 11:41 | Modified: | 17 Aug 2018 23:04 |
|---|---|---|---|
| Reporter: | Giuseppe Maxia (OCA) | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: Information schema | Severity: | S2 (Serious) |
| Version: | 8.0.11 | OS: | Linux |
| Assigned to: | CPU Architecture: | Any |
[21 Mar 2018 11:51]
MySQL Verification Team
Hello Giuseppe, Thank you for the report and feedback! Thanks, Umesh
[21 Mar 2018 13:07]
Shane Bester
Another testcase: launch "mysql -uroot" without a default database....
----------------
drop view if exists test.t;
drop table if exists test.t;
create view test.t as
select * from json_table('[{"a":"3"}]',"$[*]" columns(rowid for ordinality))q;
select * from test.t;
[17 Aug 2018 23:04]
Jon Stephens
Documented fix in the MySQL 8.0.13 changelog as follows:
Selecting from the INFORMATION_SCHEMA.KEYWORDS table failed when
no default database had been selected.
Also updated the note about this issue in the I_S.KEYWORDS documentation.
Closed.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.041 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
Description: Querying the KEYWORDS table without having an active database gives an error. mysql [localhost] {msandbox} ((none)) > select count(*) from information_schema.KEYWORDS; ERROR 1046 (3D000): No database selected When we set any database as active, we can query that table: mysql [localhost] {msandbox} ((none)) > use test Database changed mysql [localhost] {msandbox} (test) > select count(*) from information_schema.KEYWORDS; +----------+ | count(*) | +----------+ | 675 | +----------+ 1 row in set (0.00 sec) How to repeat: run mysql -u username -p -e 'select count(*) from information_schema.KEYWORDS'