Commit Graph

410 Commits

Author SHA1 Message Date
Remi Collet
407ad28ae5 Fix Bug #63171 Script hangs after max_execution_time
If aborted via timer expiration, don't try to call any unixODBC function
which may hangs because of internal locks
2016-03-17 13:38:45 +01:00
Anatol Belski
90ad6e3c6c add test for bug #47803 2016-02-24 11:49:02 +01:00
Anatol Belski
ff115e285a Fixed bug #47803
Executing prepared statements is succesfull only for the first two statements

The reworked patch descends to the bug #69526 which is fixed by
this as well. The broken logic in the current code was, that
SQLDescribeParam was executed in odbc_execute every time. This piece
is now moved into odbc_prepare and the results are carried on in an
additional structure.

Since the ext/odbc headers are not being currently installed and the
corresponding structs like odbc_result are not used outside ext/odbc,
the binary compatibility persists. Executing SQLDescribeParam only once
in odbc_prepare is also an optimization as the filds usually won't
change that fast and thus requestind the descriptions on every
execution is not required.
2016-02-24 11:40:35 +01:00
Anatol Belski
9623d2dd83 make ext/odbc test credentials configurable 2016-02-23 14:21:04 +01:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Christoph M. Becker
344ff5dd4c fixed fix #69975 wrt. ODBCVER < 0x0300 2015-07-03 13:30:39 +02: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
Frederic Marchal
f505d11207 Fixed bug #69381 out of memory with sage odbc driver
This is just a hotfix as there are still drivers with no full
ODBC 3.x support. This patch origins from bug #68350 which was
solved by the proper 3.0 migration, another driver (Sage)
turned out to have the real issue.
2015-04-28 15:08:53 +02:00
Anatol Belski
e09febb286 fix column name attribute with ODBC 3.0 2015-04-17 17:10:46 +02:00
Anatol Belski
db1596c8b1 migrate SQLAllocStmt for ODBC 3.0 compliance 2015-04-17 17:06:00 +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
d27d9158c9 further ODBC 3.0 compliance 2015-04-04 21:42:33 +02:00
Anatol Belski
5c2aa71e0c more compliance with the ODBC 3.0 2015-04-04 21:42:17 +02:00
Anatol Belski
a5bb37117c test fixes 2015-04-04 21:42:08 +02:00
Remi Collet
1174b399ad revert a4157423934edf7b8fdbcee163cced9bfd5748a, fix build odbc as shared 2015-03-25 10:33:08 +01:00
Lior Kaplan
6f5ed34d20 Print checking message for all ODBC drivers
This makes the output more readble in case no ODBC driver was selected
2015-03-22 22:03:38 -07:00
Lior Kaplan
7a41574239 Change default option of ODBC drivers to no to enable bulding standalone ODBC 2015-03-22 22:03:29 -07:00
Anatol Belski
a759c40872 cosmetic fix to default odbcver 2015-03-23 00:07:09 +01:00
Remi Collet
89f86119d6 Fix odbc build as shared
Broken since a41aa46759
2015-03-08 07:34:51 +01:00
Anatol Belski
9bf95d8291 fix setting default ODBCVER value in config.w32 2015-02-06 19:59:14 +01:00
Anatol Belski
a41aa46759 Fixed bug #68964 Allowed memory size exhausted with odbc_exec
This is done in two steps:

- the ODBCVER has to be rased to 0x0300 which corresponds to Sql
  Server 9, otherwise the client will not recognize several SQL
  datatypes

- additionally the config scripts was tweaked so then ODBCVER
  can be overridden, that still allows enabling compatibility
  with lower versions

Bug #67437 might be fixed by this as well.
2015-02-06 19:00:27 +01:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08: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
ab4c4c3970 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Undo inadvertent commit of php_version
  Corrected patch for bug #60616
2014-07-30 02:34:46 +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
Keyur Govande
90f99d47c0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fix bug #60616 (odbc_fetch_into returns junk at end of multi-byte char fields)
2014-07-28 23:16:20 +00:00
Keyur Govande
00546bc9b7 Fix bug #60616 (odbc_fetch_into returns junk at end of multi-byte char fields)
The ODBC extension did not support WVARCHAR. WVARCHAR ends up being handled by
the default handler where vallen is set by the driver to the actual bytes
needed for the field. If it is larger than default-lrl then the output is
corrupted (reading past the buffer) because the return functions don't expect
that to happen. The patch add support to handle WVARCHAR just like a regular
VARCHAR.
2014-07-28 23:15:23 +00:00
Xinchen Hui
47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui
c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Yasuo Ohgaki
bd1d2d8fb0 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters
2013-10-26 10:42:18 +09:00
Yasuo Ohgaki
e50eb1ce34 Fixed bug #65950 Field name truncation if the field name is bigger than 32 characters 2013-10-26 10:31:21 +09:00
Stanislav Malyshev
1794291ebe Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Use pkg-config to detect iodbc
2013-08-18 14:16:24 -07:00
Ole Markus With
a3fa25e857 Use pkg-config to detect iodbc 2013-08-18 14:16:17 -07:00
Veres Lajos
144eab0889 code related typo fixes 2013-08-18 13:46:32 -07:00
Christopher Jones
c6d977dd39 Fix long-standing visual pain point: the misalignment of './configure help' text.
Whitespace changes and a couple of grammar fixes.
2013-08-06 11:06:09 -07:00
Veres Lajos
e9a95d78ef typo fixes 2013-07-15 00:23:03 -07:00
Veres Lajos
72085b0e5f typo fixes 2013-07-15 00:18:57 -07:00
Felipe Pena
8776555d7a - Fixed bug #61387 (NULL valued anonymous column causes segfault in odbc_fetch_array) patch by: Brandon Kirsch 2013-06-24 14:43:35 -03:00
Stanislav Malyshev
ac40c0b562 Merge branch 'pull-request/341'
* pull-request/341: (23 commits)
  typofixes
2013-06-10 14:20:18 -07:00
Xinchen Hui
0a7395e009 Happy New Year 2013-01-01 16:28:54 +08:00
Johannes Schlüter
5e23a047ac Merge branch 'PHP-5.3' into PHP-5.4
* PHP-5.3:
  Remove extra ;
2012-06-22 17:33:22 +02:00
Johannes Schlüter
a62d4e2c43 Remove extra ; 2012-06-22 17:32:46 +02:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281 - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
23e438594d - Make usage of new PHP_FE_END macro 2011-07-25 11:42:53 +00:00
Felipe Pena
4b30846b50 - Make usage of new PHP_FE_END macro 2011-07-25 11:35:02 +00:00
Felipe Pena
32b5f8a1a3 - Added new parameter parsing option (p - for valid path (string without null byte in the middle))
# The tests will be fixed in the next commits
2011-06-06 21:28:16 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00