Bug #38547 SHOW CREATE TABLE
Submitted: 4 Aug 2008 19:23 Modified: 11 Aug 2008 19:24
Reporter: Santanu Lahiri Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S3 (Non-critical)
Version:5.1.4 OS:Windows (XP, SP2.)
Assigned to: CPU Architecture:Any

[4 Aug 2008 19:23] Santanu Lahiri
Description:
I am trying to run the SHOW CREATE TABLE xxxx query through ADO and ODBC and am getting empty strings as results.  When a similar thing happened with queries involving AES_DECRYPT, the suggestion was to use the CAST function to format the results correct;y.  That worked for that issue.  Is this the same issue?  If so, what syntax can I use to get the result passed back correctly?  The code works fine under 3.51 drivers, just acts up under 5.1.4.

How to repeat:
Use ADO to open a connection to a database, then execute the query using that connection.
[4 Aug 2008 19:27] Jess Balint
Santanu -

What version of the ODBC 3.51 driver were you using? What version of MySQL server are you using? This is a problem with binary character sets in results. There's an option added from bug#29402. This option will be included in the 5.1.5 release. You can try a nightly snapshot at http://downloads.mysql.com/snapshots.php.
[4 Aug 2008 19:40] Santanu Lahiri
Hi Jess,

The 3.51 driver is version 3.51.19.  The MySQL Server version is 5.0.45 community edition.  Tonci had explained the binary issue earlier and like I mentioned, his fix works, but I did not think that SHOW CREATE TABLE would involve any binary stuff.  But the symptoms were so similar, that I find it hard to dismiss it altogether as coincidence.
[4 Aug 2008 20:03] Santanu Lahiri
I tried the flag_no_binary_result option.  
This was the connection string:
Driver={MySQL ODBC 5.1 Driver};Option=268435460;Database=drugdb;Server=RXDBSERV;Port=3306

Does not seem to help...still getting the two columns with blank data.
[4 Aug 2008 20:04] Santanu Lahiri
Ooops, missed that little bit that said option will be added int the next release...sorry!
[11 Aug 2008 18:55] Tonci Grgin
Santanu, afais we should close this report, right?
[11 Aug 2008 19:16] Santanu Lahiri
Hi Tonci,

Yes, may as well close it.  I will have to wait until the next release to check if this NO_BINARY stuff works or not.  Meantime, I will be downgrading to V3.51
[11 Aug 2008 19:24] Tonci Grgin
Santanu, thought so but it would be impolite to close without asking you.

Thanks for your interest in MySQL.