WRT bug 454020 MySQL PDO driver is only enabled in php:5.5, when both pdo and mysql USE flags are enabled. But mysql USE flag also forces the depricated mysql_* functions to get compiled in (php-5.5.0_beta3.ebuild, lines 457 and 488). Building in the old functions (I think) is wanted for most users, so it's good it's the default. But there should be an option to opt out. Say, a "no-deprec-mysql" USE flag, or separate pdo_mysql USE flag. Reproducible: Didn't try
Why should there be one? It is non-trivial to do this, and the gain is next to zero. If you can come up with a good reason, fine. If not, it will be closed as WONTFIX.
Why would be non-trivial? It's already working in the php:5.4 ebuilds. The $(use_with mysql mysql $mysqllib) expression would need an extra conditional on line 456, or the $(use_with mysql pdo-mysql ${mysqllib}) expression could use a different use flag than mysql. The main problem is, we have a *lot* of old code, which uses the old mysql_* functions. One part of the codes are written by us, the other part is written by a third party, abandoned, and we maintain them. We will not able to move all the code from mysql_* to mysqli/pdo/dbal/orm/whatever, so there are projects where the new code is using PDO, and the old code is using mysql_* (same application). We wrote the mysql_* functions in PHP a way which handles the PDO object, so mysql_query and the others are using the connection which PDO made. If the mysql_* functions are there, we cannot overwrite them (without the APD PECL extension), so we would need to connect twice to the database (one with PDO, one with mysql_connect()), which we would like to avoid. Worst case I can use an overlay for this change, but I'm doubt we are alone with this issue.
(In reply to comment #2) > Why would be non-trivial? It's already working in the php:5.4 ebuilds. > It is working because you can do mysqlnd pdo. Now you can use libmysqlclient pdo to achieve the same. But mysqlnd + pdo only is now not possible, just as libmysqlclient + pdo was not possible before. > The $(use_with mysql mysql $mysqllib) expression would need an extra > conditional on line 456, or the $(use_with mysql pdo-mysql ${mysqllib}) > expression could use a different use flag than mysql. This is definately not worth an additional USE flag. That would only cause major confusion for the users. > The main problem is, we have a *lot* of old code, which uses the old mysql_* > functions. One part of the codes are written by us, the other part is > written by a third party, abandoned, and we maintain them. We will not able > to move all the code from mysql_* to mysqli/pdo/dbal/orm/whatever, so there > are projects where the new code is using PDO, and the old code is using > mysql_* (same application). We wrote the mysql_* functions in PHP a way > which handles the PDO object, so mysql_query and the others are using the > connection which PDO made. If the mysql_* functions are there, we cannot > overwrite them (without the APD PECL extension), so we would need to connect > twice to the database (one with PDO, one with mysql_connect()), which we > would like to avoid. That is a horrible way of dealing with that issue (which is really a non-issue in terms of scalability, but that is another discussion) > Worst case I can use an overlay for this change, but I'm doubt we are alone > with this issue. I am quite sure there are not many of you :p So yes. Please do this in an overlay if you must.