Commit Graph

10 Commits

Author SHA1 Message Date
Anatol Belski
90ad6e3c6c add test for bug #47803 2016-02-24 11:49:02 +01:00
Anatol Belski
9623d2dd83 make ext/odbc test credentials configurable 2016-02-23 14:21:04 +01:00
Christoph M. Becker
16db4d1462 Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
The SQL Server Native Client 11.0 and maybe other ODBC drivers report
NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0. This causes too small a
buffer to be emalloc'd, likely causing a segfault in the following. As we don't
know the real size of the column data, we treat such colums as
SQL_WLONGVARCHAR.

The related bug #67437 suggests that some drivers report a size of ~4GB. It is
not certain that this is really the case (there might be some integer overflow
involved, and anyway, there has been no feedback), so we do not cater for this
now. However, it would not be hard to treat all sizes above a certain threshold
in a similar way, i.e. as SQL_WLONGVARCHAR.
2015-07-03 00:15:47 +02:00
Anatol Belski
7eda18514d added test for bug #69354 2015-04-04 21:42:51 +02:00
Anatol Belski
0ae0d0bc53 revert skipif, this should run everywhere 2015-04-04 21:42:43 +02:00
Anatol Belski
a5bb37117c test fixes 2015-04-04 21:42:08 +02:00
Keyur Govande
df9078ea55 Fix for bug #68087 (ODBC not reading DATE columns correctly)
Temporary variable indicating column field type ID should be
reset to default for loop iteration (i.e. every column in the
record set. The old buggy code made it persist across all columns
leading to invalid reads from the buffer, if for example a DATE
column was preceded by a VARCHAR column.
2014-10-07 21:17:36 +00:00
Keyur Govande
65364fe7d0 Corrected patch for bug #60616
For unixODBC, use ODBC version as defined by it (as of v2.2.14 it is 3.5).
This allows us to use newer features like SQL_DESC_OCTET_LENGTH (which
returns the number of bytes required to store the data). This fixes the issue
in #60616. If the newer version is not available, over-allocate to accomodate
4-byte Unicode characters for CHAR and VARCHAR datatypes (and their Wide
counterparts).
version.
Fixed a couple of failing tests.
2014-07-30 02:28:31 +00:00
Felipe Pena
3201292cd3 - New tests 2009-05-14 01:28:58 +00:00
Felipe Pena
13a3092fce - Starting tests for this extension 2009-05-11 03:09:59 +00:00