summaryrefslogtreecommitdiff
path: root/ext/pdo_odbc
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-03-183-2/+77
|\ | | | | | | | | * PHP-7.4: Fix #80783: PDO ODBC truncates BLOB records at every 256th byte
| * Fix #80783: PDO ODBC truncates BLOB records at every 256th byteChristoph M. Becker2021-03-183-2/+77
| | | | | | | | | | | | | | | | | | | | | | | | It is not guaranteed, that the driver inserts only a single NUL byte at the end of the buffer. Apparently, there is no way to find out the actual data length in the buffer after calling `SQLGetData()`, so we adjust after the next `SQLGetData()` call. We also prevent PDO::ODBC_ATTR_ASSUME_UTF8 from fetching garbage, by fetching all chunks with the same C type. Closes GH-6716.
* | Fix signed/unsigned warnings in PDO ODBCNikita Popov2021-03-173-13/+15
| | | | | | | | | | | | Add add skipif to test. (cherry picked from commit aa58db723221ec891d4432621003bfa55dc15edf)
* | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-282-1/+19
|\ \ | |/ | | | | | | * PHP-7.4: Fix #67465: NULL Pointer dereference in odbc_handle_preparer
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-282-1/+19
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #67465: NULL Pointer dereference in odbc_handle_preparer
| | * Fix #67465: NULL Pointer dereference in odbc_handle_preparerChristoph M. Becker2020-09-282-1/+19
| | | | | | | | | | | | | | | | | | We have to initialize `stmt->driver_data` before we use it. Closes GH-6225.
* | | Do not register quoter handler in ODBCGeorge Peter Banyard2020-09-281-3/+5
| | | | | | | | | | | | This functionallity is not (yet) implemented and therefore gives a bogus error while using PDO
* | | Consolidate the usage of "either" and "one of" in error messagesMáté Kocsis2020-09-201-1/+1
| | | | | | | | | | | | Closes GH-6173
* | | Run tidyNikita Popov2020-09-181-4/+4
| | | | | | | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | | Add many missing closing PHP tags to testsMáté Kocsis2020-08-092-0/+2
| | | | | | | | | | | | Closes GH-5958
* | | Get rid of empty function entriesMáté Kocsis2020-08-011-7/+1
| | | | | | | | | | | | Closes GH-5917
* | | Remove proto comments from C filesMax Semenik2020-07-061-4/+2
| | | | | | | | | | | | Closes GH-5758
* | | Properly initialize displaysizeChristoph M. Becker2020-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From Microsoft's `SQLColAttribute()` documentation[1]: | Please note that some drivers may only write the lower 32-bit or | 16-bit of a buffer and leave the higher-order bit unchanged. | Therefore, applications should initialize the value to 0 before | calling this function. [1] <https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlcolattribute-function>
* | | Fix MSVC level 1 (severe) warningsChristoph M. Becker2020-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fix (hopefully) all instances of: * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312> `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
* | | Fix [-Wundef] warning in PDO ODBC extensionGeorge Peter Banyard2020-05-201-17/+17
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-172-6/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79038: PDOStatement::nextRowset() leaks column values
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-172-6/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79038: PDOStatement::nextRowset() leaks column values
| | * Fix #79038: PDOStatement::nextRowset() leaks column valuesChristoph M. Becker2020-02-172-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Firstly, we must not rely on `stmt->column_count` when freeing the driver specific column values, but rather store the column count in the driver data. Since the column count is a `short`, 16 bit are sufficient, so we can store it in reserved bits of `pdo_odbc_stmt`. Furthermore, we must not allocate new column value storage when the statement is not executed, but rather when the column value storage has not been allocated. Finally, we have to introduce a driver specific `cursor_closer` to avoid that `::closeCursor()` calls `odbc_stmt_next_rowset()` which then frees the column value storage, because it may be still needed for bound columns.
| | * Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-152-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-141-1/+1
| | |
| | * Sync leading and final newlines in source code filesPeter Kokot2018-10-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Reindent phpt filesNikita Popov2020-02-032-35/+35
| | |
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-255-10/+0
| | | | | | | | | | | | Closes GH-4732.
* | | Merge branch 'PHP-7.4'Peter Kokot2019-07-141-4/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove conditional calls of always available macros
| * | Remove conditional calls of always available macrosPeter Kokot2019-07-141-4/+1
| | | | | | | | | | | | | | | | | | | | | These checks were once relevant for these extensions in PECL and PHP versions without availability of the checked macros. Closes GH-4405
* | | Merge branch 'PHP-7.4'Peter Kokot2019-07-081-16/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Simplify PHP_CHECK_PDO_INCLUDES calls
| * | Simplify PHP_CHECK_PDO_INCLUDES callsPeter Kokot2019-07-081-16/+1
| | | | | | | | | | | | | | | | | | | | | Conditional checks were once used for backwards compatibility with phpize from PHP versions that didn't have this macro call yet. Closes GH-4376
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-05-141-0/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Prevent further potential test conflicts
| * | Prevent further potential test conflictsChristoph M. Becker2019-05-141-0/+1
| | |
* | | Merge branch 'PHP-7.4'Peter Kokot2019-05-121-4/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Normalize comments in *nix build system m4 files
| * | Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Normalization include: - Use dnl for everything that can be ommitted when configure is built in favor of the shell comment character # which is visible in the output. - Line length normalized to 80 columns - Dots for most of the one line sentences - Macro definitions include similar pattern header comments now
* | | Merge branch 'PHP-7.4'Peter Kokot2019-03-151-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Replace dirname(__FILE__) by __DIR__ in tests
| * | Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-151-1/+1
| | |
* | | Merge branch 'PHP-7.4'Dmitry Stogov2019-03-121-16/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Cleanup unused module globals
| * | Cleanup unused module globalsDmitry Stogov2019-03-121-16/+0
| | |
* | | Merge branch 'PHP-7.4'Peter Kokot2019-03-071-20/+12
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add AS_HELP_STRING to *nix build configure options
| * | Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-20/+12
| | | | | | | | | | | | | | | | | | | | | | | | The Autoconf's default AS_HELP_STRING macro can properly format help strings [1] so watching out if columns are aligned manually is not anymore. [1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Pretty-Help-Strings
* | | Removed pdo_odbc.db2_instance_nameKalle Sommer Nielsen2019-03-011-34/+0
|/ /
* | updated typo in testRodrigo Prado2019-02-091-1/+1
| | | | | | | | User Group: PHPSP #phptestfestbrasil
* | Remove local variablesPeter Kokot2019-02-039-50/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Remove yearly range from copyright noticeZeev Suraski2019-01-305-5/+5
| |
* | Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-152-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-141-1/+1
| |
* | Trim trailing whitespace in testsGabriel Caruso2018-10-141-4/+4
| |
* | Sync leading and final newlines in source code filesPeter Kokot2018-10-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Change some permissions from 755 to 644Peter Kokot2018-08-283-0/+0
|/ | | | | This patch syncs file permissions accross the PHP source code files since these don't need to be executable.
* Fix minor Autoconf coding stylePeter Kokot2018-07-311-1/+1
| | | | | | This fixes two minor Autoconf coding styles. Double quotes in arguments don't need to be escaped. This removes warning given by autoreconf: - warning: back quotes and double quotes must not be escaped in...
* Trim trailing whitespaces in build filesPeter Kokot2018-07-291-5/+5
| | | | | | | | 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.
* Deprecate pdo_odbc.db2_instance_nameNikita Popov2018-07-211-0/+3
| | | | Part of https://wiki.php.net/rfc/deprecations_php_7_3.