History log of /php-src/ext/pdo_odbc/odbc_stmt.c (Results 1 – 25 of 97)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 11accb5c 25-Jun-2024 Arnaud Le Blanc

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Preferably include from build dir (#13516)

* Include from build dir first

This fixes out of tree builds by ensuring that configure artifacts are included
from the build dir.

Before, out of tree builds would preferably include files from the src dir, as
the include path was defined as follows (ignoring includes from ext/ and sapi/) :

-I$(top_builddir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/main
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM
-I$(top_builddir)/

As a result, an out of tree build would include configure artifacts such as
`main/php_config.h` from the src dir.

After this change, the include path is defined as follows:

-I$(top_builddir)/main
-I$(top_builddir)
-I$(top_srcdir)/main
-I$(top_srcdir)
-I$(top_builddir)/TSRM
-I$(top_builddir)/Zend
-I$(top_srcdir)/Zend
-I$(top_srcdir)/TSRM

* Fix extension include path for out of tree builds

* Include config.h with the brackets form

`#include "config.h"` searches in the directory containing the including-file
before any other include path. This can include the wrong config.h when building
out of tree and a config.h exists in the source tree.

Using `#include <config.h>` uses exclusively the include path, and gives
priority to the build dir.

show more ...


# c15f5a2a 04-Jun-2024 Calvin Buckley

Remove use of SDWORD and SWORD in ODBC extensions (GH-14457)

* Remove usage of SDWORD, replace with SQLINTEGER

Some different driver managers disagree if this should be 4 or 8 bytes

Remove use of SDWORD and SWORD in ODBC extensions (GH-14457)

* Remove usage of SDWORD, replace with SQLINTEGER

Some different driver managers disagree if this should be 4 or 8 bytes
in size. SQLGetDiagRec expects this to be an SQLINTEGER, so we should
just use that explicitly instead of hoping that it's the same size.

Fixes GH-14367

* Replace SWORD with SQLSMALLINT

While this hasn't caused issues like the SQLINTEGER/SDWORD confusion
has, we should use what SQLDescrimeParam calls for, which is
SQLSMALLINT.

show more ...


# df481ef9 03-Jun-2024 Peter Kokot

Simplify PDO include paths (#14444)

PDO include paths can be simplified and synced as done in other
extensions: either the project root directory or the phpincludedir (for
the system

Simplify PDO include paths (#14444)

PDO include paths can be simplified and synced as done in other
extensions: either the project root directory or the phpincludedir (for
the system installation). The 'ext' include is automatically appended
when doing phpize build. In php-src it is only present on Windows build.
The PHP_CHECK_PDO_INCLUDES is left intact working as before and checks
if PDO headers are found.

show more ...


# f5aaa8f1 18-Oct-2022 Christoph M. Becker

Fix GH-9372: HY010 when binding overlong parameter

If `SQLPutData()` *fails*, we should not call `SQLParamData()` again,
because that yields the confusing `HY010` (Function sequence erro

Fix GH-9372: HY010 when binding overlong parameter

If `SQLPutData()` *fails*, we should not call `SQLParamData()` again,
because that yields the confusing `HY010` (Function sequence error).
Instead we properly handle `SQLPutData()` errors.

For the given case (paramter length > column length), some drivers let
`SQLPutData()` fail, while others do not. Either behavior seems to
conform to the ODBC specification. Anyhow, we do not want to silently
truncate the given parameter, since that would break the behavior for
drivers which do not fail, but still don't simply truncate the given
parameter. So it is finally up to userland to avoid passing overlong
parameters – with this patch they at least get useful information about
the actual issue.

Closes GH-9541.

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1, php-8.0.21, php-8.1.8, php-8.2.0alpha3, php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3, php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1, php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9
# 19061e3b 28-Jul-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #81252: PDO_ODBC doesn't account for SQL_NO_TOTAL


# 3244e078 28-Jul-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #81252: PDO_ODBC doesn't account for SQL_NO_TOTAL


Revision tags: php-7.4.22
# 98049e8b 21-Jul-2021 Christoph M. Becker

Fix #81252: PDO_ODBC doesn't account for SQL_NO_TOTAL

If `P->len` is negative (not only when it is `SQL_NULL_DATA`), we must
not go on, because the following code can't deal with that.

Fix #81252: PDO_ODBC doesn't account for SQL_NO_TOTAL

If `P->len` is negative (not only when it is `SQL_NULL_DATA`), we must
not go on, because the following code can't deal with that. This means
that the output parameter will be set to `NULL` without any indication
what went wrong, but it's still better than crashing.

Closes GH-7295.

show more ...

Revision tags: php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1
# 320d6050 12-May-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #44643: bound parameters ignore explicit type definitions


# 63c558bc 12-May-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #44643: bound parameters ignore explicit type definitions


# 23a3bbb4 11-May-2021 Christoph M. Becker

Fix #44643: bound parameters ignore explicit type definitions

If `SQLDescribeParam()` fails for a parameter, we must not assume
`SQL_LONGVARCHAR` for any param which is not `PDO_PARAM_LO

Fix #44643: bound parameters ignore explicit type definitions

If `SQLDescribeParam()` fails for a parameter, we must not assume
`SQL_LONGVARCHAR` for any param which is not `PDO_PARAM_LOB`. At least
mapping `PDO_PARAM_INT` to `SQL_INTEGER` should be safe, and not
introduce a BC break.

Closes GH-6973.

show more ...

# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1
# 513ad979 08-Apr-2021 Remi Collet

Merge branch 'PHP-8.0'

* PHP-8.0:
Improve fix for #80783


# f421ebc0 08-Apr-2021 Remi Collet

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Improve fix for #80783


# 25f5a1b2 08-Apr-2021 Remi Collet

Improve fix for #80783

# 02fdf9fd 18-Mar-2021 Christoph M. Becker

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte


# 97cfdcd7 18-Mar-2021 Christoph M. Becker

Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
Fix #80783: PDO ODBC truncates BLOB records at every 256th byte


Revision tags: php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16
# bccca0b5 25-Feb-2021 Christoph M. Becker

Fix #80783: PDO ODBC truncates BLOB records at every 256th byte

It is not guaranteed, that the driver inserts only a single NUL byte at
the end of the buffer. Apparently, there is no wa

Fix #80783: PDO ODBC truncates BLOB records at every 256th byte

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.

show more ...

Revision tags: php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1
# 34e39eba 14-Dec-2020 Nikita Popov

Fix signed/unsigned warnings in PDO ODBC

Add add skipif to test.

(cherry picked from commit aa58db723221ec891d4432621003bfa55dc15edf)

# 128082c8 17-Mar-2021 Christoph M. Becker

Initalize return_value before use

Otherwise we likely segfault[1]. We fix the same issue for
PDO_Firebird as well.

[1] <https://ci.appveyor.com/project/php/php-src/builds/38267

Initalize return_value before use

Otherwise we likely segfault[1]. We fix the same issue for
PDO_Firebird as well.

[1] <https://ci.appveyor.com/project/php/php-src/builds/38267250/job/6y3ngn1k6ryxx6j3?fullLog=true#L9783>

Closes GH-6785.

show more ...

# caa71003 17-Dec-2020 Nikita Popov

Rewrite PDO result binding

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, allo

Rewrite PDO result binding

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 ;)

show more ...

# aa58db72 14-Dec-2020 Nikita Popov

Fix signed/unsigned warnings in PDO ODBC

Add add skipif to test.

Revision tags: php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20
# 38177dcb 24-Jun-2020 Christoph M. Becker

Properly initialize displaysize

From Microsoft's `SQLColAttribute()` documentation[1]:

| Please note that some drivers may only write the lower 32-bit or
| 16-bit of a buffer an

Properly initialize displaysize

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>

show more ...

Revision tags: php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.4.6, php-7.2.31, php-7.4.6RC1, php-7.3.18RC1, php-7.2.30, php-7.4.5, php-7.3.17, php-7.4.5RC1, php-7.3.17RC1, php-7.3.18, php-7.4.4, php-7.2.29, php-7.3.16, php-7.4.4RC1, php-7.3.16RC1, php-7.4.3, php-7.2.28
# 72737b06 17-Feb-2020 Christoph M. Becker

Merge branch 'PHP-7.4'

* PHP-7.4:
Fix #79038: PDOStatement::nextRowset() leaks column values


# 3090c88f 17-Feb-2020 Christoph M. Becker

Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
Fix #79038: PDOStatement::nextRowset() leaks column values


1234