| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix MySQL local infile / attr handling on big endian systems
|
| |
| |
| |
| |
| |
| | |
Make sure pointer types match what is used by libmysql everywhere.
Closes GH-5380.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix incorrect free for last_message
|
| |
| |
| |
| |
| |
| |
| |
| | |
In commit a7305eb539596e175bd6c3ae9a20953358c5d677 the last_message
field of the connection object was changed to be always non-persistent.
But there is a place on change_user path that still treats it
depending on conn->persistent flag. This will cause PHP crash after
com_change_user success when there is last_message set
|
| |
| |
| |
| | |
Cf. <http://git.php.net/?p=php-src.git;a=commit;h=db08ef0d3274b239a6b9e68d71d02bb6acb71d82>
|
| | |
|
| |
| |
| |
| | |
We implement that on top of Cryptography API: Next Generation (CNG).
|
| | |
|
| |
| |
| |
| |
| | |
We use alloca instead of VLA. This should also allow building
this code on Windows.
|
| |
| |
| |
| |
| | |
Since this pattern is understood by compilers, not a real issue, but
certainly cleaner this way.
|
| |
| |
| |
| |
| |
| | |
auth_plugin_data_len here is 21, including the trailing null byte.
Directly use SCRAMBLE_LENGTH instead. Also add a sanity check that
the provided scramble is long enough.
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
|
| |
| |
| |
| |
| |
| | |
Column names can be numeric strings, so we have to make sure to insert
the column values with the appropriate numeric keys, instead of adding
them.
|
| |
| |
| |
| |
| |
| | |
If an empty password is used, no additional packets are exchanged
during caching_sha2_password auth. We're only looking for an
OK/ERR response.
|
| |
| |
| |
| | |
In particular, this fixes handling of expired passwords.
|
| |
| |
| |
| | |
Same as for connection handshakes.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The fact that conn->unix_socket is set does not mean that a Unix
socket is actually in use -- this member is set in a default
configuration.
Instead check whether a unix_socket stream ops is used.
|
| | |
|
| |
| |
| |
| | |
Not sure why this only started showing up as a leak now.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem is newer binutils will no longer default to --copy-dt-needed-entries but use --no-copy-dt-needed-entries instead. So all libraries needed *must* be provided.
Workarounds (either one works)
1) Add "-Wl,--copy-dt-needed-entries" to LDFLAGS to bring back the old behavior of the linker
2) Add "-lz" to list of libraries to be added
In "ext/mysqlnd/mysqlnd_protocol_frame_codec.c" when the "zlib.h" header is included should also trigger adding '-lz' to the list of libraries.
|
| |
| |
| |
| |
| |
| |
| | |
I believe this code has been dead since 05c5e05 (2015) now replaced
by `ext/mysqlnd/mysqlnd_vio.c`.
Closes GH-4888.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
When calling free_result_buffers(), also free field metadata and
restore the mempool state to what it was before any allocations
have been made. Remove the mempool save/restore logic for the
inner result set as this is now handled on a higher level.
|
| |
| |
| |
| |
| | |
mysqlnd doesn't actually use this. PDO MySQL uses it, but also
declares it separately.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
fix the problem for connect_attr, set db condition, and add a new attribute _server_host
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.2:
fix the problem for connect_attr, set db condition, and add a new attribute _server_host
|
| | |
| | |
| | |
| | | |
_server_host
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix #78179: MariaDB server version incorrectly detected
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix #78179: MariaDB server version incorrectly detected
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As of MariaDB 10.0.2, the server reports a fake version number as work-
around for replication issues[1]. We apply the same "fix" as in the
MariaDB client to cater to this.
[1] <https://github.com/MariaDB/server/commit/c50ee6c23dbeb090963580754bec2f0a96ac0557#diff-5b45fa673c88c06a9651c7906364f592>
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix 78213: Empty row pocket
|
| | |
| | |
| | |
| | |
| | | |
We have to ensure that we don't create an arena which is smaller than
its header, regardless of the configured alignment.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The php_stream_read() and php_stream_write() functions now return
an ssize_t value, with negative results indicating failure. Functions
like fread() and fwrite() will return false in that case.
As a special case, EWOULDBLOCK and EAGAIN on non-blocking streams
should not be regarded as error conditions, and be reported as
successful zero-length reads/writes instead. The handling of EINTR
remains unclear and is internally inconsistent (e.g. some code-paths
will automatically retry on EINTR, while some won't).
I'm landing this now to make sure the stream wrapper ops API changes
make it into 7.4 -- however, if the user-facing changes turn out to
be problematic we have the option of clamping negative returns to
zero in php_stream_read() and php_stream_write() to restore the
old behavior in a relatively non-intrusive manner.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Last usage removed via 6a813634052710f3f4bf6e2e03ca1b6c7be3bcee.
Closes GH-4455
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since mysqlnd is solely developed in the php-src repository, it makes
not much sense to have its own version number, particularly since
nobody cares to update it. Therefore we use PHP's version number, but
stick with the "mysqlnd" prefix which can be important to distinguish
the mysqli driver (libmysqlclient vs. mysqlnd).
|
| | |
| | |
| | |
| | | |
All information can already be retrieved using the APIs at https://www.php.net/manual/en/mysqlnd.stats.php. Closes https://bugs.php.net/bug.php?id=60594
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Available under -DZEND_TRACK_ARENA_ALLOC. This will use the system
allocator combined with arena checkpointing & release semantics
and allows analyzing arena usage under asan/valgrind.
I've sacrificed the duplicate arena implementation in mysqlnd, as
the integration with mysqlnd alloc is not worth the code duplication
to me.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The actual leak is observed in ext/pdo_mysql/tests/bug_74376.phpt.
The persistent connection leaks because a refcount decrement on a
result is missed. The refcount decrement is missed because
free_result_contents is used, rather than free_result.
Looking at other uses of free_result_contents, it looks like they
could also suffer from this problem. Apart from one case,
free_result_contents is always used to release the result entirely
(I've adjusted the one differing case to only free meta), so I'm
moving most of the logic from free_result into free_result_contents.
The only difference is now that free_result will skip_result first.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Streams will be freed in an unpredictable order during shutdown.
Ignore explicit calls to php_stream_close() entirely to avoid
use-after-free -- instead let the stream resource destructor
deal with it. We have to account for a few special cases:
* Enclosed streams should be freed, as the resource destructor
will forward to the enclosing stream.
* Stream cookies also directly free streams, because we delegate
to the cookie destruction if one exists.
* Mysqlnd also directly frees streams, because it explicitly
removes stream resources (because mysqlnd!)
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | |
| | | |
It works even without it but explicit stuff is better. The compiler probably converts the 16-bit
uint16_t to uint32_t before doing the shift.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
This one looks like a genuine bug: We're shifting a uint16_t by
16 bits. On x86 that likely results in no shift happening.
|
| | |
| | |
| | |
| | | |
Hopefully fixes the release build...
|
| | | |
|
| | |
| | |
| | |
| | | |
No longer used, replaced by PRIu64/PRIi64.
|
| | |
| | |
| | |
| | | |
By moving the the standard macros...
|
| | |
| | |
| | |
| | |
| | | |
And also separate the PHP_DEBUG codepaths more, to avoids having an
ifdef every other line...
|