| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Previously boolean parameters were simply silently ignored...
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Repeated execute() with native PS failed to release the previous
result set on libmysqlclient.
Move freeing the result set into a common location.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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...
|
|
|
|
|
| |
If we fall back to emulated prepared statements, destroy S->stmt,
so the code doesn't get confused about which mode we're in.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Just calling next_result() is sufficient.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This was already working in all cases apart from native prepared
statements with unbuffered queries. In that case invoking
stmt_free_result() addresses the issue.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Two bugs both affecting the bug_pecl_7976.phpt test ("works with
mysqlnd" haha):
* We should not change the connection state in stmt_free_result.
This makes mysql_stmt_free_result usable under mysqlnd and
not just libmysqlclient.
* If we call mysql_stmt_free_result, we still need to consume
any outstanding result sets.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MySQL always returns a trailing empty result set for stored
procedure calls, which is used to convey status information.
The PDO MySQL implementation is presently confused about what to
do with it: If mysqlnd is used and native prepared statements are
used, this result set is skipped. In all other cases it is not
skipped. We also have quite a few XFAILed tests relating to this.
This patch normalizes (for PHP-8.0 only) the behavior towards
always retaining the empty result set. This is simply how MySQL
stored procedures work (some expletives omitted here) and we can't
distinguish this "useless" result set from an empty result of a
multi query. Multi queries are not a concern for native prepared
statements, as PDO does not allow them in that case, but they are
a concern for emulated prepared statements.
Closes GH-6497.
|
|
|
|
|
|
|
|
| |
This has been fixed for PDO SQlite by GH-4313, however the same
issue also applied to PDO MySQL.
Move the column count setting function into the main PDO layer
(and export it) and then use it in both PDO SQLite and PDO MySQL.
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fixed bug #63185
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fixed bug #80458
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If there is no result set (e.g. for upsert queries), still allow
fetching to occur without error, i.e. treat it the same way as
an empty result set.
This normalizes behavior between native and emulated prepared
statements and addresses a regression in PHP 7.4.13.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Handle errors during PDO row fetch
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The EOF flag also gets set on error, so we always end up ignoring
errors here.
However, we should only check errors for unbuffered results. For
buffered results, this function is guaranteed not to error, and
querying the errno may return an unrelated error.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix bug #79375
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure deadlock errors are properly propagated and reports in
a number of places in mysqli and PDO MySQL.
This also fixes a memory and a segfault that can occur under these
conditions.
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Fix #78623: Regression caused by "SP call yields additional empty result set"
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #78623: Regression caused by "SP call yields additional empty result set"
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.2:
Fix #78623: Regression caused by "SP call yields additional empty result set"
|
| | | |
| | | |
| | | |
| | | | |
This reverts commit 41a4379cb45419a376043ca5f8c5a2bca82cea7c.
|
|/ / /
| | |
| | |
| | | |
Closes GH-4732.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix #41997: SP call yields additional empty result set
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix #41997: SP call yields additional empty result set
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When stored procedures are called, the "final result set is a status
result that includes no result set". Calling `::nextRowset()` on the
actual last result set should return FALSE, since there is actually no
further result set to be processed.
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Properly support binding boolean parameters with emulated prepared
statements disabled. Also add the necessary mysqlnd support for
MYSQL_TYPE_TINY.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.3:
Fix #77944: Wrong meta pdo_type for bigint on LLP64
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.2:
Fix #77944: Wrong meta pdo_type for bigint on LLP64
|
| | |
| | |
| | |
| | |
| | |
| | | |
When actually fetching the data, bigint (unsigned) column values are
returned as integers on LLP64 architectures, so their pdo_type has to
be PDO::PARAM_INT accordingly.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.
A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.
This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.
With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.
Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
|
| | |
|
| |
| |
| |
| | |
stored together with GC_FLAGS)
|
| | |
|
|/ |
|
| |
|