Commit Graph

115 Commits

Author SHA1 Message Date
Marcus Boerger
e610f5959f - s/FETCH_PROPSLATE/FETCH_PROPS_LATE/ as per IRC discussion 2006-02-24 16:04:13 +00:00
Marcus Boerger
252ad86917 - Add FETCH_PROPSLATE: fetch props after calling ctor
# Fixes bug #36428
2006-02-24 15:56:03 +00:00
Dmitry Stogov
0f1209ab3d Portable unicode string API:
- use the same type (int) for zval.value.usr.len and zval.value.str.len
  - use union "zstr" as char*/UChar* mixture instead of void*
  - Z_UNISTR() and Z_UNILEN() no longer check for Z_TYPE()
  - nuke int32_t from ZE (not finisned)
2006-02-21 20:12:43 +00:00
Andi Gutmans
1efe984d08 - Get rid of using ENFORCE_SAFE_MODE. 2006-02-19 04:29:42 +00:00
Dmitry Stogov
09ca61c125 Made server wide switch for unicode on/off (according to PDM). 2006-02-13 10:23:59 +00:00
Antony Dovgal
d7393d2d02 fix build 2006-02-01 09:10:23 +00:00
Ilia Alshanetsky
c064a9e243 MFB51: Fixed bug #36222 (errorInfo in PDOException is always NULL). 2006-01-31 17:21:25 +00:00
foobar
251c5173fd bump year and license version 2006-01-01 13:10:10 +00:00
Dmitry Stogov
b863d32288 Fixed memory corruption and termination through _zend_bailout() 2005-12-23 09:41:31 +00:00
foobar
a208d9a966 - Nuke php3 legacy 2005-12-06 02:28:26 +00:00
foobar
4851c062fb fix typo 2005-12-05 22:40:31 +00:00
foobar
130333274b - Do not use the PHP3 era names! 2005-12-05 22:38:17 +00:00
Antony Dovgal
c7631a2dca fix #35543 (php crash when calling non existing method of a class that extends PDO) 2005-12-04 11:40:52 +00:00
Ilia Alshanetsky
40b2772dcd MFB51: Fixed bug #35358 (Incorrect error messages for PDO class constants). 2005-11-24 16:22:27 +00:00
Ilia Alshanetsky
9979ac2215 MFB51: Fixed bug #35303 (PDO prepare() crashes with invalid parameters). 2005-11-20 20:07:38 +00:00
Antony Dovgal
9f4390ce8b fix #35293 (PDO segfaults when using persistent connections) 2005-11-19 16:39:47 +00:00
Dmitry Stogov
1bedfbeb24 Unicode support 2005-10-12 12:13:54 +00:00
Ilia Alshanetsky
19b334a08a Fixed memory leak. 2005-10-03 03:53:57 +00:00
Marcus Boerger
3e0c56aac2 - Fix PDOException base
- MFH PDO::getAvailableDrivers()
- Fix compiler warnings
2005-10-02 20:32:17 +00:00
Marcus Boerger
a39841e57d - Allow to check for default statment class 2005-10-02 18:45:59 +00:00
Marcus Boerger
8ece2140cb - Add ability to change default statement class for PDO::execute()/query() 2005-10-02 18:32:05 +00:00
Ilia Alshanetsky
75555bc472 Allow overloading of PDO constructor. 2005-09-20 19:52:05 +00:00
Marcus Boerger
97bedcc064 - Provide helper function to avoid TSRM issues with exception base and root 2005-09-20 18:46:15 +00:00
Dmitry Stogov
140b23620b ZTS fix 2005-09-20 06:17:30 +00:00
Ilia Alshanetsky
3953b14024 Make PDO use class constants 2005-09-20 00:33:42 +00:00
Marcus Boerger
2568c8a0cb - More TSRM fixes 2005-09-19 18:17:39 +00:00
Wez Furlong
434fa24dfa Merge changes from 5.1 branch.
Add compat header that allows PDO head to compile against PHP 5.0 and PHP 5.1.
2005-09-11 05:04:00 +00:00
Dmitry Stogov
f4b8f4e958 Unicode support cleanup 2005-08-23 09:33:46 +00:00
Andrei Zmievski
b477936661 And here. 2005-08-16 18:22:22 +00:00
Dmitry Stogov
27f39c6826 Unicode support 2005-08-16 16:29:16 +00:00
Dmitry Stogov
82a504721e Unicode support 2005-08-15 16:13:02 +00:00
Wez Furlong
f6276a2b8a zts fixes 2005-08-12 23:32:31 +00:00
Dmitry Stogov
21c1109e0c Unicode support 2005-08-12 11:29:33 +00:00
Wez Furlong
664ebfa499 expand oracle null handling compatability by offering the ability to convert
NULLs into empty strings as well as the other way around.  It still doesn't
help a great deal in the long run, but at least the option is there.

