Bug #5136 Geometry objects corrupted when queried
Submitted: 21 Aug 2004 4:12 Modified: 23 Sep 2004 12:42
Reporter: Peter Yuill Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S1 (Critical)
Version:3.0.14 OS:Windows (Windows XP)
Assigned to: Alexey Botchkov CPU Architecture:Any

[21 Aug 2004 4:12] Peter Yuill
Description:
Observed with server 4.1.3.

Geometry objects returned by a client query and then used as a PreparedStatement parameter end up with corrupted coordinate values.

The problem was fixed in 3.1.3, but the current 3.1 source snapshot (20040820) shows the same problem.

How to repeat:
See attached test case.
[21 Aug 2004 4:14] Peter Yuill
Test case to reproduce bug

Attachment: GeometryBugReport.java (application/octet-stream, text), 1.85 KiB.

[31 Aug 2004 1:15] Mark Matthews
I've tested this both against 4.1.3b on Windows and against 4.1.4 on Linux and can't repeat this bug.

Is there something else I should be testing?
[31 Aug 2004 2:12] Mark Matthews
I now see how you _might_ get corruption. The server is returning the _binary_ geometry as plain 'string' types (varchar/char) in the character set of the database (in my case 'latin1'), which is incorrect, because it will go through character conversion in most clients.

The correct behavior would be to return this either in the _binary_ character set, or return it as a BLOB.
[31 Aug 2004 2:13] Mark Matthews
I've re-assigned this to the developer responsible for server-side implementation of GIS functionality.
[23 Sep 2004 12:42] Alexey Botchkov
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/