History log of /php-src/ext/pdo_mysql/mysql_statement.c (Results 1 – 25 of 197)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 11accb5c 25-Jun-2024 Arnaud Le Blanc

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

-I$(top_builddir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/main
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM
-I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

-I$(top_builddir)/main
-I$(top_builddir)
-I$(top_srcdir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.

show more ...


# df481ef9 03-Jun-2024 Peter Kokot

Simplify PDO include paths (#14444)

PDO include paths can be simplified and synced as done in other
extensions: either the project root directory or the phpincludedir (for
the system

Simplify PDO include paths (#14444)

PDO include paths can be simplified and synced as done in other
extensions: either the project root directory or the phpincludedir (for
the system installation). The 'ext' include is automatically appended
when doing phpize build. In php-src it is only present on Windows build.
The PHP_CHECK_PDO_INCLUDES is left intact working as before and checks
if PDO headers are found.

show more ...


# d4accd8b 20-May-2024 Gina Peter Banyard

ext/pdo_mysql: Fix [-Wcalloc-transposed-args] compiler warning


# 3dc9503a 09-Mar-2024 Saki Takamachi

Revert "Fixed GH-13167 Fixed the behavior of `bindValue` and `bindParam`. (#13384)"

This reverts commit 68f10504de53bcde9e90d0218eaae9c6243b72b3.


# 68f10504 18-Feb-2024 Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com>

Fixed GH-13167 Fixed the behavior of `bindValue` and `bindParam`. (#13384)

Fixed to generate an error when a non-scalar value is passed in
`PDO_PARAM_EVT_EXEC_PRE` of `pdo_mysql_stmt_par

Fixed GH-13167 Fixed the behavior of `bindValue` and `bindParam`. (#13384)

Fixed to generate an error when a non-scalar value is passed in
`PDO_PARAM_EVT_EXEC_PRE` of `pdo_mysql_stmt_param_hook` unless
it is a `Stringable` object.

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20
# b0961f2d 26-May-2021 Nikita Popov

Remove uses of TRUE/FALSE in mysqli/pdo_mysql

Replace with standard uses of true/false.

Revision tags: php-8.0.7RC1, php-7.4.20RC1
# ec566508 17-May-2021 Nikita Popov

PDO MySQL: Check number of bounds params even if none are bound

The check for the number of bound parameters was only executed if
at least one was bound. We should also error if nothing

PDO MySQL: Check number of bounds params even if none are bound

The check for the number of bound parameters was only executed if
at least one was bound. We should also error if nothing was bound.
With mysqlnd, mysqlnd itself ended up emitting an error, but with
libmysqlclient this error condition would not be detected.

show more ...

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

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1
# 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 ...

Revision tags: php-8.0.1, php-7.4.14, php-7.3.26
# caa71003 17-Dec-2020 Nikita Popov

Rewrite PDO result binding

Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allo

Rewrite PDO result binding

Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.

This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.

This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.

I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)

show more ...

# 9718e598 18-Dec-2020 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
PDO MySQL: Handle boolean parameter binding with libmysql


Revision tags: php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23
# 51f57e7b 18-Sep-2020 Nikita Popov

PDO MySQL: Handle boolean parameter binding with libmysql

Previously boolean parameters were simply silently ignored...

# c18b1aea 15-Dec-2020 Nikita Popov

PDO MySQL: Use native types for results

Previously, PDO MySQL only fetched data as native int/float if
native prepared statements were used. This patch updates PDO to
have the same b

PDO MySQL: Use native types for results

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

show more ...

# 52435f94 16-Dec-2020 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
PDO MySQL: Use mysqlnd column names


# 205d209d 16-Dec-2020 Nikita Popov

PDO MySQL: Use mysqlnd column names

mysqlnd already creates interned zend_strings for us, so let's
make use of them.

This also required updating the PDO case changing code to wo

PDO MySQL: Use mysqlnd column names

mysqlnd already creates interned zend_strings for us, so let's
make use of them.

This also required updating the PDO case changing code to work
with potentially shared strings. For the lowercasing, use the
optimized zend_string_tolower() implementation.

show more ...

# 3c63b26b 14-Dec-2020 Nikita Popov

Use zmm for row_c data

This API already doesn't match libmysqlclient, so we may as well
use the zmm.

# 2d51c203 11-Dec-2020 Nikita Popov

PDO: Store/pass query_string as zend_string

Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.

# ccb7f1c7 11-Dec-2020 Nikita Popov

Fixed bug #79132

Following cmb's suggestion and replacing the counter with a check
against the bound_params HT, which ensures that both cannot go
out of sync.

# 7a89157f 11-Dec-2020 Nikita Popov

PDO MySQL: Fix nextRowset() on libmysqlclient with native PS

The logic after next_result should match the one after execute.
This was the case for mysqlnd but not libmysqlclient, which u

PDO MySQL: Fix nextRowset() on libmysqlclient with native PS

The logic after next_result should match the one after execute.
This was the case for mysqlnd but not libmysqlclient, which used
the non-PS logic.

show more ...

# ad8eb116 11-Dec-2020 Nikita Popov

Fixed bug #67004

Repeated execute() with native PS failed to release the previous
result set on libmysqlclient.

Move freeing the result set into a common location.

# d6b4b82a 11-Dec-2020 Nikita Popov

PDO MySQL: Use stmt_next_result with libmysqlclient as well

libmysqlclient added this function in version 5.5, which happens
to be the minimum we support. If we have a prepared statement

PDO MySQL: Use stmt_next_result with libmysqlclient as well

libmysqlclient added this function in version 5.5, which happens
to be the minimum we support. If we have a prepared statement,
we should use it on both mysqlnd and libmysqlclient, even if the
handling afterwards is different.

This fixes error handling with native prepared statements.

show more ...

# c927c831 11-Dec-2020 Nikita Popov

PDO MySQL: Fix leak with libmysqlclient and multiple rowsets

stmt->column_count gets reset before the next_rowset handler is
invoked, so we need to fetch the value from the result set in

PDO MySQL: Fix leak with libmysqlclient and multiple rowsets

stmt->column_count gets reset before the next_rowset handler is
invoked, so we need to fetch the value from the result set instead.

Arguably PDO should be separating the destruction of the previous
result set and the switch to the next result set more cleanly...

show more ...

# 106e7e4b 09-Dec-2020 Nikita Popov

Fixed bug #70066

If we fall back to emulated prepared statements, destroy S->stmt,
so the code doesn't get confused about which mode we're in.

# fcfa7fd0 09-Dec-2020 Nikita Popov

Fixed bug #66878

Keep track of whether we have fully consumed all result sets,
either using nextRowset() calls or closeCursor() and skip the
attempt to consume remaining results sets

Fixed bug #66878

Keep track of whether we have fully consumed all result sets,
either using nextRowset() calls or closeCursor() and skip the
attempt to consume remaining results sets during destruction in
that case.

Especiall if closeCursor() has been used, we really shouldn't
have this sort of cross-statement inference.

show more ...

12345678