php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67186 PHP 5.6.0beta2 fails to compile when compiling mysqli extension with libmysql
Submitted: 2014-05-03 07:13 UTC Modified: 2014-12-30 10:42 UTC
From: andy at webtatic dot com Assigned: mysql (profile)
Status: No Feedback Package: MySQLi related
PHP Version: 5.6.0beta2 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
3 + 4 = ?
Subscribe to this entry?

 
 [2014-05-03 07:13 UTC] andy at webtatic dot com
Description:
------------
Due to the way the new fetching mode for mysqlnd was added, it fails to compile the extension with libmysql.

The reason is because of a typo in the non-mysqlnd constant definition

#define MYSQLI_STORE_RESULT_OFS	0

This should be

#define MYSQLI_STORE_RESULT_COPY_DATA 0

The constant is used outside of a #ifdef MYSQLI_USE_MYSQLN, and setting it to 0 appears to be the correct way to use it from looking at how MYSQLI_ASYNC works

Test script:
---------------
./configure --with-mysqli=shared,/usr/lib64/mysql/mysql_config
make

Expected result:
----------------
Successful compilation

Actual result:
--------------
ext/mysqli/mysqli_nonapi.c: In function 'zif_mysqli_query':
ext/mysqli/mysqli_nonapi.c:578: error: 'MYSQLI_STORE_RESULT_COPY_DATA' undeclared (first use in this function)
ext/mysqli/mysqli_nonapi.c:578: error: (Each undeclared identifier is reported only once
ext/mysqli/mysqli_nonapi.c:578: error: for each function it appears in.)

Patches

php-5.6.0beta-mysqlicopy.patch (last revision 2014-05-03 07:13 UTC by andy at webtatic dot com)

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-05-03 07:31 UTC] andy at webtatic dot com
I see someone has already implemented a fix (although more complex solution that doesn't match the way MYSQLI_ASYNC is done)

https://github.com/php/php-src/commit/06a03bbfa60bedb3f30bb2908449fc30d54f848e
 [2014-05-05 17:55 UTC] aharvey@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: mysql
 [2014-05-05 17:55 UTC] aharvey@php.net
In theory, my commit (linked above) should fix this, but as Andy says, there may be a simpler solution.

Friendly people of the MySQL team, what would you prefer? I was aiming to match the other places MYSQLI_STORE_RESULT_COPY_DATA was used, but if #define 0 is an option, that might be cleaner.
 [2014-05-05 19:07 UTC] andy at webtatic dot com
I think in the very least one of the following is done

1) Removing the MYSQLI_STORE_RESULT_OFS constant (which it being a typo, isn't used), and implementing the ALIAS constant the same way Alex changed the COPY_DATA one

or

2) Replacing the change with my solution

Otherwise, having two competing implementations of both constants may be confusing.
 [2014-05-05 19:10 UTC] andy at webtatic dot com
Sorry I mean Adam not Alex :)
 [2014-05-06 10:16 UTC] andrey@php.net
Could you try trunk or 5.6 head?

Andrey
 [2014-05-13 15:47 UTC] tyrael@php.net
-Status: Assigned +Status: Feedback
 [2014-12-30 10:42 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Dec 10 10:04:15 2022 UTC