Re: Is this a bug ?
Posted by: Mark Matthews
Date: December 21, 2004 11:38PM


If I read your reply correctly, you're saying that if you've prepared a statement on a table, and then after that prepare, the table happens to get dropped, you get 'UNKNOWN COMMAND' when you try and execute the statement?

If that's the case, I'm not able to duplicate that here locally with Connector/J 3.1.5 or 3.0.16 and MySQL-4.1.8 on Linux (are you on unix or Windows?), but that doesn't mean it's not happening for you. (I get 'java.sql.SQLException: Table 'test.nonExistentTable' doesn't exist'):

conn.createStatement().executeUpdate("CREATE TABLE IF NOT EXISTS nonExistentTable (field1 int PRIMARY KEY NOT NULL, field2 INT)");

PreparedStatement pStmt = conn.prepareStatement("SELECT * FROM nonExistentTable WHERE field1=1 ORDER BY field2 ASC");
conn.createStatement().executeUpdate("DROP TABLE nonExistentTable");

I'm still unclear as to what you mean by 'I can't easily tell whether this happens because using Conenctor/J 3.1.5 breaks something else prior to the code in question being executed :-(' as well, since the 'something else' didn't seem to be in your reply. Whatever that breakage might be, we'd like to fix it, as it seems to be a curious case (we have quite a large number of people in production w 3.1.5 without issues).

If you really want this tracked down and fixed, your best bet is to come up with a standalone testcase that demonstrates the error, including the DDL for your tables, and the Java code that causes the exception to be thrown and file it as a bug report at otherwise we will probably just continue trying to guess what your problem might be, and get no closer to an answer :(

Options: ReplyQuote

Written By
December 19, 2004 09:22PM
December 20, 2004 03:27PM
December 20, 2004 03:42PM
December 20, 2004 05:13PM
December 21, 2004 07:12PM
December 21, 2004 07:52PM
December 21, 2004 09:32PM
December 21, 2004 09:43PM
December 21, 2004 10:13PM
December 21, 2004 10:28PM
Re: Is this a bug ?
December 21, 2004 11:38PM
December 21, 2004 11:45PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.