History log of /php-src/ext/pdo_odbc/odbc_driver.c (Results 1 – 25 of 106)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 2553ffea 02-Dec-2023 SakiTakamachi

add PDO::ATTR_AUTOCOMMIT to getAttribute

Signed-off-by: Gina Peter Banyard <girgias@php.net>


# 933dccb7 25-Nov-2023 SakiTakamachi

Fix GH-12767: Fixed to be able to change autocommit mode using setAttribute

Signed-off-by: Gina Peter Banyard <girgias@php.net>


# 866aa12b 04-Dec-2023 Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com>

ext/pdo: Fixed PDO::setAttribute() and PDO::getAttribute() (#12793)


# 5aeada0e 15-Nov-2023 Ilija Tovilo

Fix potentially uninitialized warning on release build


# bbe12229 04-Nov-2023 Saki Takamachi <34942839+SakiTakamachi@users.noreply.github.com>

Fix GH-12296: [odbc] [pdo_odbc] Optimized odbc connection string creating (#12306)

Declare and initialize on one line

changed to use php_memnistr

store strlen(db) in a vari

Fix GH-12296: [odbc] [pdo_odbc] Optimized odbc connection string creating (#12306)

Declare and initialize on one line

changed to use php_memnistr

store strlen(db) in a variable

Added a semicolon to the end of dsn.

If there is a semicolon at the end of the original dsn, it will be duplicated, so it will be removed.

Add condition when authentication information is null

show more ...


# c4c8d6ce 01-Mar-2023 nielsdos <7771979+nielsdos@users.noreply.github.com>

Fix missing and inconsistent error check on SQLAllocHandle

* Missing check: SQLAllocHandle() for the environment wasn't checked in
pdo_odbc_handle_factory(). Add a check similar to the

Fix missing and inconsistent error check on SQLAllocHandle

* Missing check: SQLAllocHandle() for the environment wasn't checked in
pdo_odbc_handle_factory(). Add a check similar to the other ones for
SQLAllocHandle().
* Inconsistent check: one of the SQLAllocHandle() calls wasn't checked
for SQL_SUCCESS_WITH_INFO. However, looking at the other uses and the
documentation we should probably check this as well.

Furthermore, since there was a mix of "SQLAllocHandle: reason" and
"SQLAllocHandle (reason)" in the error reporting, I made them
consistently use the first option as that seems to be the most used for
error reporting in this file.

Closes GH-10740.

show more ...


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23
# f3a14d1b 23-Aug-2022 Calvin Buckley

Fix GH-9347: Current ODBC liveness checks may be inadequate

We implement SQL_ATTR_CONNECTION_DEAD for ODBC and PDO_ODBC.

This is semantically appropriate and should be used whenever

Fix GH-9347: Current ODBC liveness checks may be inadequate

We implement SQL_ATTR_CONNECTION_DEAD for ODBC and PDO_ODBC.

This is semantically appropriate and should be used whenever the
driver supports it. In the event that it fails or says the connection
isn't dead (which may be inaccurate in some cases), try the old
heuristic.

Closes GH-9353.

show more ...

Revision tags: 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
# e7f6acd0 13-Jun-2022 Christoph M. Becker

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix handling of single-key connection strings


# 4b8bbfb6 13-Jun-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix handling of single-key connection strings


# 445d9502 10-Jun-2022 Calvin Buckley

Fix handling of single-key connection strings

A connection string may contain just a single key, but
PHP used ";" as the heuristic to detect if a string was a connection
string versu

Fix handling of single-key connection strings

A connection string may contain just a single key, but
PHP used ";" as the heuristic to detect if a string was a connection
string versus plain DSN. However, a single-key connection string
would get treated like a DSN name, i.e. "DSN=*LOCAL". This makes it
so that "=" is used, as a connection string must contain a key.

Closes GH-8748.

show more ...

Revision tags: 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
# 2920a266 22-Apr-2022 Calvin Buckley

Quote when adding to connection string in (PDO_)ODBC

Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the

Quote when adding to connection string in (PDO_)ODBC

Because the UID= and PWD= values are appended to the SQLDriverConnect
case when credentials are passed, we have to append them to the string
in case users are relying on this behaviour. However, they must be
quoted, or the arguments will be invalid (or possibly more injected).
This means users had to quote arguments or append credentials to the raw
connection string themselves.

It seems that ODBC quoting rules are consistent enough (and that
Microsoft trusts them enough to encode into the .NET BCL) that we can
actually check if the string is already quoted (in case a user is
already quoting because of this not being fixed), and if not, apply the
appropriate ODBC quoting rules.

This is because the code exists in main/, and are shared between
both ODBC extensions, so it doesn't make sense for it to only exist
in one or the other. There may be a better spot for it.

Closes GH-8307.

show more ...

Revision tags: 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
# dfd2a80b 17-Feb-2022 Calvin Buckley

Fix #80909: crash with persistent connections in PDO_ODBC

When we have a complex connection string (more than a DSN), PHP
appends a UID and PWD if none are present and a username and pas

Fix #80909: crash with persistent connections in PDO_ODBC

When we have a complex connection string (more than a DSN), PHP
appends a UID and PWD if none are present and a username and password
are called, so SQLDriverConnect works as expected.

However, it seems spprintf doesn't allocate with persistence if
required. As a result, it'll be considering leaking and crash PHP on
free when a persistent connection is used.

Closes GH-8110.

show more ...

Revision tags: 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, php-7.4.22, 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
# 207666ee 07-May-2021 Calvin Buckley

Implement server type/version for PDO_ODBC getAttr (#6935)

As an example using the IBM Db2i ODBC driver:

PDO::ATTR_SERVER_INFO: DB2/400 SQL
PDO::ATTR_SERVER_VERSION: 07.

Implement server type/version for PDO_ODBC getAttr (#6935)

As an example using the IBM Db2i ODBC driver:

PDO::ATTR_SERVER_INFO: DB2/400 SQL
PDO::ATTR_SERVER_VERSION: 07.02.0015

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
# 28a66b3f 23-Mar-2021 Calvin Buckley

Check liveness in PDO_ODBC

PDO drivers allow for it, and procedural ODBC has its own facility
for it, but PDO_ODBC doesn't. If a connection is severed (for example,
on IBM i, ending

Check liveness in PDO_ODBC

PDO drivers allow for it, and procedural ODBC has its own facility
for it, but PDO_ODBC doesn't. If a connection is severed (for example,
on IBM i, ending a databse job, or killing the network connection
elsewhere), a persistent connection could get stuck. This adapts the
procedural ODBC code to PDO for handling connection liveness, so PDO
can reconnect if needed.

A discussion about the method to check liveness is linked; this might
not be the best method, but it's what procedural ODBC uses, so it's
consistent.

Closes GH-6805.

show more ...

Revision tags: php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, 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)

# ebaeb93c 15-Mar-2021 George Peter Banyard

Add API to fetch bool value for PDO attribute values

Closes GH-6766

# 94ea8e24 18-Jan-2021 George Peter Banyard

Refactor PDO doer handler to use zend_string

# 1a58611a 24-Dec-2020 George Peter Banyard

Voidify PDO's fetch_error handler

# 60a61afd 24-Dec-2020 George Peter Banyard

Boolify PDO's preparer handler

# 53ba72ec 24-Dec-2020 George Peter Banyard

Voidify PDO's closer handler

# 43f69160 23-Dec-2020 George Peter Banyard

Boolify PDO's set_attribute driver function

# d04adf60 23-Dec-2020 George Peter Banyard

Boolify PDO's transaction handlers

This includes begin(), commit(), rollBack(), and inTransaction()

# 2d51c203 11-Dec-2020 Nikita Popov

PDO: Store/pass query_string as zend_string

Rather than storing char* + size_t, use a zend_string*. Also
avoid various copies of the query string.

12345