Bug #51013 | conn.getMetaData( ).getProcedures(conn.getCatalog(),null,"%") returns empty | ||
---|---|---|---|
Submitted: | 9 Feb 2010 5:45 | Modified: | 8 Mar 2010 8:18 |
Reporter: | Wenjie Tu | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 5.1.10 | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any |
[9 Feb 2010 5:45]
Wenjie Tu
[9 Feb 2010 5:48]
Wenjie Tu
System Variables of my Mysql Server
Attachment: System Variables of MySQL 5.1.32-community.csv (application/vnd.ms-excel, text), 7.25 KiB.
[9 Feb 2010 5:55]
Wenjie Tu
Sorry following paragraph in "How to repeat" block: And I found that when I set "useInformationSchema" true when create connection, conn.getCatalog() still returns "TEST", but conn.getMetaData( ).getProcedures("test",null,"%") can return all store procedures. should be: And I found that when I set "useInformationSchema" true when create connection, conn.getCatalog() still returns "TEST", but conn.getMetaData( ).getProcedures(conn.getCatalog(),null,"%") can return all store procedures.
[9 Feb 2010 11:17]
Tonci Grgin
Wenjie, let me get his straight. You want me to pass *non-existent* database in connection string, right? As database *is* "test" and you're passing "TEST".
[9 Feb 2010 11:40]
Tonci Grgin
Wenjie, I tested with "TEST" in connection string, and then again with "TEST" in conn.srting and "JSHOP". Can't find any problems... .Loading JDBC driver 'com.mysql.jdbc.Driver' Done. Done. java.vm.version : 1.5.0_17-b04 java.vm.vendor : Sun Microsystems Inc. java.runtime.version : 1.5.0_17-b04 os.name : Windows Server 2008 os.version : null sun.management.compiler : HotSpot Client Compiler Connected to 5.1.32-community-log conn.GetCatalog :TEST jshop jshop Time: 0,45 OK (1 test) ------------------------------- JSHOP .Loading JDBC driver 'com.mysql.jdbc.Driver' Done. Done. Connected to 5.1.32-community-log java.vm.version : 1.5.0_17-b04 java.vm.vendor : Sun Microsystems Inc. java.runtime.version : 1.5.0_17-b04 os.name : Windows Server 2008 os.version : null sun.management.compiler : HotSpot Client Compiler conn.GetCatalog :TEST jshop jshop Time: 0,323 OK (1 test) Server version: 5.1.32-community-log MySQL Community Server (GPL) mysql> show variables like "%lower%"; +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | lower_case_file_system | ON | | lower_case_table_names | 1 | +------------------------+-------+ Tables in jshop are InnoDB. Please try repeating with latest c/J 5.1 snapshot from http://downloads.mysql.com/snapshots.php.
[9 Feb 2010 12:06]
Tonci Grgin
Problems detected reported in Bug#51022.
[8 Mar 2010 8:18]
Wenjie Tu
Tonci, I'm suprised that it's not reprocuable at your side. I made a test against the latest c/J 5.1 snapshot mysql-connector-java-5.1-nightly-20100308 and found this issue too: When conn url is "jdbc:mysql://dbserver:3306/TEST", succceded in listing tables, failed to list procedures. However if url is "jdbc:mysql://dbserver:3306/TEST?useInformationSchema=true", succeeded in listing both tables and procedures. "useInformationSchema" is always set true during your test?
[5 Apr 2011 22:52]
lin zhu
Any update?
[6 Apr 2011 15:31]
Tonci Grgin
Lin, I really have no idea what you guys are talking about here... All my tests pass and I have absolutely no problems in this part of code (useInformationSchema=false), especially since I rewrote it almost completely in past few months.
[7 Apr 2011 17:23]
lin zhu
Hey Tonci, Thank you for the updating! We have found the root cause of problem: we are using a commercial Data Direct driver which wraps mySql Connector/J. We believe something wrong in it to make problem happen. Using a mySql Connector/J driver directly, everything simply works fine. I appreciate your time! Lin
[8 Apr 2011 9:02]
Tonci Grgin
No problem Lin. Glad things work now.