On Nov 13, 2012, at 18:28, Arvids Godjuks <arvids.godj...@gmail.com> wrote:
> It took me like 10 minutes of "Search & Replace" in my IDE to make a switch 
> to mysqli and a few more hours to validate that everything is ok and catch 
> places where search & replace failed. The amount of work is overestimated, 
> especially if you have a regexp capable search & replace.

That's not enough in many cases: A key property of ext/MySQL is that you have 
this "default connection" so users don't have to pass a connection handle. 
Adding that in a sane way can quickly become non-trivial.

A help there exists, though: Chris posted the link to the oracle wiki which has 
a link to some script we in the MySQL company wrote (actually that was done 
before I joined) which tries to convert ext/mysql based applications to mysqli 
whole trying to catch more edge cases.


> Not being able to migrate to mysqli in a few days is a sign of project messed 
> up so badly, that just upgrading your PHP should break it every time, and you 
> are probably better off rewriting the whole thing. Or just freeze the PHP 
> version you are using and let it live until you are able to rewrite it.

Actually PHP has a quite good BC story. Yes, sometimes we break thing (on 
purpose or accident) but in 90% of the cases easy workaround a exist (I.e. 
emulating register_globals is quite easy). So users can migrate their "crappy" 
code from version to version and be happy. Swapping out database access in a 
mixture of PHP, HTML and SQL is way harder.


> Unfortunately people need a kick in the nuts to start to act. And that old 
> project argument is exactly from the people that need that kick in the first 
> place.

I agree, docs and these things aren't enough. E_DEPRECATED is our tool for this.

> I don't even wana start about using a VPS/virtualization and compiling the 
> damn thing --with-mysql and being happy that you don't have to do anything to 
> keep it running.

Well, you still need --with-mysqli (or --with-pdo-mysql) which is even more to 
type ;)

johannes
-- 
Johannes Schlüter, MySQL Connectors Team, ORACLE Corporation
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to