Bug #17747 show variables not working
Submitted: 27 Feb 2006 17:58 Modified: 27 Feb 2006 22:04
Reporter: [ name withheld ] (Basic Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.1.5 OS:Windows (WinXP sp2)
Assigned to: CPU Architecture:Any

[27 Feb 2006 17:58] [ name withheld ]
Description:
A simple "show variables" does work, but if you try to limit results with a "like ..." clause no rows are returned.

How to repeat:
mysql> show variables like '*have*';
Empty set (0.00 sec)

mysql> select version();
+--------------------+
| version()          |
+--------------------+
| 5.1.5-alpha-nt-max |
+--------------------+
1 row in set (0.00 sec)
[27 Feb 2006 22:01] Jorge del Conde
Hi!

The results you're seeing are expected:  there is _nothing_ that contains '*have*' in the output of show variables.

On the other hand, I assume you're using the '*' as wild cards, which is incorrect.

The wildcards for mysql are %:

mysql> show variables like '%have%';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| have_archive          | YES   |
| have_bdb              | NO    |
| have_blackhole_engine | NO    |
| have_compress         | YES   |
| have_crypt            | NO    |
| have_csv              | NO    |
| have_example_engine   | NO    |
| have_federated_engine | NO    |
| have_geometry         | YES   |
| have_innodb           | YES   |
| have_isam             | NO    |
| have_ndbcluster       | NO    |
| have_openssl          | NO    |
| have_query_cache      | YES   |
| have_raid             | NO    |
| have_rtree_keys       | YES   |
| have_symlink          | YES   |
+-----------------------+-------+
17 rows in set (0.00 sec)

mysql>