-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Wultsch wrote:
> On Sun, Apr 5, 2009 at 1:10 PM, Francesco Riosa <[email protected]> 
> wrote:
>>> IIRC: Recent version of phpMyAdmin (such as the 3 series which
>>> requires MySQL 5.0 or greater) makes significant use of the IS, though
>>> I have little doubt that show commands are still in code.
>> mmh not exactly:
>> phpMyAdmin-3.1.2.0 (2009-01-19)
>> `grep -r SHOW` give still 60 php files with SHOW <something>
>>
> 
> Or exactly. I wrote that I had little doubt that the show commands
> were still in use. I think at least some of the SHOW commands are fall
> back for supposedly unsupported pre 5.0 myqsl servers.
> 
> OT: Assuming IS does not change significantly from what already exists
> in the 5.0 server I imagine the phpMyAdmin team will have little
> difficultly making their code work with both. I know very few devs
> that use the command line client so I think that if Drizzle does not
> break existing tools it will make adoption much easier. There will be
> some incompatibilities (data types, etc) but that would probably be
> not difficult to work around.

There are two main things which are important here, both of which I feel
are critically important and of equal weight:

1) Maintaining an easy-to-user interface for the user

2) Reducing the complexity of the parser

For #1, it is important to keep the SHOW commands as *shortcuts* to the
equivalent but more verbose SELECT ... FROM I_S command.

For #2, the problem can be solved using a simple aliasing functionality.
 For example, s/SHOW (DATABASES|SCHEMAS)/SELECT SCHEMA_NAME FROM
INFORMATION_SCHEMA.SCHEMATA/i

I agree with the previous assessments that relying on existing web
applications to change from SHOW to the equivalent I_S statement is
unrealistic and impairs the growth and uptake of Drizzle.  Therefore, it
seems that a solution which involves libdrizzle (the underlying client
connection library) is necessary.  Without support for aliasing in
libdrizzle, we must rely on application developers to change from the
traditional SHOW commands themselves, which is not feasible IMHO.

Luckily, libdrizzle is designed to be quite modular.  I would be in
favor of adding a regex-replacement facility to libdrizzle which would
supply a simple hash table of built-in SHOW -> I_S replacements.  This
would allow us to remove the large part of the parser which deals with
SHOW commands, and have the command be rewritten into a standard SELECT
within libdrizzle.

Ramifications of this would be that PCRE would be a required dependency
for libdrizzle.  I find this requirement to be fairly small, since PCRE
is already a requirement for both the client tools and the server.  If
made a modular functionality, we could of course make PCRE a dependency
only if the aliasing module for libdrizzle is built.  This would mean
that developers wishing to use libdrizzle in the smallest, lightest way
possible could build libdrizzle without the PCRE dependency.

I would be happy to take on this task after the cirrus milestone as I am
already familiar with PCRE coding (it's used in the temporal datetime
format matching...)

- -jay
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknZ33oACgkQ2upbWsB4UtEuCQCff8dOy1Zwl2d1QhwkXuFXxow0
UnUAn0JmaZjHkOuoyEdhEKL8m8AH1QFR
=mJ1Q
-----END PGP SIGNATURE-----

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to