Sara Golemon
0d6603d22a
Expose PARAM_EVT_* constants
2006-05-03 21:57:58 +00:00
Frank M. Kromann
954199c9fb
More ZSTR() fixes
2006-04-29 14:53:26 +00:00
Antony Dovgal
22d4fb98e3
don't segfault if an exception has been thrown from the fetch handler
2006-04-22 19:10:40 +00:00
Antony Dovgal
036fc47efb
fix possible NULL dereference
2006-03-27 16:43:02 +00:00
Dmitry Stogov
159bfd55e1
Unicode support
2006-03-27 10:25:35 +00:00
Antony Dovgal
4b33fba3f5
return FALSE if driver doesn't support quoting and returns 0
...
also fixes PECL bug #6365
2006-03-23 19:03:30 +00:00
Ilia Alshanetsky
96afde2af7
MFB51:
...
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:39:12 +00:00
Marcus Boerger
dd4f59c9c0
- Drop PDO::setDefaultFetchMode()
2006-03-20 22:18:15 +00:00
Marcus Boerger
ee3a559a58
- WS
2006-03-20 22:17:41 +00:00
Marcus Boerger
56ed3211a6
- Added PDO_ATTR_DEFAULT_FETCH_MODE which controls the default fetch mode
2006-03-20 20:54:34 +00:00
Antony Dovgal
6fd8aaae87
this check should be present in HEAD as well, no only in 5_1
2006-03-19 22:57:47 +00:00
Marcus Boerger
1aeff811c0
- Make all compile without errors/warnings
2006-03-19 20:57:53 +00:00
Marcus Boerger
3273a5eab9
- Little reordering now and disable a bit of tony's code to make it compile again
2006-03-19 20:53:58 +00:00
Marcus Boerger
6154b639ed
- Handle attributes in dbh ctor (jean pütz aka tony)
2006-03-19 20:33:51 +00:00
Marcus Boerger
98ddfbba1a
- CS
2006-03-19 20:26:20 +00:00
Marcus Boerger
ef6d420aad
- Explicitly make the default default FETCH_BOTH
2006-03-19 20:08:29 +00:00
Marcus Boerger
786d78f683
- Prevent default fetch mode (0) from passing down to actual fetching and
...
make it behave like FETCH_BOTH which is the intended overall default
2006-03-19 19:46:18 +00:00
Marcus Boerger
31409d3bed
- Must use > 0 here (decrement after check)
2006-03-19 19:05:28 +00:00
Marcus Boerger
74dd417dfe
- Simplify, default mode transfer also in prepare
2006-03-19 19:04:32 +00:00
Ilia Alshanetsky
d6118f1b6e
MFB51: Properly calculate the size of the result array.
2006-03-19 17:35:56 +00:00
Marcus Boerger
e20ff8009b
- Need to change Pierre's patch abit
2006-03-18 23:35:34 +00:00
Marcus Boerger
88c4284df7
- Add test
2006-03-18 23:13:43 +00:00
Marcus Boerger
d82abbf8d4
- Add PDO::setDEfaultFetchMode() (Pierre)
2006-03-18 23:10:40 +00:00
Marcus Boerger
637443e794
- Simplify
2006-03-18 23:09:47 +00:00
Antony Dovgal
8ff44542ff
check stream for NULL before writing to it
...
remove unnecessary semicolons
2006-03-18 22:25:29 +00:00
Ilia Alshanetsky
111046ceed
MFB51: Fixed memory leak on unused bind var.
2006-03-15 15:27:08 +00:00
Pierre Joye
bb1ec86f9d
- remove magic_quotes_gpc, magic_quotes_runtime, magic_quotes_sybase
...
(calling ini_set('magic_....') returns 0|false
- get_magic_quotes_gpc, get_magic_quotes_runtime are kept but always return false
- set_magic_quotes_runtime raises an E_CORE_ERROR
2006-03-08 00:43:32 +00:00
Marcus Boerger
18f1439b32
- Proto fixes
2006-03-06 10:03:25 +00:00
Dmitry Stogov
c366cc6d1a
Nuke int32_t (everywhere except streams layer) and signed/unsigned warnings
2006-03-02 13:12:45 +00:00
Marcus Boerger
75b3d578d3
- Add unicode results
2006-02-26 12:26:31 +00:00
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
36002f16c3
Fixed test file
2006-02-22 12:22:07 +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
Marcus Boerger
76df257b15
- Simplify by remove redundant checks
2006-02-21 00:55:38 +00:00
Dmitry Stogov
bb0f2051c4
Fixed wrong prototype and error message
2006-02-20 10:50:58 +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
Marcus Boerger
c67d8b2152
- Iterator API was changed
2006-02-05 23:31:47 +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
Ilia Alshanetsky
da2b91d1e1
MFB51: Properly rewrite queries where a bound parameter appears more then
...
once.
2006-01-25 16:35:46 +00:00
Marcus Boerger
2d24ebbe16
- WS
2006-01-22 23:53:53 +00:00
Marcus Boerger
7c8de803d0
- Fix memory leaks
2006-01-22 23:48:02 +00:00
Marcus Boerger
86162f7a38
- WS
2006-01-22 23:46:50 +00:00
Marcus Boerger
693c5ad27f
- Update test
2006-01-22 22:06:02 +00:00
Ilia Alshanetsky
7b8104bcf6
Fixed bug #35797 (segfault on PDOStatement::execute() with
...
zend.ze1_compatibility_mode = On).
2006-01-01 20:08:19 +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
f5318a9530
touch with re2c 0.9.11
2005-12-18 19:54:50 +00:00
Ilia Alshanetsky
bc2ed13110
MFB51: Fixed memory corruption when FETCH_LAZY mode is being used.
2005-12-17 20:00:14 +00:00
Ilia Alshanetsky
c64ae2f2c9
MFB51: Fixed bug #35694 (Improved error message for invalid fetch mode).
2005-12-15 22:35:18 +00:00
Marcus Boerger
90a321d854
- MFB
2005-12-11 15:28:52 +00:00
Marcus Boerger
3f8491c2fa
- Show an error if no pdo object can be created
2005-12-11 15:24:38 +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
Antony Dovgal
37eeba6f27
tweak the fix
2005-12-01 20:39:49 +00:00
Antony Dovgal
25ac5ff0b7
fix #35508 (PDO fails when unknown fetch mode specified)
2005-12-01 19:59:36 +00:00
Antony Dovgal
dc1d5122d1
fix #35430 (PDO crashes on incorrect FETCH_FUNC use)
2005-11-27 20:56:46 +00:00
foobar
04dffec1c4
- Use right define: ZEND_MODULE_API_NO as these are PHP modules, not Zend extensions
2005-11-25 15:40:14 +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
foobar
2434baffdb
- Fix #line paths
2005-11-08 20:12:09 +00:00
Marcus Boerger
cd5a60d36d
- Fix memleaks
2005-10-30 22:55:21 +00:00
Marcus Boerger
ef3b427e5c
- Fix PECL Bug #5772 ; FETCH_FUNC broken for mixed case function names
...
# Mhhh, now wez and me did it in different branches only because i forgot
# to commit and MFH too
2005-10-29 11:10:34 +00:00
Dmitry Stogov
3c166ac947
Fixed test (unicode support)
2005-10-28 07:31:21 +00:00
Antony Dovgal
4329fff15f
forgot to commit new pdo_attr_ function
2005-10-27 19:38:36 +00:00
Dan Scott
0a7164c970
Add test for PDO::ATTR_CASE.
2005-10-26 23:46:52 +00:00
Dan Scott
52f9772049
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 08:32:25 +00:00
Antony Dovgal
aad3dcd493
use correct enum type for the arg
2005-10-25 16:03:11 +00:00
Marcus Boerger
91ac79530d
- SPL example was changed, so change PDO test accordingly
2005-10-13 19:48:07 +00:00
Marcus Boerger
bd6cbd6a0e
- MFB Do not try to autoload the class, use internal only
2005-10-13 18:41:04 +00:00
Dmitry Stogov
1bedfbeb24
Unicode support
2005-10-12 12:13:54 +00:00
Ilia Alshanetsky
42663f639d
Fixed bug #34809 (FETCH_INTO in PDO crashes without a destination object).
2005-10-10 14:43:51 +00:00
Marcus Boerger
babb2d5337
- Add new test
2005-10-07 23:23:00 +00:00
Marcus Boerger
93a27ebb60
- MFB dynamic lookup of PDOException base
2005-10-06 19:32:27 +00:00
Marcus Boerger
31d9d6c5b5
- MFB Add optional deps for SPL
2005-10-04 07:48:43 +00:00
Marcus Boerger
272ff777c5
- Add missing test from base
...
- Change require to require_once (found by kevin)
2005-10-03 15:06:06 +00:00
Ilia Alshanetsky
19b334a08a
Fixed memory leak.
2005-10-03 03:53:57 +00:00
Marcus Boerger
b18ffb406e
- Simplify SPL checks for PDOException base
2005-10-02 20:36:02 +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
Dmitry Stogov
1b1b864941
Unicode support
2005-09-26 07:23:49 +00:00
Edin Kadribasic
c4e65a4a2d
MFB: Build PDO and SQLite as shared
2005-09-24 15:15:13 +00:00
Edin Kadribasic
8e6b7667c6
MFB: Declare functions used by driver as PDO_API in php_pdo_driver.h
2005-09-24 14:19:24 +00:00
Marcus Boerger
a28c82fceb
- Fixed Bug #34590 User defined PDOStatement class can't implement methods
2005-09-21 22:53:50 +00:00
Marcus Boerger
d9ed9945cb
- MFB
2005-09-21 18:49:37 +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
Marcus Boerger
a3aa58fdea
- Fix building with 5.0
2005-09-19 18:05:00 +00:00
Dmitry Stogov
b81255d4fd
ZTS fix
2005-09-12 06:31:54 +00:00
Wez Furlong
d84239ae87
touch file
2005-09-11 05:04:43 +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
Edin Kadribasic
856b81ff0c
touch
2005-09-04 00:58:49 +00:00
Edin Kadribasic
baecb3d18d
MFB
2005-09-04 00:58:21 +00:00
George Schlossnagle
fbd6ce4db5
Resolution to http://pecl.php.net/bugs/bug.php?id=5193 for all drivers.
2005-09-01 14:39:58 +00:00
Dmitry Stogov
f4b8f4e958
Unicode support cleanup
2005-08-23 09:33:46 +00:00
Dmitry Stogov
6b622046dc
zend_is_callable() and zend_make_callable() were changed to return readable function name as zval (instead of string).
2005-08-22 12:22:16 +00:00
Andrei Zmievski
c79fbfe6f3
And here
2005-08-16 19:43:23 +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
Dmitry Stogov
08fe0d1da3
Test engine is improved to support unicode mode
2005-08-15 14:37:55 +00:00
Dmitry Stogov
0bdfac1169
Tests are fixed according to new var_dump()/pront_r() format (to pass in non-unicode mode)
2005-08-15 07:55:41 +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
Ilia Alshanetsky
ecc34bddcc
Fixed memory leak.
2005-08-03 18:26:16 +00:00
foobar
23e671a51e
- Bumber up year
2005-08-03 14:08:58 +00:00
Wez Furlong
bf85bf515e
add sanity checks
2005-07-27 14:18:01 +00:00
Wez Furlong
32cf3cc19f
Yes, I can't count the months, and no, I'm not related to Ilia.
2005-07-27 04:07:44 +00:00
Wez Furlong
163c92510a
Prep for PECL release
2005-07-27 02:39:46 +00:00
Marcus Boerger
d8eece2b43
- Add missing part to make colon in parameter binding optional
2005-07-22 14:31:20 +00:00
Marcus Boerger
e4b07b3ebe
- Test the colon is optional in binding
2005-07-22 14:27:35 +00:00
Wez Furlong
cfe1dc3b46
this looks like a much better fix for refcounting/shutdown in lazy objects.
2005-07-22 04:33:56 +00:00
Wez Furlong
882503110d
fix leak (ugh, this nuance gets me every time)
2005-07-22 02:09:19 +00:00
Wez Furlong
3560bb9c2b
Fixes #33785 for me
2005-07-22 01:34:43 +00:00
Ilia Alshanetsky
3db688c6c9
Added test for PDO_FETCH_LAZY.
...
# This currently fails, see bug 33785
2005-07-21 19:33:48 +00:00
Wez Furlong
08891a1c1b
some drivers want you to say that its ok to use NULL for these columns.
2005-07-20 05:27:00 +00:00
Ilia Alshanetsky
97e8c6f4a9
Proper handling for databases that need to pre-calculate length of large
...
columns, which is not normally done for performance reasons.
2005-07-20 03:38:33 +00:00
foobar
e63d1706cf
touch with working re2c
2005-07-18 16:08:37 +00:00
Wez Furlong
be88f5a960
make a start on a debugging function.
2005-07-18 14:46:55 +00:00
Wez Furlong
d9826ec143
touch generated file
2005-07-18 14:44:56 +00:00
Wez Furlong
7f053e062c
avoid :: when looking for named parameters.
...
Refs Bug #33736 .
2005-07-18 14:44:14 +00:00
Wez Furlong
fbc568013a
Add utility for driver-specific tests
2005-07-14 02:08:18 +00:00
foobar
2f558a3798
Touch with working re2c
2005-07-12 07:06:01 +00:00
Wez Furlong
0562581de8
touch generated file
2005-07-12 03:20:08 +00:00
Wez Furlong
9240c5f521
remember ? -> :pdox mapping so that binds by position can be mapped to names if required.
2005-07-12 03:19:44 +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
Wez Furlong
f5a09e87ee
should always bind columns after execute.
...
There're probably more of these to fix.
2005-07-12 02:38:39 +00:00
Andrey Hristov
b3aa24ff98
fix a segfault with the following script:
...
<?php
$dbh = new PDO('mysql:dbname=test;host=localhost', "root", "secret");
$what = 1;
$stmt = $dbh->prepare('select a, b, c from t123 where a=:what');
$stmt->bindParam(1, $what, PDO_PARAM_INT, 12);
var_dump($stmt->execute());
var_dump($stmt->fetchObject());
?>
2005-07-11 14:14:56 +00:00
Wez Furlong
007f571beb
for the transactions test case, detect working transactions before attempting to run the tests.
...
Additional ugliness required because mysql does stupid stuff like this:
mysql> CREATE TABLE foo (id int) TYPE=innodb;
Query OK, 0 rows affected, 2 warnings (0.00 sec)
mysql> SHOW CREATE TABLE foo;
CREATE TABLE `foo` (
`id` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
In addition, BEGIN, COMMIT and ROLLBACK all succeed, even when no tables
support transactions.
2005-07-09 04:28:45 +00:00
Wez Furlong
d3b653e97b
Added:
...
proto bool PDOStatement::closeCursor()
Closes the cursor, leaving the statement ready for re-execution.
The purpose of the function is to free up the connection to the server so that
other queries may be issued, but leaving the statement in a state that it can
be re-executed.
This is implemented either as an optional driver specific method (allowing for
maximum efficiency), or as the generic PDO fallback if no driver specific
function is installed.
The PDO generic fallback is semantically the same as writing the following code
in your PHP script:
do {
while ($stmt->fetch())
;
if (!$stmt->nextRowset())
break;
} while (true);
2005-07-09 03:52:41 +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
Marcus Boerger
ca59b1158e
- Regenerate using re2c 0.9.8
2005-07-08 20:38:13 +00:00
Marcus Boerger
8d743e70e0
- std not needed -> avoid warning
2005-07-08 20:35:41 +00:00
Wez Furlong
7976182b94
Fix Bug #33111
2005-07-08 19:28:52 +00:00
Wez Furlong
dec54a98fa
generated file
2005-07-08 17:00:48 +00:00
Wez Furlong
38a02b6244
For named-parameter-to-named-parameter rewrites, we need to map the original
...
names to the new names.
2005-07-08 17:00:28 +00:00
Wez Furlong
8f31f0cfaa
Fix a shutdown order issue I saw in the pgsql driver. Hope this doesn't mess
...
up something in the OCI driver; I think I've been here before.
2005-07-08 15:25:15 +00:00
Wez Furlong
206c7b8372
And the generated version of the parser
2005-07-08 15:24:42 +00:00
Wez Furlong
ab1ba644db
add a bit of a hack to cater for pgsql prepared statements.
...
These are effectively named statements with strong constraints on the naming
format. We cater for this in a fairly generic way: allow a driver to replace
the format string we use to generate names from positional parameters. In
addition, if that format is set, we always force a rewrite from regular names
to the strongly enforced names.
2005-07-08 15:24:21 +00:00
Wez Furlong
057e1973c7
and as a result, need to update the expected data
2005-07-08 15:21:43 +00:00