Bug #17940 | the parameters are not processed properly | ||
---|---|---|---|
Submitted: | 5 Mar 2006 17:03 | Modified: | 8 May 2006 7:12 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 3.1.12 | OS: | Linux (Mandriva Linux release 2006.0) |
Assigned to: | CPU Architecture: | Any |
[5 Mar 2006 17:03]
[ name withheld ]
[5 Mar 2006 17:04]
[ name withheld ]
MySQL test
Attachment: mytest.java (text/x-java), 4.39 KiB.
[5 Mar 2006 17:08]
[ name withheld ]
Test log: Mar 5, 2006 6:05:41 PM mytest.mytest runTest INFO: select * from testdata returned 1 rows Mar 5, 2006 6:05:41 PM mytest.mytest runTest INFO: select * from testdata where ? between a and b returned 0 rows Mar 5, 2006 6:05:41 PM mytest.mytest runTest INFO: select * from testdata where '2006-03-03' between a and b returned 1 rows Mar 5, 2006 6:05:41 PM mytest.mytest runTest SEVERE: TEST FAILED
[10 Mar 2006 10:45]
Sveta Smirnova
I tested it on WinXP with MySQL 4.0.18 and 4.1.18, JDK 1.5.0 and 1.4.0 and Connector-J 1.3.12; also on Solaris 10 with MySQL 4.0.15, JDK 1.5.0_01 and Connector-J 1.3.12. All work fine. Also return value of pstmt.toString() (in place where PreparedStatement marked as "BUG") is correct SQL query in all these cases.
[10 Mar 2006 10:47]
Sveta Smirnova
Is interesting which verion of Java uses name withheld.
[10 Mar 2006 10:54]
Valeriy Kravchuk
Thank you for the detailed problem report. Please, specify the exact JRE version used, as Sveta asked already.
[10 Mar 2006 11:50]
[ name withheld ]
./java -version java version "1.4.2_08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03) Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)
[8 May 2006 7:12]
Tonci Grgin
Hi Uros. Thanks for complete problem report. I was unable to repeat the error you get: run: 2006.05.08 09:03:52 test17948.mytest runTest INFO: select * from testdata returned 1 rows 2006.05.08 09:03:52 test17948.mytest runTest INFO: select * from testdata where ? between a and b returned 1 rows 2006.05.08 09:03:52 test17948.mytest runTest INFO: select * from testdata where '2006-03-03' between a and b returned 1 rows BUILD SUCCESSFUL (total time: 1 second) Environment: mysql-connector-java-3-1-12 JDK 1.6 MySQL server 4.1.13 on Linux I presume that upgrading JDK will solve the problem.