Bug #9399 Commenting/Decommenting code ignored by script parser
Submitted: 25 Mar 2005 7:22 Modified: 22 Sep 2005 12:23
Reporter: Emanuele Dolis Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Query Browser Severity:S2 (Serious)
Version:1.1.6 OS:Windows (Windows XP SP2)
Assigned to: Mike Lischke CPU Architecture:Any

[25 Mar 2005 7:22] Emanuele Dolis
Description:
Sorry if I repost it, but the original bug report (#9024) was asking feedback I did last 8 March, but it's still there hanging...
I try to summarize the issue:

If you have a script, with several row, and you embed it into a comment, when you run the script, the commented code is still executed - and it should not.

See also detailed report in bug #9024.

Sorry again for reposting but, really, this bug implies that you cannot use scripts with version 1.1.6

Thanks  again for your patience
Emanuele
 

How to repeat:
a) open sript window
b) paste what follows:
 #************************************************************
# some comment

#/*      line ALFA
DROP TABLE IF EXISTS  matrixas400.mCdTCA;

CREATE  TABLE matrixas400.mCdTCA (
TRTCA CHAR(2) NOT NULL PRIMARY KEY,
DxTCA VARCHAR(40)                       
)ENGINE=InnoDB;

LOAD DATA LOCAL INFILE 'Z:\rrrr.txt'        #\\Datatrans\
INTO TABLE matrixas400.mCdTCA
FIELDS TERMINATED BY '\t' ESCAPED BY '' #ENCLOSED BY '"'
LINES TERMINATED BY '\r\n';
 */
c) run the script. An error "file not found" of course is found at some line inside the block
(that's a correct behaviour: the code is parsed, highlighted and run).
d) now remove the # in line ALFA, the code now looks like
 #************************************************************
# some comment

/*      line ALFA
DROP TABLE IF EXISTS  matrixas400.mCdTCA;

CREATE  TABLE matrixas400.mCdTCA (
TRTCA CHAR(2) NOT NULL PRIMARY KEY,
DxTCA VARCHAR(40)                       
)ENGINE=InnoDB;

LOAD DATA LOCAL INFILE 'Z:\rrrr.txt'        #\\Datatrans\
INTO TABLE matrixas400.mCdTCA
FIELDS TERMINATED BY '\t' ESCAPED BY '' #ENCLOSED BY '"'
LINES TERMINATED BY '\r\n';
 */
and is grayed, in fact it' expected to be grayed (BUT the blue dots stay in
place!)
e) run again the script - the expecting behaviour is a 'nothing to do' run
istead you get again the error and (uh!) the grayed line is marked with blue...
f) save the script
g) reopen the script
h) run the script - now everything works fine...
[25 Mar 2005 16:13] Jorge del Conde
Thanks for your bug report
[22 Sep 2005 12:23] Mike Lischke
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html