5 messages in com.mysql.lists.javaRe: Spooky stuff. Driver returns noth...| From | Sent On | Attachments |
|---|---|---|
| Wael Chatila | 15 Jan 2006 17:20 | |
| Mark Matthews | 15 Jan 2006 19:40 | |
| Will Glass-Husain | 15 Jan 2006 20:20 | |
| Wael Chatila | 15 Jan 2006 22:45 | |
| Mark Matthews | 16 Jan 2006 06:28 |
| Subject: | Re: Spooky stuff. Driver returns nothing on certain system![]() |
|---|---|
| From: | Wael Chatila (chat...@dslextreme.com) |
| Date: | 01/15/2006 10:45:52 PM |
| List: | com.mysql.lists.java |
Hi Mark,
We tried adding useServerPrepStmts=false, worked. Much thanks for your response.
best Wael
Mark Matthews wrote:
Wael Chatila wrote:
Hi Everyone,
We are experiencing some weird thing on one our systems and we are wondering if someone here has seen something similar or know the cause or a solution.
We are using hibernate to return generate the following query, used inside a webapp.
---------- select this.property_id as property1_7_, this.property_name as
[snip]
* The problem we are experiencing is that the query doesnt return any tuples when running inside java when running on a debian 2.4.25.040525e with mysql server version 4.1.11-Debian_4sarge2-log. We have tried the following two connectors: mysql-connector-java-3.1.12-bin.jar, mysql-connector-java-3.1.8-bin.jar
* But when we run it on the mysql prompt on the above machine it returns the correct number of tuples.
* we have tried running the above query inside a small java program (without hibernate) using the JDBC api straight in order to isolate the problem, (see small program at the end). But with the same result, no tuples returned. Which suggests that the problem is somewhere between JDBC and the server
Wael,
The binary that Debian ships has been consistently broken with regards to prepared statements. There are multiple bugs filed in their bug tracker by various Debian users.
Your options are (1) Disable server-side prepared statement usage by the JDBC driver by adding 'useServerPrepStmts=false' to your URL, (2) Use a MySQL "official" binary, or (3) Don't run Debian until their binary is fixed.
-Mark




