summaryrefslogtreecommitdiff
path: root/ext/pdo_dblib
Commit message (Collapse)AuthorAgeFilesLines
* Add API to fetch bool value for PDO attribute valuesGeorge Peter Banyard2021-03-171-1/+5
| | | | Closes GH-6766
* Use standard PDO way for fetching integer attribute valuesGeorge Peter Banyard2021-03-171-4/+17
|
* Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-111-1/+3
| | | | | | | | | | | | | | | | | | | | | This deprecates passing null to non-nullable scale arguments of internal functions, with the eventual goal of making the behavior consistent with userland functions, where null is never accepted for non-nullable arguments. This change is expected to cause quite a lot of fallout. In most cases, calling code should be adjusted to avoid passing null. In some cases, PHP should be adjusted to make some function arguments nullable. I have already fixed a number of functions before landing this, but feel free to file a bug if you encounter a function that doesn't accept null, but probably should. (The rule of thumb for this to be applicable is that the function must have special behavior for 0 or "", which is distinct from the natural behavior of the parameter.) RFC: https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg Closes GH-6475.
* Refactor PDO's last inserted ID handler to use and return zend_stringGeorge Peter Banyard2021-01-191-4/+8
| | | | Closes GH-6617
* Refactor PDO doer handler to use zend_stringGeorge Peter Banyard2021-01-191-2/+2
|
* Replace zend_bool uses with boolNikita Popov2021-01-151-1/+1
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Remove flakiness from testsAdam Baratz2021-01-132-9/+1
|
* Add MSSQL setup to Azure Pipelines buildAdam Baratz2021-01-114-3/+14
|
* Refactor PDO's quoter handler to return a zend_stringGeorge Peter Banyard2021-01-071-16/+16
| | | | Closes GH-6547
* Voidify PDO's fetch_error handlerGeorge Peter Banyard2021-01-061-4/+2
|
* Boolify PDO's preparer handlerGeorge Peter Banyard2021-01-061-2/+2
|
* Voidify PDO's closer handlerGeorge Peter Banyard2021-01-061-2/+1
|
* Boolify PDO's quoter handlerGeorge Peter Banyard2021-01-061-2/+2
|
* Boolify PDO's set_attribute driver functionGeorge Peter Banyard2021-01-061-7/+7
|
* Boolify PDO's transaction handlersGeorge Peter Banyard2021-01-061-8/+8
| | | | This includes begin(), commit(), rollBack(), and inTransaction()
* Rewrite PDO result bindingNikita Popov2020-12-221-57/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Instead of requiring the type to be determined in advance by the describer function and then requiring get_col to return a buffer of appropriate type, allow get_col to return an arbitrary zval. See UPGRADING.INTERNALS for a more detailed description of the change. This makes the result fetching simpler, more efficient and more flexible. The general possibility already existed via the special PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or inefficient. Now it's possible to easily implement behavior like "return int if it fits, otherwise string" and to avoid any kind of complex management of temporary buffers. This also fixes bug #40913 (our second highest voted bug of all time, for some reason). PARAM_LOB result bindings will now consistently return a stream resource, independently of the used database driver. I've tried my best to update all PDO drivers for this change, but some of the changes may be broken, as I cannot test or even build some of these drivers (in particular PDO dblib and PDO oci). Fixes are appreciated -- a working CI setup would be even more appreciated ;)
* PDO: Store/pass query_string as zend_stringNikita Popov2020-12-142-3/+3
| | | | | Rather than storing char* + size_t, use a zend_string*. Also avoid various copies of the query string.
* Fix MHANDLEFUNC signatureNikita Popov2020-12-142-2/+2
| | | | The last parameter is int, not short int.
* Allow building dblib with machine-dependent libdirNikita Popov2020-12-141-26/+16
| | | | | | | Use the same approach as for GMP: If no explicit directory is given, assume it must be on the default include path and libdir. Otherwise use the provided path. It does not look like libsybdb has support for pkg-config.
* Add GC support for PDO driver dataNikita Popov2020-10-121-1/+2
| | | | | | | | | Add a get_gc method that can be implemented by drivers, which can be used to add additional zvals to the GC buffer. Implement GC support for PDO SQLite callbacks in particular. Closes GH-6262.
* Get rid of empty function entriesMáté Kocsis2020-08-011-5/+1
| | | | Closes GH-5917
* Fix [-Wundef] warning in PDO DBLib extensionGeorge Peter Banyard2020-05-205-11/+11
|
* Skip test if bigint type is unsupported by active TDS versionAdam Baratz2020-05-081-0/+1
|
* Set non-default error mode to maintain expected behaviorAdam Baratz2020-05-081-2/+4
|
* Update FreeTDS version detection related to bug #72969Adam Baratz2020-05-081-13/+3
|
* Reindent phpt filesNikita Popov2020-02-034-65/+65
|
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-255-10/+0
| | | | Closes GH-4732.
* Fix typoNikita Popov2019-09-091-1/+1
|
* Fix double free of DSN credentialsNikita Popov2019-09-091-2/+2
|
* Remove some unused HAVE_* symbolsPeter Kokot2019-07-211-5/+3
| | | | | | | | | - HAVE_NET_SNMP removed via cab643f615d4f592778b7234dabed772d5d66866 - HAVE_CRYPTO_AEAD_AES256GCM ad120c5ae93b49aeb4661b84f981beda2b31cde8 - Remove HAVE_FREETDS and HAVE_LIBDNET_STUB (not used in current extension; copy paste from other removed extensions) Closes GH-4448
* 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
* 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
* PDO: support username & password specified in DSNSjon Hortensius2019-07-021-0/+10
|
* Normalize comments in *nix build system m4 filesPeter Kokot2019-05-121-2/+0
| | | | | | | | | 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
* Remove extension readmesPeter Kokot2019-03-191-23/+0
| | | | | This patch removes several extension readmes in favor of the PHP manual and where possible.
* Replace dirname(__FILE__) by __DIR__ in testsFabien Villepinte2019-03-1519-38/+38
|
* Switch to use ZTS cacheDmitry Stogov2019-03-124-6/+13
|
* Add AS_HELP_STRING to *nix build configure optionsPeter Kokot2019-03-071-2/+4
| | | | | | | | 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
* Remove local variablesPeter Kokot2019-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-151-1/+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 testsGabriel Caruso2018-10-141-1/+1
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-141-1/+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-281-0/+0
| | | | | This patch syncs file permissions accross the PHP source code files since these don't need to be executable.
* Trim trailing whitespaces in build filesPeter Kokot2018-07-291-1/+1
| | | | | | | | 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-14/+1
| | | | | | | | | | | | | | | 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.
* year++Xinchen Hui2018-01-025-5/+5
|
* Turn "pdo_stmt_methods" into constants.Dmitry Stogov2017-12-142-2/+2
|
* Move constants into read-only data segmentDmitry Stogov2017-12-143-4/+4
|
* Treat DATETIME2 columns like DATETIMEfandrieu2017-11-103-0/+45
|