Bug #30215 | Connector\J and MySQL command-line utility treat "---" (3-dashes) differently | ||
---|---|---|---|
Submitted: | 2 Aug 2007 22:45 | Modified: | 3 Oct 2007 16:56 |
Reporter: | Christopher Schultz | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 5.0.4 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[2 Aug 2007 22:45]
Christopher Schultz
[2 Aug 2007 22:47]
Christopher Schultz
Test file that demonstrates the behavior of the JDBC driver.
Attachment: CommentTest.java (application/octet-stream, text), 2.42 KiB.
[3 Aug 2007 9:04]
Tonci Grgin
Hi Christopher and thanks for another bug report. Verified as described with test case attached: - MySQL 5.0.48 on WinXP Pro SP2 - JDK 1.5.0_11 and latest c/J 5.0 sources Apparently, the value of column "num" is -1... .Loading JDBC driver 'com.mysql.jdbc.Driver' Done. Done. Connected to 5.0.48-pb1030-log F Time: 2,266 There was 1 failure: 1) testbug30215(testsuite.simple.TestBug30215)junit.framework.ComparisonFailure: expected:<-...> but was:<...>
[3 Aug 2007 9:06]
Tonci Grgin
Test case on latest c/J 5.0 sources
Attachment: TestBug30215.java (text/x-java), 1.15 KiB.
[3 Aug 2007 13:51]
Christopher Schultz
Thanks for the quick turnaround on this bug. I'm not entirely sure what the resolution should be. On the one hand, the MySQL command-line behavior is very nice in this particular case. On the other hand, the documentation makes a compelling case against treating all "--" as comment-until-newline indicators. Someone also pointed out to me that even treating "\n--" as a comment-until-newline indicator might not work inside of a literal string. I'm not sure how sensitive the query parser is to string literals, but as long as those could be ignored, then I would vote for treating all non-literal "\n--" strings as comment-until-newline indicators. Thanks!
[3 Oct 2007 16:56]
Mark Matthews
Duplicate of Bug#26215.