Bug #28469 | JDBC driver does not support comments in the beginning of sql statement | ||
---|---|---|---|
Submitted: | 16 May 2007 14:00 | Modified: | 18 Jul 2007 9:43 |
Reporter: | Ansis Svaza | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 3.1.14, 5.0.5, 5.1.0 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | comments, jdbc, metadata |
[16 May 2007 14:00]
Ansis Svaza
[16 May 2007 19:53]
Mark Matthews
Sounds like a duplicate of BUG#27400 (fixed in 5.0.6 which has already been released).
[16 May 2007 19:53]
Mark Matthews
Sorry, not a duplicate, slightly different.
[16 May 2007 21:33]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/26881
[17 May 2007 5:44]
Ansis Svaza
Implementation for comments in the beginning of sql statement
Attachment: StringUtils.java (text/java), 43.01 KiB.
[17 May 2007 5:45]
Ansis Svaza
Test code for bugfix
Attachment: TestComments.java (text/java), 1.37 KiB.
[17 May 2007 6:15]
Tonci Grgin
Ansis, thanks for your report and patch provided but, as you can see, Mark has already wrote one.
[17 May 2007 7:01]
Ansis Svaza
Since there is a working driver it is OK for me. :) My implementation of StringUtils.getOffset() could be more correct on comments skipping than Statement.findStartOfStatement() except handling not-finished comments. My implementation will return end of statement as result, but Mark's one - beginning. In both cases statement is incorrect.
[17 May 2007 15:37]
Mark Matthews
My thinking was rather than put a full-fledged SQL parser in the driver, we'll let the server deal with the eventual syntax error that will result from a non-terminated comment.
[18 Jul 2007 9:43]
MC Brown
This has been documented in the 5.0.7 changelog: PreparedStatement.getMetaData() for statements containing leading one-line comments is not returned correctly. As part of this fix, we also overhauled detection of DML for executeQuery() and SELECTs for executeUpdate() in plain and prepared statements to be aware of the same types of comments.
[29 Aug 2007 17:56]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/33375
[6 Sep 2007 15:13]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/33832
[7 Sep 2007 14:03]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/33909
[3 Oct 2007 16:41]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/34839
[3 Oct 2007 16:46]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/34840
[3 Oct 2007 18:59]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/34855
[5 Oct 2007 18:53]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/35011
[11 Oct 2007 20:10]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/35407
[11 Oct 2007 20:24]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/35410
[11 Oct 2007 20:52]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/35414
[19 Nov 2007 0:56]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/38019
[19 Nov 2007 2:51]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/38024