History log of /PHP-8.2/ext/mysqli/mysqli_api.c (Results 1 – 25 of 435)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 47f80ffc 05-Mar-2023 Ilija Tovilo

Remove unnecessary type punnign from mysqli_api.c

value is a long. On big-endian architectures mysql_stmt_attr_get() will write to
the most significant byte. Type punning was used to mov

Remove unnecessary type punnign from mysqli_api.c

value is a long. On big-endian architectures mysql_stmt_attr_get() will write to
the most significant byte. Type punning was used to move that byte to the least
significant one, which is UB. We can avoid this by simply casting to my_bool
(alias of bool). Previously, a comparison against 0 should've been done.

show more ...


# d5c649b3 23-Feb-2023 Max Kellermann

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleadi

zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621)

`zend_uchar` suggests that the value is an ASCII character, but here,
it's about very small integers. This is misleading, so let's use a
C99 integer instead.

On all architectures currently supported by PHP, `zend_uchar` and
`uint8_t` are identical. This change is only about code readability.

show more ...


# 1dc51c7b 06-Jul-2022 Kamil Tekiela

Implement mysqli_execute_query() (#8660)


# d84dfa32 05-Jan-2022 Kamil Tekiela

Remove MYSQLI_USE_MYSQLND constant and all the code with it


# 15e7e570 03-Dec-2021 David Carlier

Fix #81658: MYSQL_OPT_LOAD_DATA_LOCAL_DIR not available in MariaDB

This also introduces the boolean userland constant `MYSQLI_IS_MARIADB`.


# 5977610d 09-Aug-2021 Christoph M. Becker

Fix #74544: Integer overflow in mysqli_real_escape_string()

The patch has been provided by @johannes.

Closes GH-7353.


# cd0cd3d3 01-Aug-2021 Kamil Tekiela

Fix typos (#7327)


# 01775fa1 26-May-2021 Máté Kocsis

Declare tentative return types for ext/mysqli (#6998)


# b0961f2d 26-May-2021 Nikita Popov

Remove uses of TRUE/FALSE in mysqli/pdo_mysql

Replace with standard uses of true/false.


# 428340df 25-May-2021 Kamil Tekiela

Add error reporting to mysqli_options (#7036)


# aca6aefd 14-May-2021 George Peter Banyard

Remove 'register' type qualifier (#6980)

The compiler should be smart enough to optimize this on its own


# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...


# 45bad647 14-Apr-2021 Kamil Tekiela

Mysqli bind in execute (#6271)


# 7e9f6d2a 13-Mar-2021 Dharman

Deprecate OO style mysqli::get_client_info method

Deprecate passing connection object to mysqli_get_client_info()

Closes GH-6777.


# da011a31 22-Feb-2021 Darek Slusarczyk

Fix #80329: Add option to specify LOAD DATA LOCAL white list folder

* allow the user to specify a folder where files that can be sent
via LOAD DATA LOCAL can exist
* add mysqli.

Fix #80329: Add option to specify LOAD DATA LOCAL white list folder

* 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>

show more ...


# 39c6aaa9 10-Feb-2021 Nikita Popov

Make mysqli_ssl_set() arguments nullable

This function internally converts zero length arguments to NULL
argument -- but we should also accept them in the first place.

Null argu

Make mysqli_ssl_set() arguments nullable

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.

show more ...


# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

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

Replace zend_bool uses with bool

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.

show more ...


# 422d1665 14-Jan-2021 Nikita Popov

Make convert_to_*_ex simple aliases of convert_to_*

Historically, the _ex variants separated the zval first, if a
conversion was necessary. This distinction no longer makes sense
sin

Make convert_to_*_ex simple aliases of convert_to_*

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.

show more ...


# 44a311db 04-Jan-2021 Dharman

Fix/improve mysqli stubs

* 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

Fix/improve mysqli stubs

* 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.

show more ...


# be93e5a1 18-Dec-2020 Nikita Popov

Make mysqli_stmt_next_result available under libmysql

The libmysqlclient version we require supports mysql_stmt_next_result.


# 33e90491 14-Dec-2020 Nikita Popov

MySQLnd: Clean up and optimize mysqlnd result set handling

This is a larger overhaul of the mysqlnd result set infrastructure:

* Drop support for two different types of buffered re

MySQLnd: Clean up and optimize mysqlnd result set handling

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.

show more ...


# 890e4caf 14-Dec-2020 Nikita Popov

Drop support for max_length in mysqli_fetch_fields()

Retain the field, but always populate it with zero. This was
already the case for PS without length updating.

max_length has

Drop support for max_length in mysqli_fetch_fields()

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.

show more ...


# 141eb346 14-Dec-2020 Nikita Popov

Remove MYSQLND_STRING_TO_INT_CONVERSION define

This has been unconditionally enabled for a long time already
(the actual conversion is behind an additional runtime flag).


# eda74926 11-Nov-2020 Nikita Popov

Handle errors during next_result()


# 990bb348 17-Sep-2020 Dharman

Handle mysqli errors in more cases

Report errors autocommit, commit, rollback and mysqli_stmt_attr_set.

Additionally, copy the error from conn to stmt when preparing fails,
so t

Handle mysqli errors in more cases

Report errors autocommit, commit, rollback and mysqli_stmt_attr_set.

Additionally, copy the error from conn to stmt when preparing fails,
so these errors are also handled by mysqli_stmt_prepare.

Closes GH-6157.

show more ...


12345678910>>...18