Make sure hash tables are nulled out to avoid double freeing them.
2005-07-12 02:40:59 +00:00
Ilia Alshanetsky
5fe5da90ea Safer way of allowing 'blank' user/pass.
# Thanks Wez.
2005-07-09 02:53:07 +00:00
Ilia Alshanetsky
0b1931a8ff Fix needed for PostgreSQL driver to allow $user & $pass to be supplied via
DSN as NULL.
2005-07-08 23:33:35 +00:00
Wez Furlong
49c1882837 Add a PDO_ATTR_STRINGIFY_FETCHES attribute, which is used to convert integer or
floating point values into strings during fetch.  This is a compatibility hack
for drivers that return native types rather than string representations.

We use this flag in the test suite to persuade postgres tests to pass.
2005-07-08 04:13:00 +00:00
Wez Furlong
da7d537d49 populate the new dbh->driver field.
Implement PDO_ATTR_DRIVER_NAME.
2005-07-07 17:08:01 +00:00
Dmitry Stogov
0eb0b781e0 Fixed memory leaks 2005-07-07 11:19:56 +00:00
Wez Furlong
13ac7169af and the lesson is, test everything before you commit at 2am 2005-06-11 12:36:12 +00:00
Wez Furlong
f124c2086e couple of conceptual errors here 2005-06-11 02:50:20 +00:00
Wez Furlong
49e7b3da4c Fix a dumb bug that would effecively ignore persistent connections and create a
new one each time.

Add a hook for persistent connections: it is called when the object goes out of
scope, and offers the driver an opportunity to release per-request scoped data
at the right time.

This hook is used by pdo_sqlite to unregister UDFs, which are dangerous to keep
registered between requests.
2005-06-10 05:47:55 +00:00
Wez Furlong
5c16028eb5 initialize type of function 2005-06-10 04:03:43 +00:00
Marcus Boerger
9b3929a7e9 - Need to make PDO::__construct() final to prevent SEGV it isn't called 1st 2005-05-26 18:36:18 +00:00
Ilia Alshanetsky
3be50385ab Allocation checks around persistent allocs that can fail. 2005-04-28 00:25:25 +00:00
Marcus Boerger
c9108bba25 - Simplify code (only implement handlers that are necessary)
- Fix handling of read only property 'queryString'
- Fix overloading
- Move class init code to their defining .c files for simplification
- Mark class PDORow as final until there's a need to inherit this and
  someone implements the handlers correct then.
2005-03-21 00:29:06 +00:00
Wez Furlong
f7ebff804d "thou shalt not throw exceptions except in really exceptional circumstances."
The only allowed places to throw them directly are from within the PDO class
constructors or when dealing with transaction level attributes, where
"hard-failure" is a feature.

All other errors should use the PDO error handling mechanism and respect the
users selected error mode.
2005-03-09 05:50:03 +00:00
Wez Furlong
de1d8b91f0 prep package file for release.
fix my favourite typo.
fix compile warnings
2005-03-09 05:03:58 +00:00
Marcus Boerger
eb330a95f6 - Fix warning 2005-02-28 18:44:14 +00:00
Marcus Boerger
d072f6de54 - Changing handler table definitively results in SEGVs 2005-02-28 18:40:02 +00:00