Bug #4374 SHOW TABLE STATUS FROM ignores collation_connection
Submitted: 2 Jul 2004 12:45 Modified: 2 Jul 2004 13:56
Reporter: Michael G. Zinner Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1.2-alpha OS:Microsoft Windows (Win2k)
Assigned to: Alexander Barkov CPU Architecture:Any

[2 Jul 2004 12:45] Michael G. Zinner
Description:
We now use SET CHARACTER SET utf8 instead of SET NAMES utf8 in the GUI tools to avoid manual CASTs.

Everything string in the GUI libraries is UTF8.

This works perfectly for e.g. SHOW CREATE TABLE `%s`.`%s`. But it does not work for the call of SHOW TABLE STATUS FROM `%s` LIKE '%s'.

When executing SHOW TABLE STATUS FROM `ärger` LIKE 'übel',
if ((row= mysql_fetch_row(res))) will be false even if the table `übel` exisits in the database `ärger`.

As a workaround I now do:
SET NAMES utf8
SHOW TABLE STATUS FROM `%s` LIKE '%s'
SET CHARACTER SET utf8

I hope this has no side effect.

How to repeat:
Add a schema and a table with an umlaut like ä,ü,ö and try to execute SHOW TABLE STATUS FROM `%s` LIKE '%s' via the C-API.

Suggested fix:
Check if TABLE STATUS FROM `%s` LIKE '%s' does the automatic character_set_connection translation.
[2 Jul 2004 13:56] Alexander Barkov
The problem was that LIKE's argument was not converted into utf8.