Commit Graph

86 Commits

Author SHA1 Message Date
Nikita Popov
7807319b7c Fix typo 2019-09-09 14:24:26 +02:00
Nikita Popov
645b0372e3 Fix double free of DSN credentials 2019-09-09 10:10:41 +02:00
Sjon Hortensius
a7881df281 PDO: support username & password specified in DSN 2019-07-02 12:09:38 +02:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
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.
2018-07-25 00:53:25 +02:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
fandrieu
b760b46216 Expose TDS version as \PDO::DBLIB_ATTR_TDS_VERSION attribute on \PDO instance 2017-11-10 14:21:07 -05:00
fandrieu
b72af30a53 Fix #74243: allow locales.conf to drive datetime format
Add a driver attribute, PDO::DBLIB_ATTR_DATETIME_CONVERT, to control.
2017-10-31 17:52:59 -04:00
fandrieu
014fd21b48 Implemented request #69592: allow 0-column rowsets to be skipped automatically
This adds a new attribute PDO::DBLIB_ATTR_SKIP_EMPTY_ROWSETS to enable automatic
skipping of empty rowsets.

This happens with some SQL commands (like PRINT or SET): a rowset with 0 columns
is returned by the driver.

With this option enabled, 0 columns rowsets are automatically skipped, mirroring
the behavior of the deprecated mssql extension.

Credits go to MiRacLe-RPZ for developping and promoting this patch.
2017-10-17 14:16:38 -04:00
Adam Baratz
4afce8ec8c Add PDO parameter types for national character set strings 2017-03-20 18:25:50 -04:00
Adam Baratz
3817cba786 Style cleanup 2017-03-20 17:56:19 -04:00
Adam Baratz
9e18f1d4af Expose DB-Library version as \PDO::DBLIB_ATTR_VERSION attribute on \PDO instance 2017-01-27 18:38:56 -05:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Adam Baratz
d58231dda3 Add "Sent SQL" to debug dump for emulated prepares 2016-12-20 11:07:04 -05:00
Adam Baratz
6c692313af Remove PDOStatement::activeQueryString() 2016-12-20 11:06:38 -05:00
Adam Baratz
d98da850c4 Merge branch 'PHP-7.1'
* PHP-7.1:
  Remove noop param hook
  Clean up tabs and whitespace
2016-12-07 17:10:36 -05:00
Adam Baratz
e133a2dd78 Clean up tabs and whitespace 2016-12-07 17:08:51 -05:00
Adam Baratz
07e395a00d Revert "Remove PDOStatement::activeQueryString()"
This reverts commit 552c957500.
2016-11-17 11:25:31 -05:00
Adam Baratz
552c957500 Remove PDOStatement::activeQueryString() 2016-11-16 18:06:14 -05:00
Adam Baratz
83086d9a72 Add PDOStatement::activeQueryString() 2016-11-15 17:33:38 -05:00
Chris Kings-Lynne
48b5a1f9b9 Ignore potentially misleading dberr values
FreeTDS had a buggy behavior where it would pass invalid values:
https://sourceforge.net/p/freetds/bugs/59/

The fix for this issue -- bc22b2ef817fb5d102bd758111ff3634b39a1319 on their
repo -- was to always use SYBESMSG for dberr. This makes it so the existing
pdo_dblib code would work as is. But by ignoring the dberr value in this
function, it will behave correctly, even with older versions of FreeTDS.
2016-09-26 17:07:46 -04:00
Adam Baratz
b29ad29b91 Move dtor before memory freed to avoid invalid read 2016-09-21 12:00:19 -04:00
Adam Baratz
0de333bd62 Adjust error formatting so ext/pdo/tests/bug_43130.phpt passes with pdo_dblib 2016-09-13 16:43:33 -04:00
Adam Baratz
69eef8c361 Free error and message strings when cleaning up PDO instances that use pdo_dblib 2016-09-13 16:43:30 -04:00
Adam Baratz
9cdf2042bd Allow \PDO::setAttribute() to set pdo_dblib query timeouts 2016-09-13 16:13:26 -04:00
Adam Baratz
2302eef5c9 Never quote values as raw binary data
This reverts a1a18fca6e which was intended to fix
bug #52885. That commit introduced a BC break which wasn't universally
desirable. The issue of quoting binary data (or NVARCHAR strings, or other
nonstandard types) will have to be addressed separately.
2016-09-12 17:32:50 -04:00
Stanislav Malyshev
b5f9427ca9 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Recognize TDS versions 7.3 and 7.4
2016-09-05 00:29:18 -07:00
Alexander Zhuravlev
a000bff2c3 pdo_dblib: stringify uniqidentifier field
Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE

pdo_dblib: Stringify uniqidentifier field

Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE

Tests added.

pdo_dblib: Stringify uniqidentifier field

Keep old 5.6 behavior: return Uniqidentifier value as 36-byte hex string (not binary),
when PDO::ATTR_STRINGIFY_FETCHES is TRUE

Tests fix.

pdo_dblib: Stringify uniqueidentifier field Added separate PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER attribute instead of PDO::ATTR_STRINGIFY_FETCHES.

pdo_dblib: Stringify uniqueidentifier field Added `getAttribute` support for PDO::DBLIB_ATTR_STRINGIFY_UNIQUEIDENTIFIER.

Simplify storage of stringify_uniqueidentifier attribute
2016-08-25 19:37:21 +02:00
Lior Kaplan
283ee1f6dc Recognize TDS versions 7.3 and 7.4 2016-08-07 15:15:59 +03:00
Adam Baratz
f22bc6438d Use size_t instead of int for loop counter 2016-07-05 16:09:27 +02:00
Adam Baratz
ed3edc2f05 fix bug #71667 (emulate how mssql extension names "computed" columns) 2016-04-06 14:41:55 +02:00
Adam Baratz
8a92fed532 Add driver-specific attributes for controlling calls to dbsetlogintime() and dbsettime() 2016-04-05 18:18:37 +02:00
Adam Baratz
9fcfc18ca9 Fix #71943: dblib_handle_quoter needs to allocate an extra byte 2016-04-04 17:33:49 +02:00
Anatol Belski
f806fedd80 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  fix leaks and add one more NULL check
  add NULL check
  fix C89 compat
  fix arg type
2016-02-29 15:48:51 +01:00
Anatol Belski
efaafd45b4 fix C89 compat 2016-02-29 15:24:31 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Stanislav Malyshev
dfe6aea9ca size_t cleanup for PDO 2015-01-26 16:16:02 -08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
STANLEY SUFFICOOL
a1a18fca6e Fixed Bug #52885 - PDO_DBLIB: Binary data may be truncated
Data containing characters in conflict with the server
codepage or containing null char will throw an error.
Implement binary quoting to allow binding of binary values.
2014-10-24 20:10:04 -07:00
STANLEY SUFFICOOL
560649283c Implement Bug #66062 - pdo_dblib enable timeout parameter 2014-10-22 23:17:28 -07:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00
Anatol Belski
4ed156d4df ported from pdo - pgsql, odbc, mysql, firebirt, dblib 2014-08-19 19:02:07 +02:00
Anatol Belski
63d3f0b844 basic macro replacements, all at once 2014-08-19 08:07:31 +02:00
Dmitry Stogov
050d7e38ad Cleanup (1-st round) 2014-04-15 15:40:40 +04:00