Commit Graph

491 Commits

Author SHA1 Message Date
Antony Dovgal
1b602e85d1 fix leak appearing on phpinfo() when there are no PDO modules available 2006-06-05 22:08:16 +00:00
Antony Dovgal
e4a3732c91 no need to call zend_is_callable() if callable is known to be invalid
free fname on failure and plug possible leak
2006-05-30 09:46:59 +00:00
Antony Dovgal
e2afb33e87 fix skip reason 2006-05-17 10:12:36 +00:00
Marcus Boerger
7bbab02633 - MFH
. Fix iterator based access
  . Add new attribute ATTR_DEFAULT_FETCH_MODE: $bdh->setAttribute()
  . Add new fetch mode: FETCH_PROPS_LATE, this fills object member
    variables after calling the constructor (fixes #36428).
2006-05-11 22:43:44 +00:00
Marcus Boerger
bf9f762b4d - MFH: add new test 2006-05-11 22:17:42 +00:00
Marcus Boerger
11f26c2c2a - Tweak version check 2006-05-09 23:54:48 +00:00
Sara Golemon
7e6beb9f28 Note addition of new class constants 2006-05-04 00:21:51 +00:00
Sara Golemon
91999f1175 mfh(r-1.129) Expose PARAM_EVT_* constants 2006-05-03 21:58:38 +00:00
Wez Furlong
7614368f8a prep for pecl release 2006-05-02 02:32:40 +00:00
Antony Dovgal
ea53739d30 MFB: don't segfault if an exception has been thrown from the fetch handler 2006-04-22 19:10:53 +00:00
Wez Furlong
687e6ffc58 Add "ATTR_EMULATE_PREPARES" general attribute to replace the custom
attributes employed by mysql and postgres drivers.
No functional change.
2006-04-09 08:05:01 +00:00
Antony Dovgal
08e6fded56 prevent possible NULL dereference 2006-03-28 20:19:44 +00:00
Wez Furlong
6387d83a05 add a test case for bug 35671 2006-03-28 16:47:35 +00:00
Wez Furlong
fb7d5bd780 The fix for #35332 caused #35671 (and thus PECL #6504).
Partially back out that fix and introduce an extra optional step for drivers to
canonicalize the "name" that is used for registering parameters.
2006-03-27 20:51:01 +00:00
Antony Dovgal
1ad4dd8795 return FALSE if driver doesn't support quoting (this is what docu says)
also fixed PECL bug #6365
2006-03-23 19:01:46 +00:00
Ilia Alshanetsky
3b1cb0e500 Added myself to PDO and PDO_MySQL credits
Added Wez to PDO_MySQL credits
Added Tony to Q&A team credits
Regenerated the credits file
2006-03-23 18:36:47 +00:00
Ilia Alshanetsky
4ccd89d147 Properly calculate the size of the result array. 2006-03-19 17:35:36 +00:00
Antony Dovgal
5c7c11c41d MFH: check stream for NULL before writing to it
remove unnecessary semicolons
2006-03-18 22:24:05 +00:00
Ilia Alshanetsky
92ba7cccad Fixed memory leak on unused bind var. 2006-03-15 15:25:50 +00:00
Marcus Boerger
6e93f3eb8f - MFH Proto fixes 2006-03-06 10:00:59 +00:00
Ilia Alshanetsky
6f66a63cda Fixed bug #36222 (errorInfo in PDOException is always NULL). 2006-01-31 17:20:32 +00:00
Ilia Alshanetsky
8fde2249c3 Properly rewrite queries where a bound parameter appears more then once. 2006-01-25 16:35:23 +00:00
Marcus Boerger
1d461a6bcc - MFH 2006-01-22 23:57:41 +00:00
Marcus Boerger
813a5651c1 - MFH Update test 2006-01-22 22:07:43 +00:00
Ilia Alshanetsky
64a7e46506 Fixed bug #35797 (segfault on PDOStatement::execute() with
zend.ze1_compatibility_mode = On).
2006-01-01 20:07:41 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
e3fd31503b bump the year and license version 2006-01-01 12:26:08 +00:00
Ilia Alshanetsky
2e50763315 Fixed memory corruption that affected pdo_sqlite2. 2005-12-24 17:41:04 +00:00
foobar
93d339bede touch with re2c 0.9.11 2005-12-18 20:01:22 +00:00
Ilia Alshanetsky
b83a0eb10c Fixed memory corruption when FETCH_LAZY mode is being used. 2005-12-17 20:00:00 +00:00
Ilia Alshanetsky
bdf9c4d15c Fixed bug #35694 (Improved error message for invalid fetch mode). 2005-12-15 22:33:02 +00:00
Marcus Boerger
9bb52c750c - MFH 2005-12-11 15:29:14 +00:00
Ilia Alshanetsky
24af85dfe9 Fixed memory leak 2005-12-07 01:29:14 +00:00
foobar
3e669bc950 MFH: nuke php3 legacy 2005-12-06 02:28:41 +00:00
foobar
f58f7f4e67 MFH: fix typo 2005-12-05 22:41:10 +00:00
foobar
66832decc5 MFH 2005-12-05 22:39:03 +00:00
Wez Furlong
17683295e4 switch to package2.xml 2005-12-04 22:34:26 +00:00
Antony Dovgal
d72347f7bc MFH: fix #35543 (php crash when calling non existing method of a class that extends PDO) 2005-12-04 11:41:13 +00:00
Antony Dovgal
06c57b7d55 tweak fix a bit
(by request of Wez)
2005-12-01 20:39:12 +00:00
foobar
b935f6f13a - Fix paths for --enable-gcov usage
# re2c -b -o ext/pdo/pdo_sql_parser.c ext/pdo/pdo_sql_parser.re
2005-12-01 20:28:27 +00:00
Antony Dovgal
59087fee52 MFH: fix #35508 (PDO fails when unknown fetch mode specified) 2005-12-01 19:59:58 +00:00
Wez Furlong
b15e33f85a prep for release 2005-11-28 06:39:53 +00:00
Wez Furlong
d0ea27b802 API for connection dependent objects to add/del refs to dbh's. 2005-11-28 05:23:22 +00:00
Wez Furlong
b4dd85ff46 update changelog here too 2005-11-27 21:18:24 +00:00
Wez Furlong
63dae4ee74 Fix #35431; LAZY fetch and fetchAll == crash.
Lazy makes no sense with fetchAll; disallow it.
2005-11-27 21:01:58 +00:00
Antony Dovgal
6543134dea MFH: fix #35430 (PDO crashes on incorrect FETCH_FUNC use) 2005-11-27 21:01:02 +00:00
Wez Furlong
ef08c58664 update the todo list 2005-11-26 21:29:31 +00:00
Wez Furlong
ab6a675131 going to release 1.0.1 2005-11-26 21:22:49 +00:00
Wez Furlong
426fb96cc9 Doh, need to canonicalize parameter names (by prefixing with :) before
attempting to remap them to positional args.
2005-11-26 21:20:52 +00:00
Wez Furlong
85ad81736c set to 1.0 stable. 2005-11-26 20:50:08 +00:00
foobar
366832fbd2 MFH: Fixed wrong usage of ZEND_EXTENSION_API_NO (these are not Zend exts :) 2005-11-25 16:01:41 +00:00
Wez Furlong
7107105429 Update the TODO list. 2005-11-25 07:23:55 +00:00
Wez Furlong
17f504a0ec actually, bytea is not required for LOBs in postgres; good! 2005-11-25 03:37:01 +00:00
Wez Furlong
2256ec00ef PDO support for LOBs in the postgres driver currently assumes bytea columns. 2005-11-25 03:24:32 +00:00
Wez Furlong
2618322506 Bug: when stringify fetch mode is on, and the driver returns a string instead
of a stream for a LOB parameter, PDO would incorrectly return NULL for that
column.
2005-11-25 03:23:17 +00:00
Wez Furlong
c2d53719c2 Fix for #35332.
The problem is caused by the user mixing positional and named parameters.
PDO was blindly adding the parameters, unaware that the same parameters were
already allocated by position.

