Thursday, 26 October 2006

Pure PHP driver FAQ: Asking Georg Richter

Within hours of yesterday's blog on a pure PHP driver, Georg Richter had been on the German PHP IRC channel as well as on efnet IRC. Georg wrote an FAQ in German.

"For MySQL's PHP team (Ulf Wendel, Andrey Hristov and myself), the plan to publish a new library under the PHP license in March 2007 is not only a challenge and a programming task, but also an opportunity to improve upon what we already have", Georg writes. "The new MySQL differentiation between Community and Enterprise gives us the possibility to speed up the implementation of features essential to PHP, without being as dependent on MySQL release cycles as before", he concludes his overview.

Then, Georg provides this FAQ, based on the "partly skeptical, partly enthusiastic" questions he got over IRC and email, as the maintainer of the mysql extensions:

Q: A new PHP driver -- is this yet another MySQL Extension for PHP?

A: No. When we talk about the "pure PHP driver", we refer to a new library that substitutes libmysql.

Q: libmysql is tested in detail, and stable since a long time. Why something new?

A: The libmysql API was developed primarily for C/C++. MySQL wants to keep it lean. MySQL supports many programming languages, that all differ in their properties and working methods, and this reflects itself as differing requirements on the API. It's impossible to get all of these onto one library. Besides technical arguments, there are also legal ones. There are incompatibilities between the GPL and the PHP license, as pointed out in the original blog.

Q: Will PDO and ext/mysql support the new library?

A: Initially, we will only support ext/mysqli. When we have a certain stability, we'll actively support the PDO developers. At any rate, we will take PDO into account already in the design phase, including the wishes of the PDO developers.

Q: So what are the advantages for the developer? What candy will we get?

A: There will absolutely be advantages. Personally, I am looking for a clear performance boost, which our first tests have already indicated. Other advantages are less memory usage and leaner code. On top of that, we plan new functions, like client side query caching. But these are still only in the design phase.

Q: And what are the disadvantages?

A: With choice comes the need to decide between two solutions: The proven old one, and the new one, that will surely need some maturing time. Also, it will to begin with not be possible to use the embedded server with the new library.


  1. [...] If you’re following MySQL or PHP landscape you should have seen announcement by MySQL to develop pure PHP driver. If not - Here is FAQ . [...]

  2. [...] Over the technical advantages theres is a licensing one. MySQL is rely on the GPL license which is not compatible with the PHP license, using libmysql with PHP needs the FLOSS exception, but mysqlnd is licensed under the PHP license so this no more a problem (check the mysqlnd FAQ). [...]