summaryrefslogtreecommitdiff
path: root/ext/mysqli
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos in fetch_all error messageKamil Tekiela2021-03-283-4/+3
|
* Update mysqli stub hashMáté Kocsis2021-03-181-1/+1
|
* Deprecate OO style mysqli::get_client_info methodDharman2021-03-175-4/+40
| | | | | | Deprecate passing connection object to mysqli_get_client_info() Closes GH-6777.
* Change the default error mode of mysqliDharman2021-03-153-2/+4
| | | | | | | | | | Make MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT the new mysqli error reporting default. Explicitly call mysqli_report(MYSQLI_REPORT_OFF) to preserve previous behavior. RFC: https://wiki.php.net/rfc/mysqli_default_errmode Closes GH-6629.
* Merge branch 'PHP-8.0'Nikita Popov2021-03-151-0/+38
|\ | | | | | | | | * PHP-8.0: Fix bug #80837
| * Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-03-151-0/+38
| |\ | | | | | | | | | | | | * PHP-7.4: Fix bug #80837
| | * Fix bug #80837Dharman2021-03-151-0/+38
| | | | | | | | | | | | The error needs to be reported on the statement, not the connection.
* | | Use typed properties in ext/mysqliMáté Kocsis2021-03-158-290/+201
| | | | | | | | | | | | Closes GH-6739
* | | Add CLEAN sections to mysqli and PDO mysql testsDharman2021-03-159-16/+57
| | | | | | | | | | | | Closes GH-6756.
* | | Deprecate mysqli driver_version propertyDharman2021-03-153-6/+3
| | | | | | | | | | | | | | | The driver version hasn't been updated in 13 years, so this number is essentially meaningless. Check PHP_VERSION_ID instead.
* | | Remove dead mysqli_driver_construct() functionNikita Popov2021-03-151-12/+0
| | | | | | | | | | | | | | | This function was never registered with PHP, and the body is commented out.
* | | Clean up mysqli_driver test casesDharman2021-03-153-171/+170
| | | | | | | | | | | | | | | And remove an unnecessary test case that is already covered by the other two.
* | | Remove redundant macros in mysqli_driver implementationDharman2021-03-151-47/+21
| | | | | | | | | | | | | | | This class doesn't define many properties, and the macros make customization hard.
* | | Remove unused mysqli globalDharman2021-03-152-13/+8
| | | | | | | | | | | | And fix formatting issues.
* | | client_info is a constant and doesn't need a connectionDharman2021-03-153-12/+9
| | | | | | | | | | | | Closes GH-6767.
* | | Update mysqli tests to work with newer MySQL serverMax Semenik2021-03-044-23/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * @@session.old_passwords is present only in 5.6 and 5.7. Newer versions already behave as if they have old_passwords=2. * SET PASSWORD FOR ... = PASSWORD(...) syntax was removed in 8.0. For all affected tests, versions that don't support newer SQL are already explicitly excluded with version checks. Closes GH-6729.
* | | Add mechanism to skip the skipif cacheNikita Popov2021-03-044-0/+4
| | | | | | | | | | | | | | | | | | If the SKIPIF section return nocache, don't cache the result. This is used by tests that perform complex test set in conjunction with skip checks, and need to be evaluated every time.
* | | Explicitly print reference wrappers in debug_zval_dump()Nikita Popov2021-03-042-19/+51
| | | | | | | | | | | | Closes GH-6750.
* | | Fixed bug #80808Nikita Popov2021-03-022-2/+2
| | | | | | | | | | | | | | | | | | If the ZEROFILL flag is set for a field, do not convert it into an integer (text protocol) or convert it explicitly into a padded string (binary protocol).
* | | Change the order of properties used for var_dump(), serialize(), comparison, ↵Dmitry Stogov2021-03-011-6/+6
| | | | | | | | | | | | | | | | | | etc. Now properties are ordered according to their layout in zend_object structure.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-251-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: mysqlnd pam fix test error message
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-251-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: mysqlnd pam fix test error message
| | * mysqlnd pam fix test error messageDaniel Black2021-02-251-2/+2
| | | | | | | | | | | | Closes GH-6727.
* | | Fix #80329: Add option to specify LOAD DATA LOCAL white list folderDarek Slusarczyk2021-02-2316-11/+329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allow the user to specify a folder where files that can be sent via LOAD DATA LOCAL can exist * add mysqli.local_infile_directory for mysqli (ignored if mysqli.allow_local_infile is enabled) * add PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY for pdo_mysql (ignored if PDO::MYSQL_ATTR_LOCAL_INFILE is enabled) * add related tests * fixes for building with libmysql 8.x * small improvement in existing tests * update php.ini-[development|production] files Closes GH-6448. Co-authored-by: Nikita Popov <nikic@php.net>
* | | Generate class entries from stubs for ldap, libxml, mbstring and mysqliMáté Kocsis2021-02-164-78/+462
| | | | | | | | | | | | Closes GH-6684
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-151-6/+46
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #78680: mysqlnd pam plugin missing terminating null
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2021-02-151-6/+46
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #78680: mysqlnd pam plugin missing terminating null
| | * Fix #78680: mysqlnd pam plugin missing terminating nullDaniel Black2021-02-151-6/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PAM service requires the terminating null to be part of the communication. Tested with MariaDB-10.4(pam) and Percona Server 5.7.32(auth_pam_compat). Also changed MySQL Enterprise test to the server side plugin, authentication_pam as opposed to the client plugin mysql_clear_password. Add additional check for pamtest user and pam service file as all are required for the test. More importantly, test result should actually succeed. Thanks Geoff Montee for bug report. Closes GH-78680.
* | | Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-114-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This deprecates passing null to non-nullable scale arguments of internal functions, with the eventual goal of making the behavior consistent with userland functions, where null is never accepted for non-nullable arguments. This change is expected to cause quite a lot of fallout. In most cases, calling code should be adjusted to avoid passing null. In some cases, PHP should be adjusted to make some function arguments nullable. I have already fixed a number of functions before landing this, but feel free to file a bug if you encounter a function that doesn't accept null, but probably should. (The rule of thumb for this to be applicable is that the function must have special behavior for 0 or "", which is distinct from the natural behavior of the parameter.) RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg Closes GH-6475.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-02-103-22/+22
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Make mysqli_ssl_set() arguments nullable
| * | Make mysqli_ssl_set() arguments nullableNikita Popov2021-02-103-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | This function internally converts zero length arguments to NULL argument -- but we should also accept them in the first place. Null arguments being accepted was actually documented, before bug #78399 adjusted the docs to match current behavior.
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-051-3/+3
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-8.0: Fix test expectation for PHP 8.0 Use ST_Y() instead of the deprecated/removed Y() in test
| * | Fix test expectation for PHP 8.0Christoph M. Becker2021-02-051-1/+1
| | | | | | | | | | | | | | | Since float to string conversion is no longer locale dependent, we have to expect a dot as decimal separator.
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-051-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Use ST_Y() instead of the deprecated/removed Y() in test
| | * Use ST_Y() instead of the deprecated/removed Y() in testChristoph M. Becker2021-02-051-2/+2
| | |
* | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-051-0/+42
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix #74779: x() and y() truncating floats to integers
| * | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-051-0/+42
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: Fix #74779: x() and y() truncating floats to integers
| | * Fix #74779: x() and y() truncating floats to integersChristoph M. Becker2021-02-051-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | We must not use the locale dependent `atof()`, but instead use the (hopefully) locale independent `zend_strtod()`, when converting string representations of floating point numbers which are sent by the server. Closes GH-6665.
* | | Fix #80330: Replace language in APIs and source code/docsDarek Slusarczyk2021-01-252-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Rename MYSQLI_REFRESH_SLAVE to MYSQLI_REFRESH_REPLICA in line with upstream change in MySQL. The old name is retained for backwards-compatibility reasons, and may be deprecated/removed in the future. Closes GH-6632.
* | | Replace zend_bool uses with boolNikita Popov2021-01-158-40/+40
| | | | | | | | | | | | | | | | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* | | Print "interned" instead of fake refcount in debug_zval_dump()Nikita Popov2021-01-152-16/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | debug_zval_dump() currently prints refcount 1 for interned strings and arrays, which does not really reflect the truth. These values are not refcounted, so the refcount is misleading. Instead print an "interned" tag. Closes GH-6598.
* | | Make convert_to_*_ex simple aliases of convert_to_*Nikita Popov2021-01-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, the _ex variants separated the zval first, if a conversion was necessary. This distinction no longer makes sense since PHP 7. The only difference that was still left is that _ex checked whether the type is the same first, but the usage of these macros did not actually distinguish on whether such an inlined check is valuable or not in a given context. Also drop the unused convert_to_explicit_type macros.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-01-062-4/+4
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Make fetch_* OO same as func
| * | Make fetch_* OO same as funcDharman2021-01-062-4/+4
| | | | | | | | | | | | Clsoses GH-6580.
* | | Merge branch 'PHP-8.0'Nikita Popov2021-01-063-85/+55
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: Fix/improve mysqli stubs
| * | Fix/improve mysqli stubsDharman2021-01-063-85/+55
| | | | | | | | | | | | | | | | | | | | | | | | * mysqli_commit $flags default value is 0, not -1. * A number of functions cannot actually return null. * mysqli_poll parameter names were incorrect, as this function has a different signature from select. * fetch functions apart from fetch_all can return false on failure.
* | | Move fetch_all implementation out of mysqlndNikita Popov2020-12-187-27/+17
| | | | | | | | | | | | | | | | | | | | | | | | There doesn't seem to be any compelling reason to implement this in mysqlnd rather than mysqli. It's just a loop over fetch_into. This makes the function available under libmysqlclient as well, and thus fixes bug #79372.
* | | Make mysqli_stmt_next_result available under libmysqlNikita Popov2020-12-183-16/+6
| | | | | | | | | | | | The libmysqlclient version we require supports mysql_stmt_next_result.
* | | Merge branch 'PHP-8.0'Nikita Popov2020-12-183-19/+153
|\ \ \ | |/ / | | | | | | | | | * PHP-8.0: MySQLnd: Support cursors in store/get result
| * | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-12-183-19/+153
| |\ \ | | |/ | | | | | | | | | * PHP-7.4: MySQLnd: Support cursors in store/get result