Christoph M. Becker
f674a3343c
Fix #80592 : all floats are the same in ODBC parameters
...
We must not release the strings until we are done with them.
Closes GH-6579.
2021-01-06 13:56:02 +01:00
Christoph M. Becker
489b5328c0
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix format specifier
2020-10-29 13:10:32 +01:00
Christoph M. Becker
dd97cb1665
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix format specifier
2020-10-29 13:09:19 +01:00
Christoph M. Becker
ee3227af48
Fix format specifier
...
In this function, `i` is of type `size_t`.
2020-10-29 13:08:16 +01:00
Christoph M. Becker
9838eff68b
Merge branch 'PHP-7.4' into PHP-8.0
...
* PHP-7.4:
Fix #44618 : Fetching may rely on uninitialized data
2020-10-29 12:03:11 +01:00
Christoph M. Becker
133ac0151b
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #44618 : Fetching may rely on uninitialized data
2020-10-29 12:00:57 +01:00
Christoph M. Becker
c21e901ba7
Fix #44618 : Fetching may rely on uninitialized data
...
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.
2020-10-29 11:59:12 +01:00
Christoph M. Becker
8d4774a2df
Change parameters types from int to bool
...
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.
2020-10-12 23:10:13 +02:00
Christoph M. Becker
3eae7aa77e
Don't separate array parameter
...
Closes GH-6243.
2020-10-05 23:11:36 +02:00
Christoph M. Becker
9fe5479eeb
Merge branch 'PHP-7.4' into master
...
* PHP-7.4:
Fix #46050 : odbc_next_result corrupts prepared resource
2020-10-05 17:48:44 +02:00
Christoph M. Becker
c6e7969f05
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #46050 : odbc_next_result corrupts prepared resource
2020-10-05 17:47:35 +02:00
Christoph M. Becker
69ba81d183
Fix #46050 : odbc_next_result corrupts prepared resource
...
When resetting the result's values, we also have to reset its numcols.
2020-10-05 17:46:37 +02:00
Christoph M. Becker
07fa13088e
Revert "Use external iterator instead of via the internal pointer"
...
This reverts commit a6ecafece9
.
Closes GH-6242.
2020-09-30 01:23:16 +02:00
Christoph M. Becker
a1ee3c74d1
Fix recently introduced off-by-one error
2020-09-29 18:46:07 +02:00
Nikita Popov
82f0d3c181
Remove unused variable
2020-09-29 12:35:39 +02:00
Christoph M. Becker
a6ecafece9
Use external iterator instead of via the internal pointer
2020-09-29 11:41:17 +02:00
Christoph M. Becker
a0051be42a
Merge branch 'PHP-7.4' into master
...
* PHP-7.4:
Fix #80152 : odbc_execute() moves internal pointer of $params
2020-09-29 11:36:54 +02:00
Christoph M. Becker
b87e43d931
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #80152 : odbc_execute() moves internal pointer of $params
2020-09-29 11:35:41 +02:00
Christoph M. Becker
bf5f07cc8b
Fix #80152 : odbc_execute() moves internal pointer of $params
...
As least intrusive fix, we separate the passed array argument.
Closes GH-6219.
2020-09-29 11:34:48 +02:00
Christoph M. Becker
9f5a77188c
Fix #22986 : odbc_connect() may reuse persistent connection
...
`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.
2020-09-29 11:20:41 +02:00
Christoph M. Becker
5f5eba1d7a
Merge branch 'PHP-7.4' into master
...
* PHP-7.4:
Fix #80150 : Failure to fetch error message
2020-09-29 11:05:31 +02:00
Christoph M. Becker
e08f69194c
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #80150 : Failure to fetch error message
2020-09-29 11:04:09 +02:00
Christoph M. Becker
df5efa2fcd
Fix #80150 : Failure to fetch error message
...
In case of statement related errors, we need to pass the respective
statement handle to `SQLError()`.
Closes GH-6217.
2020-09-29 11:02:51 +02:00
Christoph M. Becker
3d148804cc
Merge branch 'PHP-7.4' into master
...
* PHP-7.4:
Fix #80147 : BINARY strings may not be properly zero-terminated
2020-09-25 13:53:19 +02:00
Christoph M. Becker
1086e4ec88
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #80147 : BINARY strings may not be properly zero-terminated
2020-09-25 13:52:08 +02:00
Christoph M. Becker
a49555a9e1
Fix #80147 : BINARY strings may not be properly zero-terminated
...
We have to manually ensure that all strings fetched from a data source
are zero-terminated.
Closes GH-6213.
2020-09-25 13:51:18 +02:00
Máté Kocsis
9b50fd2626
Fix UNKNOWN default values in ext/odbc
...
Closes GH-6154
2020-09-24 22:17:04 +02:00
Christoph M. Becker
555e7eccc4
Merge branch 'PHP-7.4' into master
...
* PHP-7.4:
Fix #78470 : odbc_specialcolumns() no longer accepts $nullable
2020-09-24 12:23:37 +02:00
Christoph M. Becker
901d022001
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78470 : odbc_specialcolumns() no longer accepts $nullable
2020-09-24 12:16:54 +02:00
Christoph M. Becker
610e7d2c77
Fix #78470 : odbc_specialcolumns() no longer accepts $nullable
...
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.
2020-09-24 12:15:59 +02:00
Nikita Popov
d4e5b5b6fc
Fix compilation warnings in odbc
...
SQLCHAR* cast all the things.
2020-09-17 12:52:31 +02:00
George Peter Banyard
c1823c6c8a
Promote warning to Error in ODBC extension
...
Closes GH-6123
2020-09-15 12:50:00 +02:00
Máté Kocsis
3e800e997b
Move custom type checks to ZPP
...
Closes GH-6034
2020-09-02 11:11:38 +02:00
Max Semenik
2b5de6f839
Remove proto comments from C files
...
Closes GH-5758
2020-07-06 21:13:34 +02:00
Dmitry Stogov
2423288f0f
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed possible usage of uninitialized value
2020-05-27 11:27:34 +03:00
Dmitry Stogov
886a34b1cc
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed possible usage of uninitialized value
2020-05-27 11:26:25 +03:00
Dmitry Stogov
1f521a0b23
Fixed possible usage of uninitialized value
2020-05-27 11:25:18 +03:00
George Peter Banyard
85104fae37
Fix [-Wundef] warning in ODBC extension
2020-05-20 14:01:10 +02:00
Máté Kocsis
21cfa03f17
Generate function entries for another batch of extensions
...
Closes GH-5352
2020-04-05 21:15:30 +02:00
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places
2020-01-03 21:10:24 +01:00
Máté Kocsis
bbcfa66e06
Use RETURN_THROWS() after zend_fetch_resource*()
2020-01-03 19:20:56 +01:00
Máté Kocsis
7b4a4d2ace
Use RETURN_THROWS() after try_convert_to_string()
2020-01-03 17:04:06 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
...
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
...
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker
4669c53fcc
Don't explicitly set return value on ZFR failure in ext/odbc
...
Failing `zend_fetch_resource(2)` throws as of PHP 8.0.0, so explicitly
setting a return value is useless, and also slightly confusing.
2019-08-28 18:53:26 +02:00
Christoph M. Becker
8417bc19b8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78473 : odbc_close() closes arbitrary resources
2019-08-28 18:10:33 +02:00
Christoph M. Becker
35177027f4
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78473 : odbc_close() closes arbitrary resources
2019-08-28 17:58:35 +02:00
Christoph M. Becker
195b8ae779
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78473 : odbc_close() closes arbitrary resources
2019-08-28 17:57:10 +02:00
Christoph M. Becker
b557265816
Fix #78473 : odbc_close() closes arbitrary resources
...
We have to bail out, if an invalid resource is given. For consistency
with the other `zend_fetch_resource(2)` calls, we return `FALSE`.
2019-08-28 17:55:15 +02:00
Christoph M. Becker
0201a858d0
Add ext/odbc stubs
2019-08-28 17:05:28 +02:00