summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql
Commit message (Collapse)AuthorAgeFilesLines
* Support NO_BACKSLASH_ESCAPES with newer libmysqlclientNikita Popov2020-09-181-2/+7
| | | | Requires the use of mysql_real_escape_string_quote().
* pdo_mysql/mysqli (native) libmysqlclient_r no-longer usedDaniel Black2020-09-171-7/+2
| | | | | | 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-171-0/+3
| | | | MySQL-8.0 removes option MYSQLI_OPT_SSL_VERIFY_SERVER_CERT
* Fix #80027 Terrible performance using $query->fetch on queries with many ↵Matteo Beccati2020-08-311-0/+7
| | | | | | | | | | bind parameters Added new flags that allow skipping param_evt(s) that are not used by drivers, in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite and oci drivers to properly use the new flags. I've left out pdo_dblib, which doesn't have a param_hook, and pdo_firebird, which seems to be using PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
* Fix #64705 errorInfo property of PDOException is null when ↵Ahmed Abdou2020-08-112-2/+18
| | | | | | | | | PDO::__construct() fails PDO driver constructors are throwing PdoException without setting errorInfo, so create a new reusable function that throws exceptions for PDO and will also set the errorInfo. Use this function in pdo_mysql, pdo_sqlite, and pdo_pgsql.
* Fix #79596: MySQL FLOAT truncates to int some localesChristoph M. Becker2020-05-151-0/+30
| | | | | We must not do locale aware float to string conversion here; instead we using our `snprintf()` implementation with the `F` specifier.
* Fix MySQL local infile / attr handling on big endian systemsguirish2020-04-161-2/+2
| | | | | | Make sure pointer types match what is used by libmysql everywhere. Closes GH-5380.
* Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-10-074-2/+8
|\ | | | | | | | | * PHP-7.2: Fix #78623: Regression caused by "SP call yields additional empty result set"
| * Fix #78623: Regression caused by "SP call yields additional empty result set"Christoph M. Becker2019-10-074-2/+8
| | | | | | | | This reverts commit 41a4379cb45419a376043ca5f8c5a2bca82cea7c.
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-09-034-8/+2
|\ \ | |/ | | | | | | * PHP-7.2: Fix #41997: SP call yields additional empty result set
| * Fix #41997: SP call yields additional empty result setChristoph M. Becker2019-09-034-8/+2
| | | | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-08-201-0/+58
|\ \ | |/ | | | | | | * 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/+58
| | | | | | | | _server_host
* | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-06-071-1/+4
|\ \ | |/
| * Enable STRICT_TRANS_TABLES in new testNikita Popov2019-06-071-1/+4
| | | | | | | | The part testing error cases relies on this.
* | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-06-073-4/+302
|\ \ | |/
| * Fixed bug #38546Cameron Porter2019-06-073-4/+302
| | | | | | | | | | | | Properly support binding boolean parameters with emulated prepared statements disabled. Also add the necessary mysqlnd support for MYSQL_TYPE_TINY.
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-04-292-89/+7
|\ \ | |/ | | | | | | * PHP-7.2: Fix tests
| * Fix testsChristoph M. Becker2019-04-292-89/+7
| | | | | | | | | | | | | | | | | | | | These tests are obviously meant to test successful and failing uri: DSNs, but did not pass proper file:// URIs, so actually ended up testing for invalid data source URIs twice. We fix this, and adjust the expectations accordingly. We also unfork the -win32 variant, since both test cases are almost identical, and the expected error message may be either one.
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-04-282-2/+2
|\ \ | |/ | | | | | | * PHP-7.2: Make MySQLPDOTest::extractVersion() more liberal
| * Make MySQLPDOTest::extractVersion() more liberalChristoph M. Becker2019-04-282-2/+2
| | | | | | | | | | | | | | | | | | | | | | MySQL/MariaDB version strings may have suffixes which may contain dots; for instance, Debian stretch has 5.5.5-10.1.37-MariaDB-0+deb9u1 or such. Therefore, we make the version extraction more liberal, and only require that there are at least three parts separated by dot, and ignore additional parts. We also fix an erroneous test expectation, which would be triggered on CI now, right away. This patch has been provided by petk@.
* | Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-04-271-1/+1
|\ \ | |/ | | | | | | * PHP-7.2: Fix #77944: Wrong meta pdo_type for bigint on LLP64
| * Fix #77944: Wrong meta pdo_type for bigint on LLP64Christoph M. Becker2019-04-271-1/+1
| | | | | | | | | | | | 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.
* | Merge branch 'PHP-7.2' into PHP-7.3Darek Slusarczyk2019-02-114-3/+69
|\ \ | |/
| * Merge branch 'PHP-7.1' into PHP-7.2Darek Slusarczyk2019-02-114-3/+69
| |\
| | * security fix - by default 'local infile' is disabled:Darek Slusarczyk2019-02-114-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | - 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-1540-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-149-20/+20
| | |
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+8
| | |
| | * Convert CRLF line endings to LFPeter Kokot2018-10-131-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1540-39/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-149-20/+20
| | |
| * | Sync leading and final newlines in source code filesPeter Kokot2018-10-142-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-8/+8
| | |
* | | Fixed bug #77289Lauri Kenttä2019-01-092-1/+45
| | | | | | | | | | | | | | | Use mysqlnd_restart_psession and mysqlnd_end_psession in PDO MySQL. This makes sure we free last_message while ZMM is still live.
* | | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1538-37/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-148-19/+19
| | |
* | | Sync leading and final newlines in source code filesPeter Kokot2018-10-142-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-131-2/+2
| | |
* | | Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-09-191-8/+8
|\ \ \ | |/ /
| * | Merge branch 'PHP-7.1' into PHP-7.2Nikita Popov2018-09-191-8/+8
| |\ \ | | |/
| | * Fix getColumnMeta() testNikita Popov2018-09-191-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Newer MySQL versions are stricter about invalid values. Three issues are fixed: * Don't use negative values with ZEROFILL. ZEROFILL implies UNSIGNED. * Use a legal TIMESTAMP value. TIMESTAMP does not accept a Unix timestamp. * Specify BIGINT values as strings, to avoid overflows. This is a cherry-pick of d2dc0a32911c0e08986da799ce11e18c3fa5ca57 from master.
| | * year++Xinchen Hui2018-01-025-5/+5
| | |
| * | year++Xinchen Hui2018-01-025-5/+5
| | |
* | | Trim trailing whitespaces in build filesPeter Kokot2018-07-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Some editors utilizing .editorconfig automatically trim whitespaces. For convenience this patch removes whitespaces in certain build files: - ext/*/config*.m4 - configure.ac - acinclude.m4
* | | Remove unused Git attributes identPeter Kokot2018-07-257-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Use zval_ptr_dtor() imstead of zval_dtor()Dmitry Stogov2018-07-051-1/+1
| | |
* | | Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-13/+13
| | | | | | | | | | | | where we sure about string persistence.
* | | Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2059-59/+59
| | | | | | | | | | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.