Bug #17649 Usage of underscore in LIKE argument for SHOW TABLES
Submitted: 22 Feb 2006 14:51 Modified: 23 Feb 2006 10:16
Reporter: Bastien Bobe Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:4.0.24-10ubuntu2 OS:Linux (Ubuntu)
Assigned to: CPU Architecture:Any

[22 Feb 2006 14:51] Bastien Bobe
Description:
I have encountered a problem in this type of request :

mysql > SHOW TABLES LIKE 'table_%';

The request must escape the underscore to work properly.

This works :

mysql > SHOW TABLES LIKE 'table\_%';

Is it a feature or is it a bug ?
Thank you.
Bastien.

How to repeat:
I have encountered a problem in this type of request :

mysql > SHOW TABLES LIKE 'table_%';

The request must escape the underscore to work properly.

This works :

mysql > SHOW TABLES LIKE 'table\_%';

Is it a feature or is it a bug ?
Thank you.
Bastien.
[23 Feb 2006 10:16] Valeriy Kravchuk
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

Please, read the manual, http://dev.mysql.com/doc/refman/4.1/en/string-comparison-functions.html.
[9 Nov 2012 16:07] Iskra Zvezda
the underscore character is used as wildcard when used with LIKE and means one character, for example " select * from table where field LIKE 'a_a' " looks for
'ana','ara','aka'