Commit Graph

330 Commits

Author SHA1 Message Date
Christoph M. Becker
195b8ae779 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #78473: odbc_close() closes arbitrary resources
2019-08-28 17:57:10 +02:00
Christoph M. Becker
b557265816 Fix #78473: odbc_close() closes arbitrary resources
We have to bail out, if an invalid resource is given.  For consistency
with the other `zend_fetch_resource(2)` calls, we return `FALSE`.
2019-08-28 17:55:15 +02:00
Peter Kokot
82115849b3 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  [ci skip] Update NEWS
  [ci skip] Update NEWS
  fix bug #77079
2018-10-30 00:23:38 +01:00
Peter Kokot
b1de24e68c Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  [ci skip] Update NEWS
  fix bug #77079
2018-10-30 00:22:26 +01:00
Jon Allen
8775bead3a fix bug #77079 2018-10-30 00:19:07 +01:00
Peter Kokot
902d39a3a7 Trim trailing whitespace in source code files 2018-10-13 14:14:50 +02:00
Peter Kokot
7f6387b59a Trim trailing whitespace in source code files 2018-10-13 14:12:55 +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
Gabriel Caruso
8ca1f47a7a
Use variables that already received ZEND_NUM_ARGS() 2018-07-22 15:54:00 -03:00
Dmitry Stogov
0b90cf85a6 Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +03:00
Dmitry Stogov
524f5245c5 Avoid useless checks, using zend_string_efree(), in cases where the string is known to be a temporary allocated zend_string. 2018-05-08 17:30:15 +03:00
Gabriel Caruso
a09c851ca9
Remove, or fix, unused variables 2018-03-27 22:04:26 +02:00
Anatol Belski
23287a0a81 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #73725 Unable to retrieve value of varchar(max) type
2018-01-22 17:05:03 +01:00
Anatol Belski
e403e122cd Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #73725 Unable to retrieve value of varchar(max) type
2018-01-22 17:03:48 +01:00
Anatol Belski
2384ade53c Fixed bug #73725 Unable to retrieve value of varchar(max) type 2018-01-22 17:02:54 +01:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
ccd4716ec7 year++ 2018-01-02 12:53:31 +08:00
Anatol Belski
e68084780f Tell the diff by returning NULL, if system has no ODBC data sources 2017-12-20 22:32:54 +01:00
Dmitry Stogov
9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
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
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
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Anatol Belski
0c2156d190 avoid unneeded copying 2016-11-07 21:09:03 +01:00
Anatol Belski
3558e70e58 Fixed bug #73448 odbc_errormsg returns trash, always 513 bytes 2016-11-07 20:18:29 +01: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
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
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
Anatol Belski
8c4bbf0f47 properly export ext/odbc globals 2015-08-02 13:05:10 +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