| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
The error needs to be reported on the statement, not the connection.
|
|
|
|
| |
Closes GH-6727.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
We need to check the BIT case first, otherwise it will get skipped
in INT_AND_FLOAT_NATIVE mode.
|
|\
| |
| |
| |
| | |
* PHP-7.3:
Fix mysqli_expire_password test for mariadb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In MariaDB-10.4.3 EXPIRE passwords where supported for
MariaDB. This only behaves like MySQL when the system
variable disconnect_on_expired_passwords=1.
MariaDB if there was no password it could not be considered
expired. So the test is adjusted to use actual passwords.
(MariaDB commit a94b20a8e0d9e64eeaabdaaa7a3e03fcdb8a686e)
The error codes produced my MariaDB are different
however still conforming to the SQL specification.
Closes GH-6480.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MySQL removed RENAME DATABASE in 18300001c1dbbfddf9a0adcbaeea68956102bdd0
(Sept 2007, 5.1.23). As this briefest existance is very insignificant lets remove it.
It also breaks when testing against MariaDB.
As the alternate path in this test covers all supported MySQL and MariaDB
versions and a signifant portion of unsupported versions lets keep it simple.
Closes GH-6459.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MariaDB extended the default decimal field to 39 characters
instead of MySQL's 31 characters.
This small change allows the test to pass on MySQL and MariaDB.
Closes GH-6484.
|
| |
| |
| |
| |
| |
| |
| | |
For the sake of simplicity, I've synchronized the implementation
with PHP 8, which means null values are also accepted.
Closes GH-6454.
|
| |
| |
| |
| |
| | |
Due to a bug in the tidy script, most tests did not actually get
reindented...
|
| |
| |
| |
| |
| |
| | |
Reindent ext/mysqli tests on PHP-7.4, so they match with the
indentation on PHP-8.0. Otherwise merging test changes across
branches is very unpleasant.
|
| |
| |
| |
| |
| |
| |
| | |
Change mysqli and pdo_mysql tests configuration to use by default
InnoDB instead of MyISAM.
Closes GH-6405.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We cannot simply switch to use_result here, because the fetch_row
methods in get_result mode and in use_result/store_result mode
are different: In one case it accepts a statement, in the other
a return value zval. Thus, doing a switch to use_result results
in a segfault when trying to fetch a row.
Actually supporting get_result with cursors would require adding
cursor support in mysqlnd_result, not just mysqlnd_ps. That would
be a significant amount of effort and, given the age of the issue,
does not appear to be particularly likely to happen soon.
As such, we simply generate an error when using get_result()
with cursors, which is much better than causing a segfault.
Instead, parameter binding needs to be used.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
Sync ext/mysqli/tests/mysqli_report.phpt with PHP-8.0/master, as
the current difference in indentation makes it hard to merge.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.3:
Fix mysqli build with mysqlnd and without PDO
|
| | |
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #78179: mysqli/mysqlnd transaction extensions
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
MariaDB versioning created a mess with regarding testing
features based on version. We sidestep the problem here
by assuming the extensions are present, and if a syntax
error occurs with a SQL mode TRANS_START_READ_WRITE |
TRANS_START_READ_ONLY enabled, then output the same
warning as before.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Support NO_BACKSLASH_ESCAPES with newer libmysqlclient
|
| |
| |
| |
| | |
Requires the use of mysql_real_escape_string_quote().
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Use MyISAM engine for new test
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Travis on 7.3 is showing this error:
> The size of BLOB/TEXT data inserted in one transaction is greater
> than 10% of redo log size. Increase the redo log size using
> innodb_log_file_size.
Force MyISAM engine to avoid this.
|
|\ \
| |/
| |
| |
| |
| | |
* PHP-7.3:
Fix bug #80107: Handling of large compressed packets
Bug #80107 Add test for mysqli_query() fails for ~16 MB long query when compression is enabled
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's two layers of packet splitting going on. First, packets
need to be split into having a payload of exactly 2^24-1 bytes or
being the last packet. If the split packet has size between 2^24-5
and 2^24-1 bytes, the compressed packets also needs to be split,
though the choice of split doesn't matter here. I'm splitting off
the first 8192 bytes, as that's what I observe libmysqlclient to be
doing.
|
| |
| |
| |
| | |
compression is enabled
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix mysqli_release_savepoint() on mysqlnd
|
| |
| |
| |
| | |
mysqli_release_savepoint() was not actually releasing a savepoint...
|
|\ \
| |/
| |
| |
| |
| |
| | |
* PHP-7.3:
pdo_mysql/mysqli (native) libmysqlclient_r no-longer used
mysql: native mysql-8.0 uses _Bool
mysqli: use native api
|
| |
| |
| |
| |
| |
| | |
The mysqlclient_r library exists in mysql-5.6 for compatibility only.
Later versions have it removed.
|
| |
| |
| |
| | |
MySQL-8.0 removes option MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tested with:
* mysql-5.6.49-linux-glibc2.12-x86_64
* mysql-5.7.31-linux-glibc2.12-x86_64
* mysql-8.0.21-linux-glibc2.17-x86_64
* mariadb-10.5.6
configure --with-mysqli=/usr/local/$version/bin/mysql_config --with-pdo-mysql=/usr/local/$version
MySQL-8.0 removed my_bool
Some options where deprecated in mysql-8.0
MY_CHARSET_INFO used with exposed api mysql_get_character_set_info
rather than internal structures.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Remove bogus REGISTER_LONG_CONSTANT
|
| |
| |
| |
| | |
This shouldn't be in this function, probably a copy/paste mistake...
|
|\ \
| |/
| |
| |
| | |
* 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.
|
| |
| |
| |
| | |
Handle errors appearing in different order.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix test for Windows
|
| |
| |
| |
| |
| | |
Windows filenames may very well contain a colon, so we adjust the test
accordingly.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Enclose INI values containing {TMP} in quotes
|
| |
| |
| |
| |
| | |
At least on Windows, the temporary directory may contain tilde signs,
which would result in an INI parse error.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.3:
Fix #64032: mysqli reports different client_version
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
While `mysqli_get_client_version()` calls `mysql_get_client_version()`
to retrieve the client version, `mysql::$client_version` is initialized
to `MYSQL_VERSION_ID`. Both should match though, and since the former
is the more useful information, we fix `mysql::$client_version`.
We do not add a regression test, because it would usually succeed
anyway, and we already have several tests with respective `assert()`s.
|
| |
| |
| |
| | |
Closes GH-5121
|
| |
| |
| |
| |
| |
| | |
In this case warning_count may be non-zero, but php_get_warnings()
may still return no warnings. In this case we should return false
rather than returning a corrupted mysqli_warning object.
|