Bug #16009 SHOW TABLES via ODBC to Mysql v 5.0
Submitted: 27 Dec 2005 10:12 Modified: 29 Dec 2005 7:33
Reporter: Theodoropoulos Jim Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51.12.00 OS:Windows (Windows Xp)
Assigned to: MySQL Verification Team CPU Architecture:Any

[27 Dec 2005 10:12] Theodoropoulos Jim
Description:
I use myODBC driver to access mySql from my application (it is written to xBase++)

When i use "SHOW TABLES;" statement it works ok with mySql 4.
When i use the same statement with mySQL 5.00 it returns an error <mybase>.table_names table doesn't exists. 

How to repeat:
If you Use MS-Access and try to import from a mySql5.00 data Base then the list of tables doesn't appears (i think it is the same problem).
[27 Dec 2005 10:53] MySQL Verification Team
I was unable to repeat using the ODBC tool called odbcte32:

Full Connect(Default)

Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3

Successfully connected to DSN 'dbtest'.
SQLExecDirect:	In:hstmt = 0x003B1B50, szSqlStr = "select version()", 
cbSqlStr = -3
Return:	SQL_SUCCESS=0

Get Data All:
"version()"
"5.0.17-nt-log"
1 row fetched from 1 column.

SQLExecDirect:
In:hstmt = 0x003B1B50, szSqlStr = "show tables from mysql", 
cbSqlStr = -3
Return:	SQL_SUCCESS=0

Get Data All:
"Tables_in_mysql"
"columns_priv"
"db"
"func"
"help_category"
"help_keyword"
"help_relation"
"help_topic"
"host"
"proc"
"procs_priv"
"tables_priv"
"time_zone"
"time_zone_leap_second"
"time_zone_name"
"time_zone_transition"
"time_zone_transition_type"
"user"
17 rows fetched from 1 column.

Could you please verify if your DSN have a database selected when
connecting or issue the command use db_name before to issue the
show table command.
[27 Dec 2005 11:10] Theodoropoulos Jim
The DSN have a selected data Base. 
When I use the same DSN to another mySQL server (V 4.1) it works ok. 
When I use with it with mySQL 5.0 Server it creates the error. 
Is there anything i must do care to Server Installation?
[27 Dec 2005 11:20] MySQL Verification Team
The command show tables works as expected when using the
command client mysql ?
[29 Dec 2005 7:33] Theodoropoulos Jim
It works. 
Thanks for your help. 
I changed the flags setting to ODBC driver and it works. 
It needs different settings for mySql 5.00 than mySql 4.1

I think that the problem was the flag "Ignore # in table name". When I uncheck it, it works ok with mySql 5.00. 

Thanks again for help.
[26 Jan 2011 14:27] Alejandro Falero
Thanks a lot.
I had the same problem using MySql 5.5
The solution proposed here works in my case too.