summaryrefslogtreecommitdiff
path: root/ext/odbc
Commit message (Collapse)AuthorAgeFilesLines
* Improve class entry generationMáté Kocsis2021-02-161-1/+0
| | | | Related to GH-6701
* Generate class entries from stubs for oci8, odbc, openssl, pcntl, pdo, pgsqlMáté Kocsis2021-02-142-2/+3
| | | | Closes GH-6691
* Deprecate passing null to non-nullable arg of internal functionNikita Popov2021-02-111-0/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* Replace zend_bool uses with boolNikita Popov2021-01-151-2/+2
| | | | | | | 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.
* Fix #80592: all floats are the same in ODBC parametersChristoph M. Becker2021-01-062-5/+37
| | | | | | We must not release the strings until we are done with them. Closes GH-6579.
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-291-1/+1
|\ | | | | | | | | * PHP-7.4: Fix format specifier
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-291-1/+1
| |\ | | | | | | | | | | | | * PHP-7.3: Fix format specifier
| | * Fix format specifierChristoph M. Becker2020-10-291-1/+1
| | | | | | | | | | | | In this function, `i` is of type `size_t`.
* | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-10-292-4/+84
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #44618: Fetching may rely on uninitialized data
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-292-4/+84
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #44618: Fetching may rely on uninitialized data
| | * Fix #44618: Fetching may rely on uninitialized dataChristoph M. Becker2020-10-292-4/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | Unless `SQLGetData()` returns `SQL_SUCCESS` or `SQL_SUCCESS_WITH_INFO`, the `StrLen_or_IndPtr` output argument is not guaranteed to be properly set. Thus we handle retrieval failure other than `SQL_ERROR` by yielding `false` for those column values and raising a warning. Closes GH-6281.
* | | Update ext/odbc parameter namesChristoph M. Becker2020-10-132-138/+138
| | | | | | | | | | | | Closes GH-6303.
* | | Change parameters types from int to boolChristoph M. Becker2020-10-123-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | These are typical boolean parameters, so we shouldn't advertize them as integers. For the `$reverse` parameter that even fixes expectations, because the `reverse` member is a bitfield of 1 bit, so assigning any even integer would not set it. Closes GH-6328.
* | | Don't separate array parameterChristoph M. Becker2020-10-051-91/+65
| | | | | | | | | | | | Closes GH-6243.
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-10-052-0/+28
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #46050: odbc_next_result corrupts prepared resource
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-10-052-0/+28
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #46050: odbc_next_result corrupts prepared resource
| | * Fix #46050: odbc_next_result corrupts prepared resourceChristoph M. Becker2020-10-052-0/+28
| | | | | | | | | | | | When resetting the result's values, we also have to reset its numcols.
* | | Revert "Use external iterator instead of via the internal pointer"Christoph M. Becker2020-09-301-5/+17
| | | | | | | | | | | | | | | | | | This reverts commit a6ecafece90909d74a578e09f626e875d3035eab. Closes GH-6242.
* | | Fix recently introduced off-by-one errorChristoph M. Becker2020-09-291-1/+1
| | |
* | | Remove unused variableNikita Popov2020-09-291-5/+0
| | |
* | | Use external iterator instead of via the internal pointerChristoph M. Becker2020-09-291-17/+5
| | |
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-292-1/+27
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80152: odbc_execute() moves internal pointer of $params
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-292-1/+27
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80152: odbc_execute() moves internal pointer of $params
| | * Fix #80152: odbc_execute() moves internal pointer of $paramsChristoph M. Becker2020-09-292-1/+27
| | | | | | | | | | | | | | | | | | As least intrusive fix, we separate the passed array argument. Closes GH-6219.
* | | Fix #22986: odbc_connect() may reuse persistent connectionChristoph M. Becker2020-09-291-48/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `odbc_connect()` should not reuse persistent connections, since that prohibits multiple concurrent connections, which are occasionally desireable. We fix that by no longer looking for already cached connections when `odbc_connect()` is called, and instead creating a new connection instead. Closes GH-6223.
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-291-11/+11
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80150: Failure to fetch error message
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-291-11/+11
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80150: Failure to fetch error message
| | * Fix #80150: Failure to fetch error messageChristoph M. Becker2020-09-291-11/+11
| | | | | | | | | | | | | | | | | | | | | In case of statement related errors, we need to pass the respective statement handle to `SQLError()`. Closes GH-6217.
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-252-0/+28
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80147: BINARY strings may not be properly zero-terminated
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-252-0/+28
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #80147: BINARY strings may not be properly zero-terminated
| | * Fix #80147: BINARY strings may not be properly zero-terminatedChristoph M. Becker2020-09-252-0/+28
| | | | | | | | | | | | | | | | | | | | | We have to manually ensure that all strings fetched from a data source are zero-terminated. Closes GH-6213.
* | | Rename $qualifier/$owner params to $catalog/$schemaChristoph M. Becker2020-09-252-30/+30
| | | | | | | | | | | | | | | | | | | | | These have been called qualifier and owner with ODBC 2, but ODBC 3 changed that to catalog and schema, respectively. Closes GH-6210.
* | | Update ext/odbc stub hashMáté Kocsis2020-09-251-1/+1
| | |
* | | Remove outdated link to bug reportChristoph M. Becker2020-09-241-1/+0
| | | | | | | | | | | | That bug has been fixed, so no need to keep that link any longer.
* | | Fix UNKNOWN default values in ext/odbcMáté Kocsis2020-09-245-73/+69
| | | | | | | | | | | | Closes GH-6154
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-241-3/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Use proper skipif section
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-241-3/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Use proper skipif section
| | * Use proper skipif sectionChristoph M. Becker2020-09-241-3/+1
| | | | | | | | | | | | | | | The ODBC tests have to be skipped if no connection to the server can be established.
* | | Merge branch 'PHP-7.4' into masterChristoph M. Becker2020-09-244-4/+20
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #78470: odbc_specialcolumns() no longer accepts $nullable
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-09-242-1/+16
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #78470: odbc_specialcolumns() no longer accepts $nullable
| | * Fix #78470: odbc_specialcolumns() no longer accepts $nullableChristoph M. Becker2020-09-242-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is mandatory to pass either `SQL_NO_NULLS` or `SQL_NULLABLE` as tenth parameter to `SQLSpecialColumns()`; otherwise the function call fails. Therefore the user must be allowed to pass the desired value as parameter to `odbc_specialcolumns()` again. Closes GH-6200.
* | | Fix test for cases where data sources are availableChristoph M. Becker2020-09-241-1/+0
| | | | | | | | | | | | | | | That `bool(false)` is a relict of adapting the test expectations to the warning promotions.
* | | Run tidyNikita Popov2020-09-183-10/+10
| | | | | | | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | | Fix compilation warnings in odbcNikita Popov2020-09-171-52/+51
| | | | | | | | | | | | SQLCHAR* cast all the things.
* | | Generate arginfosMáté Kocsis2020-09-161-2/+2
| | |
* | | Display string default values in stubs more uniformlyMáté Kocsis2020-09-161-1/+1
| | | | | | | | | | | | Settling on using quoted string
* | | Promote warning to Error in ODBC extensionGeorge Peter Banyard2020-09-152-30/+35
| | | | | | | | | | | | Closes GH-6123
* | | Move custom type checks to ZPPMáté Kocsis2020-09-023-19/+16
| | | | | | | | | | | | Closes GH-6034
* | | Add a few missing types to stubsMáté Kocsis2020-08-012-3/+6
| | |
* | | Remove proto comments from C filesMax Semenik2020-07-061-108/+54
| | | | | | | | | | | | Closes GH-5758