Re: MySQLi Compat question
| From: | John Coggeshall | Date: | Mon, 09 Jun 2003 23:37:02 +0000 |
| Subject: | Re: MySQLi Compat question | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17230@lists.php.net to get a copy of this message | ||
On Mon, 2003-06-09 at 18:50, Rasmus Lerdorf wrote:
Are you suggesting that there be a single ext/mysql which has
mysql_connect() as well as mysqli_connect()? I ask because I know what
your describing in terms of the end result, but I'm not clear on how it
would be implemented..
I guess you could "merge" ext/mysql and ext/mysqli into a single
extension, but then you've got half the mysql functions which require a
link parameter, half which don't.. I'm a bit tired right now, but that
by itself seems more confusing than having two separate extensions for
the two versions. Instead of getting 500 "Which MySQL extension should I
use?" it seems you'd get "Which connect() function do I use??" and "Why
can't I use mysql_connect()? I'm running 4.1..." among others. Or is
there a clean implementation I don't see?
Does the old 3.x client play nicely with 4.1 servers? I haven't tested
that. Even if it doesn't that only temporarily mask the license issue?
Eventually, it'd be really nice to be able to take advantage of 4.1+
things in PHP and if that's the case now seems like an ideal time to
address it.
- John
On Mon, 2003-06-09 at 18:50, Rasmus Lerdorf wrote:
> I would really prefer to see a single MySQL extension that spoke both
v3
> and v4. I think the cleanest and easiest way would be to make
ext/mysqli
> backward compatible with the v3 API and at the same time make it
forward
> compatible with the V4 API. Ultimately for the end user this is the
most
> flexible. If they have code (and just about everyone does) written
> against the current /ext/mysql functions, it should "just work"
without
> them having to mess with anything. But if they want to write code
against
> the V4 API and they have compiled in the v4 client library, then that
> should work as well. I don't feel like answering the "Which MySQL
> extension should I use?" question 500 times a month.
>
> So, the above was the practical user-experience focused view of this.
Now
> for the much uglier license view. Given the fact that all new v3 and
v4
> mysql client libraries are under the GPL with an special exception for
> OSI-licensed open source projects, it would be extremely useful if our
> standard MySQL extension could be built against the older non-GPL'ed
> client libraries.
>
> -Rasmus
>
> On Mon, 9 Jun 2003, John Coggeshall wrote:
>
> > On Mon, 2003-06-09 at 14:32, George Schlossnagle wrote:
> > > I'm in general for this sort of thing (perhaps a new Compat
toplevel
> > > 'namespace'). But have the license issues been worked out with
mysqli
> > > yet? Last I check it was on the verge of being de-bundled.
> >
> > I know nothing of that, actually :)
> >
> > > Also (since this mail is clearly stream-of-consciousness), how
about
> > > juts adding the compat functions into the mysqli extension itself
and
> > > adding a --mysqli-enable-compat flag or some such.
> >
> > Sure, it could be done at the C level but one of the big
"improvements"
> > of the mysqli extension was that it more closely reflected the true
> > MySQL API (that's what was explained to me). Since one of the clear
> > goals of mysqli was to eliminate these "magical" non-api PHP
functions,
> > it seems more reasonable to just have the solution be in user-space
> > instead of starting down the road of aliases and non-api calls again
> > (although mysqli does still have a few non-api PHP functions still
--
> > look in mysqli_nonapi.c).
> >
> > Assuming mysqli is going to become the standard for database access
in
> > PHP5/the future, my motivation for this proposal is simply to
provide a
> > bridge for the mysql->mysqli transition. This layer allows someone
> > basically to pull PHP5 out of the box, compile it using the latest
and
> > greatest extension and provide a clean *temporary* backward
> > compatibility until they can upgrade their code to use "native"
mysqli
> > calls. They can just stick the include file in their auto_include
and
> > their up and running, without adding a lot of unnecessary magic to
the
> > extension itself.
> >
> > John
> >
> > > On Monday, June 9, 2003, at 12:07 PM, John Coggeshall wrote:
> > >
> > > >
> > > > Hello all.
> > > >
> > > > Sterling directed me toward these parts regarding a MySQL/MySQLi
> > > > compatibility layer [*] I've been doing some work on. Basically,
the
> > > > purpose is to eliminate the need to have two separate extensions
> > > > installed (both mysql and mysqli) by implementing in the mysql
> > > > extension
> > > > functionality as user-space functions which are based in mysqli.
> > > >
> > > > I've had good success on my own systems with this script, and
thought
> > > > that it might be something that might be extremely useful for
inclusion
> > > > when PHP5 rolls out the door. I've got most of the functionality
> > > > implemented and would implement the remaining handful of
functions,
> > > > etc.If there's interest.
> > > >
> > > > (I am not on this list so please CC me)
> > > >
> > > > John
> > > >
> > > > [*] �ykìÃs²
> > > > ´fæ/ j™Žhttp://www.coggeshall.org/downloads/mysql2mysqli.tar.gz
> > > >
> > > >
> > > > --
> > > >
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> > > > John Coggeshall
> > > > john at coggeshall dot org
http://www.coggeshall.org/
> > > >
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> > > >
> > > > --
> > > > PEAR Development Mailing List (http://pear.php.net/)
> > > > To unsubscribe, visit:
> > > > http://www.php.net/unsub.php
> > > >
> > > >
> > > -- George Schlossnagle
> > > -- Principal Consultant
> > > -- OmniTI Computer Consulting, Inc.
> > > -- +1.410.872.4910 x202
> > > -- 1024D/1100A5A0 1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100
A5A0
> > >
> > --
> >
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> > John Coggeshall
> > john at coggeshall dot org
http://www.coggeshall.org/
> >
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
> >
> > --
> > PEAR Development Mailing List (http://pear.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
--
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-
John Coggeshall
john at coggeshall dot org http://www.coggeshall.org/
-~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~--~=~-