Bug #11785 | mysqltest, wrong detection of comments starting with '--' | ||
---|---|---|---|
Submitted: | 6 Jul 2005 21:40 | Modified: | 1 Sep 2005 19:19 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Command-line Clients | Severity: | S3 (Non-critical) |
Version: | 4.1 | OS: | |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[6 Jul 2005 21:40]
Matthias Leich
[6 Jul 2005 21:42]
Matthias Leich
testcase
Attachment: ml032.test (application/test, text), 338 bytes.
[16 Aug 2005 15:23]
Magnus Blåudd
Normally a command in a mysqltest test file is ended by a ; (or the characters set using the "delimiter" command). Ex: delimiter stop; echo teststop In addition to this a comment started with "--" may contain a valid query as the first word after the comment start. Thus it's always checked to see if that is the case. The advantage with this approach is to be able to execute commands terminated by new line '\n' regardless how many "delimiter" it contain. Where "delimiter" can be set by using the delimiter keyword. Ex: --delimiter stop echo test3stop --delimiter ; echo test4; Ex: enable_query_log; is equal to the command --enable_query_log or -- enable_query_log Remember that this is the syntax we use to for the _mysqltest_ program.
[23 Aug 2005 13:42]
Magnus Blåudd
I expect this problem to be fixed "well enough" by my patch for bug#11316. I have tested with the ml032.test file and it will point out line 13 as the offending line. I have also changed the error message to say " Stray 'end' command - end of block before beginning". Hope this will be enough, at least it point's out the correct line. If there are any opther cases with strange error messages(or you think it's still strange) please let me know.
[24 Aug 2005 8:23]
Sergei Golubchik
same reviewer as in bug#11316
[31 Aug 2005 15:18]
Magnus Blåudd
Will be fixed by the patch for bug#11316
[1 Sep 2005 19:19]
Paul DuBois
No changelog entry needed.