Commit Graph

65 Commits

Author SHA1 Message Date
Wez Furlong
588d88960c clean up the test2 table that some tests create 2005-10-29 02:58:24 +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
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
Marcus Boerger
470da4e960 - MFH Add new test 2005-10-07 23:23:44 +00:00
Marcus Boerger
0a2e6f723e - MFH change require to require_once 2005-10-03 15:06:27 +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
ca9dd7d826 - Add PDO::setAttribute(PDO::ATTR_STATEMENT_CLASS) 2005-10-02 20:07:11 +00:00
Wez Furlong
4f7d14f8d9 a test for bug #34630 2005-09-24 18:54:50 +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
Marcus Boerger
a72a517e2f - Add ability to execute .php generated from .phpt on failure without the
need to manually set the environment.
2005-09-21 18:40:56 +00:00
Ilia Alshanetsky
bfe844e41e MFH: Make PDO use class constants 2005-09-20 00:35:21 +00:00
Wez Furlong
efe24c0205 add __sleep and __wakeup functions to prevent serialize/deserialize from being used on PDO objects. Refs PECL #5217 2005-09-10 17:48:45 +00:00
Wez Furlong
0730fa2af9 Add PDOStatement::bindValue(), which is similar to bindParam(), except that
it binds the value of the zval at the time it is called, rather than keeping
a reference to the zval and taking the value at execute() time.
2005-09-10 15:32:04 +00:00
Marcus Boerger
e4b07b3ebe - Test the colon is optional in binding 2005-07-22 14:27:35 +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
Wez Furlong
fbc568013a Add utility for driver-specific tests 2005-07-14 02:08:18 +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
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
Wez Furlong
057e1973c7 and as a result, need to update the expected data 2005-07-08 15:21:43 +00:00
Wez Furlong
8e30a80733 we declare the column as NOT NULL, so inserting NULL is not a good idea. 2005-07-08 15:20:18 +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
Ilia Alshanetsky
5156c7b38f 1st set of fixes to make tests work with MySQL
# Additional changes pending
2005-07-07 18:49:58 +00:00
Wez Furlong
5fe199fb0f remove old test files 2005-07-07 15:36:00 +00:00
Ilia Alshanetsky
721687e11c Stop on the 1st skip. 2005-07-07 15:32:32 +00:00
Wez Furlong
3c5b9a6e6a skip if we can't connect (include reason in skip output) 2005-07-07 15:15:01 +00:00
Wez Furlong
c80b4c7440 Need to state NOT NULL here, as DB2 won't allow the UNIQUE constraint without it. 2005-07-07 14:09:58 +00:00
Wez Furlong
32663f7da7 make column names lower case 2005-07-07 13:59:34 +00:00
Wez Furlong
1095da42e0 extra paranoia about the attribute param 2005-07-07 13:56:09 +00:00
Wez Furlong
576ff830a9 pedantic WS 2005-07-07 12:44:44 +00:00
Wez Furlong
f4681fd86b It's not portable to expect any consistency between drivers in the return value
of an exec() when running DDL; revise test.
2005-07-07 12:42:52 +00:00
Wez Furlong
30c916f21a rename pdo_test.php to pdo_test.inc, add it, and update tests. 2005-07-06 13:19:25 +00:00
Wez Furlong
277f9357f4 juggling to track down a problem with odbc 2005-07-06 13:16:40 +00:00
Wez Furlong
72a75a87ea last minute debug stuff sneaked in 2005-07-06 06:13:44 +00:00
Wez Furlong
14dbb2dfe9 Add tests that can be redirected to with new test harness feature. 2005-07-06 06:07:26 +00:00
foobar
fa6c536c26 fix tests when error_reporting is E_ALL 2005-06-28 23:33:42 +00:00
Ilia Alshanetsky
e80a144fce Fixed PDO Mysql tests. 2005-06-24 19:10:41 +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
Marcus Boerger
2ac0540323 - Add test for deriving PDO 2005-05-24 14:26:22 +00:00
Marcus Boerger
88157ad284 - Add new tests for PDO_FETCH_INTO 2005-05-24 12:39:09 +00:00
Marcus Boerger
0eb7282f98 - fetchSingle() was renamed to fetchColumn() 2005-05-21 14:47:33 +00:00
Marcus Boerger
2906d6570c - Add new test 2005-03-24 12:31:37 +00:00
Marcus Boerger
a66e14645c - Add new tests 2005-03-21 00:29:25 +00:00
Marcus Boerger
360fbc09b7 - Interface name was changed 2005-03-19 10:55:35 +00:00
Marcus Boerger
92af2b6194 - Update tests 2005-03-10 17:55:36 +00:00