What we do now is register the parameter with the driver before adding it to
any hash.  This gives the driver an opportunity to normalize the name and
parameter number.  PDO can then ensure that only one entry is occupied in the
hash for a given parameter.
2005-11-25 00:29:04 +00:00
Wez Furlong
bb2f034eff well, what do you know, it does do something. 2005-11-25 00:20:12 +00:00
Wez Furlong
94ab6069b8 prep for release 2005-11-24 22:25:37 +00:00
Wez Furlong
dfdd1e4caf CLASSTYPE is an internal flag.
Closes PECL #5640.
2005-11-24 21:46:56 +00:00
Wez Furlong
2814b749ec Fix PECL Bug #6014; config fails on PHP 5.0.3 2005-11-24 21:38:09 +00:00
Ilia Alshanetsky
8e49bacf95 Fixed bug #35358 (Incorrect error messages for PDO class constants). 2005-11-24 16:21:43 +00:00
Ilia Alshanetsky
4020933726 Fixed bug #35303 (PDO prepare() crashes with invalid parameters). 2005-11-20 20:06:28 +00:00
Antony Dovgal
493c9fcf93 MFH: fix #35293 (PDO segfaults when using persistent connections) 2005-11-19 16:41:08 +00:00
Wez Furlong
0bd9518f8c Closes PECL #5944; binding an invalid parameter can lead to segfaults.
Modified patch provided by curt@php.net.
2005-11-16 06:32:33 +00:00
Ilia Alshanetsky
8e2de517bb Fixed bug #35135 (PDOStatment without related PDO object may crash). 2005-11-07 16:53:15 +00:00
Wez Furlong
58a14f225d Prep for PECL release 2005-11-01 02:44:11 +00:00
Marcus Boerger
24a80c3ebf - Fix remaining memleaks
# all tests pass for me now for the first time in:
# pgsql, mysql, sqlite, sqlite2
2005-10-31 07:47:40 +00:00
Wez Furlong
b74698f135 fix misinterpretation of data when overriding types via bindColumn.
Very slightly modified patch from Marcus.
2005-10-31 03:23:38 +00:00
Wez Furlong
40c24a65c4 improve test portability.
improve infrastructure for LOB support.
2005-10-31 02:07:38 +00:00
Marcus Boerger
e7494a7e9e - Fix memleak 2005-10-30 22:17:52 +00:00
Wez Furlong
0139cd0e53 Closes PECL Bug #5772; FETCH_FUNC broken for mixed case function names 2005-10-29 03:11:46 +00:00
Wez Furlong
7af8089096 Closes PECL #5809; PDOStatement::execute(array(...)) would modify its args.
It should behave like bindValue() not bindParam().
2005-10-29 03:01:19 +00:00
Wez Furlong
588d88960c clean up the test2 table that some tests create 2005-10-29 02:58:24 +00:00
Antony Dovgal
a9cac89541 MFH: commit forgotten part 2005-10-27 19:39:38 +00:00
Wez Furlong
dcd7879556 fixes PECL Bug #5589 2005-10-27 03:51:23 +00:00
Dan Scott
97ec02ce81 Test PDO::ATTR_CASE attribute. 2005-10-26 23:09:06 +00:00
Dan Scott
f987de46b4 Correct non-standard SQL. Standard SQL would define "DEFAULT NULL" -- but
that is the default value if the DEFAULT clause is omitted anyways.
2005-10-26 06:23:12 +00:00
Antony Dovgal
2af3190a3d use correct enum type for the arg 2005-10-25 16:02:33 +00:00
Ilia Alshanetsky
6b46a441cd Fixed compiler warning 2005-10-25 03:53:25 +00:00
Wez Furlong
ea544cf38f Closes PECL Bug #5750; uri: dsn is not handled correctly.
Patch from curt@php.net
2005-10-23 04:10:20 +00:00
Marcus Boerger
001f506533 - MFH SPL example was changed, so change PDO test accordingly 2005-10-13 19:49:59 +00:00
Marcus Boerger
491674bea6 - Do not try to autoload the class, use internal only 2005-10-13 18:37:19 +00:00
Ilia Alshanetsky
a5fe9808aa MFH: Fixed bug #34809 (FETCH_INTO in PDO crashes without a destination object). 2005-10-10 14:44:16 +00:00
Marcus Boerger
470da4e960 - MFH Add new test 2005-10-07 23:23:44 +00:00
Antony Dovgal
b33c2d9b17 nuke unused variable 2005-10-05 22:17:38 +00:00
Derick Rethans
3abc925a8a - Committing some changes that make PDO+SPL not crash anymore. These are done
by Marcus. and I'm committing them in order to actually use PHP 5.1 without
segfaulting when apache starts. This is not necessary the best solution.
2005-10-05 13:51:46 +00:00
Marcus Boerger
0a50368580 - Add optional dep for SPL under windows too 2005-10-04 07:47:11 +00:00
Marcus Boerger
4d631ec31b - Add optional dependency to SPL 2005-10-04 07:44:56 +00:00
Antony Dovgal
ffe605f2ed free cls_methods correctly and fix segfault on shutdown
(no bug entry and MFB, though..)
2005-10-03 23:27:26 +00:00
Marcus Boerger
0a2e6f723e - MFH change require to require_once 2005-10-03 15:06:27 +00:00
Ilia Alshanetsky
9a0bed9863 MFH: Fixed memory leak. 2005-10-03 03:54:06 +00:00
Wez Furlong
612dab64ee fix type 2005-10-03 00:55:23 +00:00
Wez Furlong
a750f195cd Fix Bug #34687; error information from query() not passed back 2005-10-02 22:11:19 +00:00
Marcus Boerger
991a29cfd6 - MFH PDOException base 2005-10-02 20:38:18 +00:00
Marcus Boerger
ca9dd7d826 - Add PDO::setAttribute(PDO::ATTR_STATEMENT_CLASS) 2005-10-02 20:07:11 +00:00
Wez Furlong
932346c00f Allow compilation with PHP 5.0.x
Closes PECL #5514
2005-10-01 02:48:11 +00:00
Wez Furlong
4f7d14f8d9 a test for bug #34630 2005-09-24 18:54:50 +00:00
Edin Kadribasic
4566f48777 Build PDO and SQLite as shared 2005-09-24 15:13:13 +00:00
Edin Kadribasic
35b7ad00a6 Declare functions used by driver as PDO_API in php_pdo_driver.h 2005-09-24 14:18:01 +00:00
Marcus Boerger
f3c44f6065 - MFH Fixed Bug #34590 User defined PDOStatement class can't implement
methods
- Reimplement Traversable interface
# If there is a problem with this i need a backtrace. As far as i can
# tell by gdb/valgrind/logic there is no error here. But missuse leads to
# the same error report casing the exclusion of interface Traversable.
2005-09-21 22:58:39 +00:00