summaryrefslogtreecommitdiff
path: root/ext/mysqli
Commit message (Collapse)AuthorAgeFilesLines
* Fix mysqli_expire_password test for mariadbDaniel Black2020-12-031-13/+25
| | | | | | | | | | | | | | | 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.
* Fix mysqli_get_client_stats testDaniel Black2020-11-271-20/+8
| | | | | | | | | | | | 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.
* Fix mysqli build with mysqlnd and without PDOBob Weinand2020-09-201-1/+1
|
* Fix #78179: mysqli/mysqlnd transaction extensionsDaniel Black2020-09-181-26/+24
| | | | | | | | | 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.
* Support NO_BACKSLASH_ESCAPES with newer libmysqlclientNikita Popov2020-09-181-1/+6
| | | | Requires the use of mysql_real_escape_string_quote().
* Use MyISAM engine for new testNikita Popov2020-09-181-1/+1
| | | | | | | | | | 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.
* Fix bug #80107: Handling of large compressed packetsNikita Popov2020-09-181-8/+14
| | | | | | | | | | 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.
* Bug #80107 Add test for mysqli_query() fails for ~16 MB long query when ↵Máté Kocsis2020-09-181-0/+51
| | | | compression is enabled
* Fix mysqli_release_savepoint() on mysqlndNikita Popov2020-09-172-2/+2
| | | | mysqli_release_savepoint() was not actually releasing a savepoint...
* pdo_mysql/mysqli (native) libmysqlclient_r no-longer usedDaniel Black2020-09-171-3/+0
| | | | | | The mysqlclient_r library exists in mysql-5.6 for compatibility only. Later versions have it removed.
* mysql: native mysql-8.0 uses _BoolDaniel Black2020-09-172-3/+3
| | | | MySQL-8.0 removes option MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
* mysqli: use native apiDaniel Black2020-09-173-17/+10
| | | | | | | | | | | | | | | | 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.
* Remove bogus REGISTER_LONG_CONSTANTNikita Popov2020-08-251-4/+1
| | | | This shouldn't be in this function, probably a copy/paste mistake...
* Fix MySQL local infile / attr handling on big endian systemsguirish2020-04-162-5/+5
| | | | | | Make sure pointer types match what is used by libmysql everywhere. Closes GH-5380.
* Fix test for WindowsChristoph M. Becker2020-03-231-1/+1
| | | | | Windows filenames may very well contain a colon, so we adjust the test accordingly.
* Enclose INI values containing {TMP} in quotesChristoph M. Becker2020-03-092-2/+2
| | | | | At least on Windows, the temporary directory may contain tilde signs, which would result in an INI parse error.
* Fix #64032: mysqli reports different client_versionChristoph M. Becker2020-02-271-1/+1
| | | | | | | | | | 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.
* Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTHChristoph M. Becker2020-01-132-0/+140
| | | | | | 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.
* Fix test cases which fail on Windows debug buildsChristoph M. Becker2020-01-103-2/+4
| | | | | | | | We use the portable {TMP} instead of the hard-coded /tmp, and skip mysqli_debug_append.phpt on Windows, because unlinking the trace file while the connection is still open won't work there. (cherry picked from commit 60081ca20d5701111de5f94ae64909b1cc265f1e)
* Merge branch 'PHP-7.2' into PHP-7.3Joe Watkins2019-10-031-4/+53
|\ | | | | | | | | * PHP-7.2: Fix bug #76809 (SSL settings aren't respected when persistent connection is reused)
| * Fix bug #76809 (SSL settings aren't respected when persistent connection is ↵Fábio Souto2019-10-031-4/+53
| | | | | | | | reused)
* | Merge branch 'PHP-7.2' into PHP-7.3Dmitry Stogov2019-10-021-2/+2
|\ \ | |/ | | | | | | * PHP-7.2: Fixed test that "fails" from time to time
| * Fixed test that "fails" from time to timeDmitry Stogov2019-10-021-1/+1
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Dmitry Stogov2019-10-021-1/+1
|\ \ | |/ | | | | | | * PHP-7.2: Fixed test that "fails" from time to time
| * Fixed test that "fails" from time to timeDmitry Stogov2019-10-021-1/+1
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-09-2711-20/+20
|\ \ | |/ | | | | | | * PHP-7.2: Fix SKIPIF in ext/mysqli
| * Fix SKIPIF in ext/mysqliFabien Villepinte2019-09-2711-20/+20
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-08-201-0/+78
|\ \ | |/ | | | | | | * PHP-7.2: fix the problem for connect_attr, set db condition, and add a new attribute _server_host
| * fix the problem for connect_attr, set db condition, and add a new attribute ↵Qianqian Bu2019-08-201-0/+78
| | | | | | | | _server_host
* | Merge branch 'PHP-7.2' into PHP-7.3Andrey Hristov2019-06-191-1/+1
|\ \ | |/
| * Fix version comparisonAndrey Hristov2019-06-191-1/+1
| |
* | Be more precise about possible types for mysqli methodsTyson Andre2019-06-112-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mysqli has an uncommon approach to 64-bit compatibility: it will convert numbers that can't be represented on 32-bit platforms to a string. This is documented at https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues So if there's a query to a remote mysqli server that affects more than 2.2 billion rows, then the opcache inference might be incorrect. (It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to account for this, but I don't think there's a need or want to?) Patches 3162285b86871fb22a85a50ce9bc30823da64b6a This is based on the list of php 7.4 functions using MYSQLI_RETURN_LONG_INT in mysqli_api.c
* | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-05-221-0/+50
|\ \ | |/
| * Fix #77956 - When mysqli.allow_local_infile = Off, return a client errorSjon Hortensius2019-05-221-0/+50
| |
* | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-02-211-0/+27
|\ \ | |/
| * Fixed bug #77597Nikita Popov2019-02-211-0/+27
| | | | | | | | | | | | The same variable was reused in two nested loops... The test doesn't fail on 7.2, but I'm fixing this here anyway as the code is clearly wrong, and probably erroneous in other situations.
* | Merge branch 'PHP-7.2' into PHP-7.3Darek Slusarczyk2019-02-1112-2/+73
|\ \ | |/
| * Merge branch 'PHP-7.1' into PHP-7.2Darek Slusarczyk2019-02-1112-2/+73
| |\
| | * security fix - by default 'local infile' is disabled:Darek Slusarczyk2019-02-1112-2/+73
| | | | | | | | | | | | | | | | | | | | | | | | - set default for mysqli.allow_local_infile=0 - explicitly disable PDO::MYSQL_ATTR_LOCAL_INFILE in case of lack of driver options - add getAttribute support for PDO::MYSQL_ATTR_LOCAL_INFILE - update existing tests where needed - add new tests [checking default value and setting on] the 'local infile' in ext/mysqli and ext/pdo_mysql
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-15269-274/+261
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in *.phptPeter Kokot2018-10-1424-45/+45
| | |
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-148-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | * Trim trailing whitespace in source code filesPeter Kokot2018-10-134-7/+7
| | |
| | * Convert CRLF line endings to LFPeter Kokot2018-10-135-185/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
| * | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-15253-258/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | Trim trailing whitespace in *.phptPeter Kokot2018-10-1424-45/+45
| | |
| * | Sync leading and final newlines in source code filesPeter Kokot2018-10-147-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| * | Trim trailing whitespace in source code filesPeter Kokot2018-10-134-7/+7
| | |
* | | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-15182-186/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* | | Trim trailing whitespace in *.phptPeter Kokot2018-10-1420-37/+37
| | |