improve handling of bound input parameters when no maximal length value is set;
default to 4000 as the maximal length, which is the biggest size possible
without using a LONG type (if you specify anything larger than this, you'll end
up with ORA-1461).
Don't assume that all parameters were output parameters after execution, as
this would clobber the input values when used in a loop.
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.
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());
?>
- mysql_affected_rows() already returns an unsigned long
- optimize a bit the real_escape
- handle the situation when libmysql bails out because of lack of memory
Jon Parise [Mon, 11 Jul 2005 06:32:02 +0000 (06:32 +0000)]
Removing the automake-related output. The build no longer uses automake.
While I'm here, rewrite the PHP_AUTOCONF-related code to more closely
match the conventions used elsewhere in this section. The result should
be functionally the same as before.
stmt->column_count is set only if the result has been already bound, don't
rely on that and use the real count which is kept in st_mysql_stmt
#of course using internal values is bad idea but the comment already says
#that this should be fixed
ok, calculate max_length only in case of a blob (normal, medium, long).
in case of a varchar lets allocate 255 bytes and be quick without asking
libmysql to update max_length
if the result set is buffered ask libmysql to compute the lengths, so
later allocate buffer as big as the largest value of the column in the
result set (max_legth positive).
for the transactions test case, detect working transactions before attempting to run the tests.
Additional ugliness required because mysql does stupid stuff like this:
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);
Add early support for native prepared statements in pgsql.
Note that some tests now fail; if we can't resolve this in time for the beta,
the prepare code should be disabled (I'll add a flag for this later today).
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.
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.
Fixed bug #33512 (Add missing support for isset()/unset() overloading to complement the property get/set methods). Now empty($obj[...]) works proper but in addition it may call offsetGet() method.
zend_stream_getc uses fread internally. NetWare LibC fread reads 4(Which I believe EOT) for EOF(^D) character. This happens when fread is asked to read one and only character as is the case with cl interactive mode.
-- Kamesh