[Phpmyadmin-devel] removing remarks is useless

Benjamin Gandon gandon at isia.cma.fr
Tue Aug 7 15:38:12 CEST 2001


> > - lib.inc.php3: the function remove_remarks() is bugged because
> >   if a string contains a '#' in a string, it is considered as a
> >   comment. As stated in bug #444279.
> > 
> > I already said that comments need not being stripped off queries.
> > Mysql works just fine if you give it all the comments. No need
> > removing them (as is was in my 2.1.0.1 version).
> 
> do you know if there are old MySQL versions that would not like
> comments?

Well... I don't know. I just think that parsing scheme sould have been 
designed to accept comments in queries for a while or else every client 
would have to include a query parser to remove comments, which is not 
really acceptable. One parser is enough.

In version 2.1.0 from Tobias, removal of comments was all but very 
smart :
    $sql = ereg_replace("#[^\n]*\n", "", $sql);

In fact I think Tobias had just thought it would speed up the SQL 
query when adding this small feature. ChangeLog doesn't say 
anything about a bug involving comments in queries...


	Benjamin



PS: if you want to see original 2.1.0 sources, go to 
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/phpnextadmin/phpMyAdmin/
:)))




More information about the Developers mailing list