| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-8.0:
Fix bug #80837
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fix bug #80837
|
| | |
| | |
| | |
| | | |
The error needs to be reported on the statement, not the connection.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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).
|
| | |
| | |
| | |
| | | |
Don't add to a void pointer.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This API only works in very limited circumstances -- relying on
it will invariably lead to leaks. The correct way to "free" something
from the pool is to use the checkpoint API.
|
| | |
| | |
| | |
| | |
| | | |
The last user has been dropped in the previous commit. This has
never worked meaningfully in the first place.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When row data split across multiple packets, allocate a temporary
buffer that can be reallocated, and only copy into the row buffer
pool arena once we know the final size. This avoids quadratic
memory usage for very large results.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Handle incomplete result set metadata more gracefully
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Handle incomplete result set metadata more gracefully
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rather than segfaulting because sname is missing lateron, report
a FAIL here. As this indicates a server bug, the errors is reported
as an out of band warning, rather than a client error.
This fixes the PHP side of bug #80713.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix #78680: mysqlnd pam plugin missing terminating null
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix #78680: mysqlnd pam plugin missing terminating null
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix #74779: x() and y() truncating floats to integers
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix #74779: x() and y() truncating floats to integers
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Instead report them as proper client errors.
Closes GH-6530.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
MySQLnd: Support cursors in store/get result
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
MySQLnd: Support cursors in store/get result
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This fixes two related issues:
1. When a PS with cursor is used in store_result/get_result,
perform a COM_FETCH with maximum number of rows rather than
silently switching to an unbuffered result set (in the case of
store_result) or erroring (in the case of get_result).
In the future, we might want to make get_result unbuffered for
PS with cursors, as using cursors with buffered result sets
doesn't really make sense. Unlike store_result, get_result
isn't very explicit about what kind of result set is desired.
2. If the client did not request a cursor, but the server reports
that a cursor exists, ignore this and treat the PS as if it
has no cursor (i.e. to not use COM_FETCH). It appears to be a
server side bug that a cursor used inside an SP will be reported
to the client, even though the client cannot use the cursor.
Fixes bug #64638, bug #72862, bug #77935.
Closes GH-6518.
|
| | |
| | |
| | |
| | |
| | |
| | | |
There were only two uses of non-zmm allocation functions left,
which really did not need to use the system allocator. Remove
them, and remove the system allocator based APIs.
|
| | |
| | |
| | |
| | |
| | | |
Perform the same checkpointing twe do in other row reading
functions.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, PDO MySQL only fetched data as native int/float if
native prepared statements were used. This patch updates PDO to
have the same behavior for emulated prepared statements, and thus
removes the largest remaining discrepancy between these two modes.
Note that PDO already has a ATTR_STRINGIFY_FETCHES option to control
whether native types are desired or not. The previous output can
be restored by enabling this option.
Most of the tests make use of that option, because this allows the
tests to work under libmysqlclient as well, which currently always
returns string results (independently of whether native or emulated
PS are used).
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a larger overhaul of the mysqlnd result set infrastructure:
* Drop support for two different types of buffered results sets
("c" and "zval"). Possibly these made sense at some earlier
time, but now (with minor adjustments) one option is strictly
worse than the other. Buffered result sets already buffer the
full row packets, from which zvals can be decoded. The "zval"
style additionally also buffered the decoded zvals. As result
sets, even buffered ones, are generally only traversed once,
this just ends up wasting memory. Now, a potentially useful
variation here would be to buffer the decoded zvals instead of
the row packets, but that's not what the code was doing.
* To make it really strictly better, pre-allocate the zval row
buffer and reuse it for all rows. Previously the "c" style always
allocated a new buffer for each row.
* The fetch_row API now provides a populated zval[]. The task of
populating an array is deferred to fetch_row_into, which also
avoids duplicating this code in multiple places. The fetch_row_c
API is also implemented on top of fetch_row now, rather than
duplicating large parts of the code.
* The row fetching code for prepared statements and normal result
sets has been mostly merged. These already used the same
infrastructure, but prepared statements used separate row
fetching functions that were nearly the same as the normal ones.
This requires passing the stmt into the result set, rather than
just a flag. The only part that remains separate is reading of
unbuffered results in the presence of PS cursors.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Retain the field, but always populate it with zero. This was
already the case for PS without length updating.
max_length has nothing lost in the field metadata -- it is a
property of the specific result set, and requires scanning the
whole result set to compute. PHP itself never uses max_length
with mysqlnd, it is only exposed in the raw mysqli API.
Keeping it for just that purpose is not worthwhile given the costs
involved. People who actually need this for some reason can easily
calculate it themselves, while making it obvious that the
calculation requires a full result set scan.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fixed bug #67983
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #67983
|
| | |
| | |
| | |
| | |
| | | |
We need to check the BIT case first, otherwise it will get skipped
in INT_AND_FLOAT_NATIVE mode.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Merge it into free_result. There is a large number of different
free_* functions for result sets, let's avoid having one more.
Only difference is that it does not increment stats, and that
seems like a bug as free_stmt_result is still freeing a result.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Something odd was being done here, with the row packet having a
flag for whether it should allocate the zval buffer, which would
then get moved into the result set.
Keep the management of this buffer purely at the result set level.
This also allows us to easily reuse the same buffer for all results,
rather than allocating a new one for each fetch.
|
| | |
| | |
| | |
| | |
| | | |
ext/mysql is no longer supported, drop handling for it from
mysqlnd.
|
| | |
| | |
| | |
| | |
| | | |
This method is not used, and is implemented in a very dubious
way.
|
| | |
| | |
| | |
| | |
| | | |
This API already doesn't match libmysqlclient, so we may as well
use the zmm.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This has been unconditionally enabled for a long time already
(the actual conversion is behind an additional runtime flag).
|
| | |
| | |
| | |
| | | |
emalloc/pemalloc are infallible.
|
| | |
| | |
| | |
| | |
| | | |
emalloc() etc are infallibe by design. Having a failure threshold
for them is a violation of the API contract.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fixed bug #76815
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #76815
|
| | |
| | |
| | |
| | |
| | |
| | | |
When we receive an error while reading a result set, we should
assume that no more result sets are available. libmysqlclient
implements the same behavior.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fixed bug #71145
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #71145
|