Commit Graph

500 Commits

Author SHA1 Message Date
Dmitry Stogov
67d5f39a47 Persistent resources are "thread-local".
Register persistent resources through new functions zend_register_persistent_resource()/zend_register_persistent_resource_ex().
2017-11-01 15:19:31 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Kalle Sommer Nielsen
a35e39f1f7 ODBC Solid is not supported in our build system on Windows, so remove this #ifdef 2017-07-28 10:34:38 +02:00
Kalle Sommer Nielsen
398be731e6 Removed support for ODBCRouter 2017-07-28 10:31:48 +02:00
Kalle Sommer Nielsen
a398df3e36 Removed Bird(broken)step support from ODBC 2017-07-19 10:19:32 +02:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Kalle Sommer Nielsen
d4831e2d0a Eliminate win95nt.h
- Most of this is builtin php.h now
- Removed some dead defines
- We now pass /D _USE_MATH_DEFINES for M_PI etc
2016-12-22 06:51:18 +01:00
Kalle Sommer Nielsen
a569d003e2 Hmm actually it seems to be the other way around, Anatol? 2016-12-22 05:53:13 +01:00
Kalle Sommer Nielsen
34283026da Sync the default value of --with-odbcver with the hardcoded default for ODBCVER 2016-12-22 05:46:12 +01:00
Nikita Popov
5af586bec5 Remove more PHP 6 leftovers from tests 2016-11-24 22:39:39 +01:00
Anatol Belski
271a593198 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  avoid unneeded copying
2016-11-07 21:19:04 +01:00
Anatol Belski
0c2156d190 avoid unneeded copying 2016-11-07 21:09:03 +01:00
Anatol Belski
1257287dbd Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Add test for bug #73448
2016-11-07 20:40:46 +01:00
Anatol Belski
f0676cbe20 Add test for bug #73448 2016-11-07 20:39:51 +01:00
Anatol Belski
42925630a4 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73448 odbc_errormsg returns trash, always 513 bytes
2016-11-07 20:21:56 +01:00
Anatol Belski
3558e70e58 Fixed bug #73448 odbc_errormsg returns trash, always 513 bytes 2016-11-07 20:18:29 +01:00
Anatol Belski
4b9362d347 Increase ODBCVER to 3.5 by default 2016-07-04 16:48:59 +02:00
Dmitry Stogov
323b2733f6 Fixed compilation warnings 2016-06-22 00:40:50 +03:00
Remi Collet
2291ebc0ea Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  NEWS
  Fix Bug #63171 	Script hangs after max_execution_time
2016-03-17 13:42:34 +01:00
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
704a9aeea7 fix pointer truncation on 64 bit 2016-03-14 16:44:27 +01:00
Nikita Popov
1ac152938c Move semicolon into TSRMLS_CACHE_EXTERN/DEFINE
Also re bug #71575.
2016-03-03 16:50:01 +01:00
Anatol Belski
c9778d3eb9 Port patch and test for bug #47803 to 7.0
See ff115e285a
2016-02-24 12:03:21 +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
01e85f3fdc add test for bug #71171 2016-02-23 14:39:17 +01:00
Anatol Belski
cd75429ad8 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  make ext/odbc test credentials configurable
2016-02-23 14:22:06 +01:00
Anatol Belski
9623d2dd83 make ext/odbc test credentials configurable 2016-02-23 14:21:04 +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
Lior Kaplan
9131cf4924 Add missing variable from birdstep_commit() which got removed in e8fcd52ef 2015-09-03 18:46:07 +03:00
Anatol Belski
8c4bbf0f47 properly export ext/odbc globals 2015-08-02 13:05:10 +02:00
Anatol Belski
4e66cce87c switch to the unified globals accessor where appropriate 2015-07-29 13:26:35 +02:00
Christoph M. Becker
e75cf6b7e4 Merge branch 'PHP-5.6'
* PHP-5.6:
  fixed fix #69975 wrt. ODBCVER < 0x0300
2015-07-03 13:32:05 +02:00
Christoph M. Becker
344ff5dd4c fixed fix #69975 wrt. ODBCVER < 0x0300 2015-07-03 13:30:39 +02:00
Christoph M. Becker
caa539b481 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns
2015-07-03 00:25:03 +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
Dmitry Stogov
07e646f8ff Cleanup (avoid reallocation) 2015-07-02 19:09:37 +03:00
Dmitry Stogov
7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Rasmus Lerdorf
28d7bb97a1 Fix more proto comments 2015-06-23 17:46:20 -04: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
268eb1999b fix bug #69381
a simpler version is to be backported
2015-04-28 15:02:48 +02:00
Stanislav Malyshev
4eb375320e Merge branch 'pull-request/1239'
* pull-request/1239:
  fixes confusing SQLDescribeParam error message
2015-04-18 20:45:16 -07:00
Anatol Belski
8192d645db Merge branch 'PHP-5.6'
* PHP-5.6:
  fix column name attribute with ODBC 3.0
  migrate SQLAllocStmt for ODBC 3.0 compliance
2015-04-17 17:14:18 +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
Christoph M. Becker
d9de707311 fixes confusing SQLDescribeParam error message 2015-04-16 04:12:11 +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