[Phpmyadmin-devel] Bugs #461192 & 463683 and 2.2.1 release and bug
Loïc
loic-div at ifrance.com
Tue Sep 25 08:13:02 CEST 2001
Hi List!
I've done some investigations on bugs #461192 and
#463683 and my conclusion is we need a powerfull
parser for "SELECT" queries.
I mean that to fix these bugs and some other ones
that can't be long to be submitted it requires :
1) To be able to get "true" db and table names, even
if aliases are used in the query (and then
mysql_fetch_field is not enough) because we need
these "true" names to modify/delete a record, for
example.
2) To be able to split the sql query in convenient parts
ie:
- what is before the "FROM" (is there a "DISTINCT"
clause, is the COUNT function used...),
- what is in the "FROM" part of the query (is it a query
with a "JOIN" clause or not...)
- and what are the different clauses after the "FROM"
part of the query.
All this is necessary to achieve the first point (get the
"true" db and table names) and to know the number
of record returned by the query without the program-
matically appended "LIMIT" clause.
3) To distinguish the true different clauses keywords from
the same words used as backquoted db/table/fields
names or as fields values. I mean for example to take
into account only the second " FROM " in the query:
SELECT `my from field`
FROM my_table
WHERE `my from field` = 'annoying from in string'
4) To take care of in-line comments and of the "/*!..*/"
MySQL syntax: the former should be skipped from
the query while parsing it, the latter should be taken
into account depending on the MySQL version.
For exemple whith the query:
SELECT `my_field`
FROM my_table
/*!32340 WHERE `my_field` = 'something' */
may or may not have a where clause depending on
the MySQL version and then the total number of
rows depends also on the MySQL version.
As you may have understand this is a huge work and
I don't have enough free time to work on it now.
Does anyone of you can work on this?
BTW I wonder if we should not release the 2.2.1
version as soon as possible because many bugs have
already been fixed since 2.2.0.
Loïc
______________________________________________________________________________
ifrance.com, l'email gratuit le plus complet de l'Internet !
vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
http://www.ifrance.com/_reloc/email.emailif
More information about the Developers
mailing list