Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 467324 - ebuild for dev-lang/php:5.5 should let disable mysql_* functions while enabling pdo mysql driver
Summary: ebuild for dev-lang/php:5.5 should let disable mysql_* functions while enabli...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-26 10:07 UTC by Zoltán Halassy
Modified: 2013-05-19 05:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zoltán Halassy 2013-04-26 10:07:25 UTC
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
Comment 1 Ole Markus With (RETIRED) gentoo-dev 2013-04-26 15:49:13 UTC
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.
Comment 2 Zoltán Halassy 2013-04-26 17:13:37 UTC
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.
Comment 3 Ole Markus With (RETIRED) gentoo-dev 2013-04-26 17:28:09 UTC
(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.