Bug #100930 Missing quotes in query for checking state of undo tablespace

Submitted: 23 Sep 2020 20:34 Modified: 1 Oct 2020 17:36
Reporter: Agustín G Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: documentation

[23 Sep 2020 20:34] Agustín G
Description:
For https://dev.mysql.com/doc/refman/8.0/en/innodb-undo-tablespaces.html#truncate-undo-tablesp...

The following query is missing quotes:

SELECT NAME, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
  WHERE NAME LIKE tablespace_name;

How to repeat:
mysql [localhost:24249] {msandbox} (test) > SELECT NAME, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES   WHERE NAME LIKE innodb_undo_001;
ERROR 1054 (42S22): Unknown column 'innodb_undo_001' in 'where clause'

Suggested fix:
Use the following query instead:

SELECT NAME, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES
  WHERE NAME LIKE 'tablespace_name';

mysql [localhost:24249] {msandbox} (test) > SELECT NAME, STATE FROM INFORMATION_SCHEMA.INNODB_TABLESPACES   WHERE NAME LIKE 'innodb_undo_001';
+-----------------+--------+
| NAME            | STATE  |
+-----------------+--------+
| innodb_undo_001 | active |
+-----------------+--------+
1 row in set (0.01 sec)

It may also be good to be explicit about <tablespace_name> being an actual placeholder for innodb_undo_00x, etc.
[23 Sep 2020 22:18] MySQL Verification Team
Thank you for the bug report.
[24 Sep 2020 9:34] Stefan Hinz
Posted by developer:
 
Fixed. (Will take a little while to show up online.) Thanks for reporting!
[1 Oct 2020 17:36] Agustín G
Awesome. Thanks a lot!

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.051 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.