Commit Graph

206 Commits

Author SHA1 Message Date
Ilia Alshanetsky
9438584d76 Only set attribute if result set contains some columns. 2005-07-20 02:36:34 +00:00
Ilia Alshanetsky
1e1d2e2b0d clean up 2005-07-20 02:19:20 +00:00
Wez Furlong
8adbc92d4b this hack can and does segv; let's remove it. 2005-07-20 01:59:14 +00:00
Wez Furlong
8c446726cf Add test case 2005-07-14 02:21:03 +00:00
Wez Furlong
fc48f9096d gah! 2005-07-14 02:20:52 +00:00
Wez Furlong
d025a14d33 Thanks 'james' (a visitor to my blog) for reporting this bug. 2005-07-14 02:09:54 +00:00
Wez Furlong
695e195a27 keep this as a placeholder for debugging weird regressions 2005-07-14 02:09:08 +00:00
Wez Furlong
0601249f82 it is not an error for a statement to return 0 rows.
Andrey: please run the test suite before each commit!
This broke beta 3 and was clearly visible as a result of running the tests.

Running further tests now.
2005-07-14 02:03:54 +00:00
Andrey Hristov
5232c4a544 ok, call pdo_mysql_error() before returning -1 2005-07-12 19:32:13 +00:00
Andrey Hristov
8899425e26 strictly check the result of mysql_affected_rows() 2005-07-12 19:22:05 +00:00
Ilia Alshanetsky
e21f5f9592 A bit of further tuning. 2005-07-11 14:46:01 +00:00
Andrey Hristov
9749926224 - 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
2005-07-11 13:52:13 +00:00
Andrey Hristov
31de8e9018 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
2005-07-10 02:58:51 +00:00
Andrey Hristov
55ab9b75a6 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
2005-07-10 02:49:14 +00:00
Andrey Hristov
2711d70d33 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).
2005-07-10 02:20:26 +00:00
Wez Furlong
5602a5ba65 Get precise lengths from the server, as suggested by Andrey. 2005-07-10 02:00:35 +00:00
Ilia Alshanetsky
eb4aff5a91 Added safety checks. 2005-07-09 05:08:54 +00:00
Ilia Alshanetsky
4c18dfc852 Make cursor closer work with emulation as well. 2005-07-09 05:04:43 +00:00
Ilia Alshanetsky
df60983b75 Added missing header check. 2005-07-09 04:43:16 +00:00
Ilia Alshanetsky
c58e878513 Implement cursor_closer for MySQL driver. 2005-07-09 04:30:49 +00:00
Ilia Alshanetsky
ba66cac1cf Fixed memory leak 2005-07-09 04:21:14 +00:00
Wez Furlong
c2f3636cf2 Fix two bugs:
- execute() would not re-fetch meta data after nextRowset() had been called.

- buffered mode would only be enabled on the first execute on a statement handle.
2005-07-09 03:54:13 +00:00
Wez Furlong
168b6500fd Fix #33618 2005-07-08 19:25:37 +00:00
Ilia Alshanetsky
e7b930ea9a Make prepared statements obey buffering flag in MySQL. 2005-07-07 17:53:34 +00:00
Ilia Alshanetsky
22896664a8 Fixed memory leak 2005-07-07 16:27:46 +00:00
Ilia Alshanetsky
307f622817 Fixed memory leak. 2005-07-07 15:54:00 +00:00
Wez Furlong
3fbb2081a1 adopt new tests 2005-07-07 15:04:45 +00:00
Wez Furlong
d7e5dfb2de Enable native mysql 4.1.x prepared statement support
# the hardest part was installing 4.1.x on a gentoo box over a 56k modem
2005-07-03 02:20:08 +00:00
Wez Furlong
1bbab25455 Experimental support for queries returning multiple rowsets under mysql 5.0.
Patch from Guy Harrison (guy dot a dot harrison (at) gmail dot com)
2005-07-02 21:01:38 +00:00
Ilia Alshanetsky
fb7c1f0561 Remove "custom" PDDRV sqlstate. 2005-06-27 14:52:46 +00:00
Ilia Alshanetsky
09f052358f Fixed bogus query failure claim, on some queries such as OPTIMIZE table. 2005-06-24 23:58:06 +00:00
Ilia Alshanetsky
348c0cddae Added PDO_MYSQL_ATTR_USE_BUFFERED_QUERY parameter for pdo_mysql, to toggle
usage of buffered queries.
2005-06-24 19:45:59 +00:00
Ilia Alshanetsky
e956cc30d7 Skip the test, it fails due to missing transaction support. 2005-06-24 19:20:59 +00:00
Ilia Alshanetsky
e80a144fce Fixed PDO Mysql tests. 2005-06-24 19:10:41 +00:00
Marcus Boerger
5cf2c9dc45 - Add +ifdefs to still allow PHP 5.0 builds of PDO
# PDO is a PECL extension and at the moment is still meant to compile on
# both PHP 5.0 and PHP 5.1.
2005-06-23 00:19:16 +00:00
Ilia Alshanetsky
c594f47f76 Fixed test skip conditions.
# Same needs to be done to odbc, but it seems access is restricted
# for "privileged" folks.
2005-06-21 13:42:23 +00:00
Dmitry Stogov
f47c78487b Improved PHP extension loading mechanism with support for module dependencies and conflicts 2005-06-17 09:39:23 +00:00
foobar
15cf2a60b0 - Added PHP_CHECK_PDO_INCLUDES macro (caches the result) 2005-06-14 00:00:53 +00:00
foobar
ee28f62dc0 ws 2005-06-13 23:37:20 +00:00
foobar
a20383ba06 - Unify the "configure --help" texts 2005-05-29 23:17:16 +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
Ilia Alshanetsky
fa0e534f83 Various compiler warning fixes. 2005-05-18 22:40:56 +00:00
Ilia Alshanetsky
53ee348165 Make unix domain sockets work. 2005-05-17 23:23:52 +00:00
Ilia Alshanetsky
746b89df16 Fixed type mixup. 2005-05-17 19:33:03 +00:00
Ilia Alshanetsky
569138e0c0 removed unused var. 2005-04-19 20:53:54 +00:00
foobar
0e57528666 No c++ comments in C code 2005-04-19 11:41:04 +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
7c4cd04229 - Update tests 2005-03-13 22:35:34 +00:00
Marcus Boerger
92af2b6194 - Update tests 2005-03-10 17:55:36 +00:00
Magnus M��tt�
d49ecd51c1 Add more tests. 2005-03-09 03:50:10 +00:00
Marcus Boerger
bbccc37f84 - Add new tests 2005-03-07 22:43:27 +00:00
Marcus Boerger
efb3529b7f - Add new tests 2005-03-07 22:36:12 +00:00
Marcus Boerger
7bbbfa3f15 - Add new tests 2005-03-07 01:39:12 +00:00
Marcus Boerger
f76f510185 - Add tests
- Fix testname
- Drop unnecessary include line (was wrong anyway)
2005-03-04 01:29:27 +00:00
Rasmus Lerdorf
99f832a206 If pdo is disabled, skip all the pdo extensions. 2005-02-28 08:18:47 +00:00
Marcus Boerger
d0a76e992b - Add new test 2005-02-27 22:39:35 +00:00
Hartmut Holzgraefe
f7e8fcb8e0 fully distinguish between database and statement level errors 2005-02-27 20:34:36 +00:00
Hartmut Holzgraefe
dd7d41e938 use fetch_fields only once and remember the result 2005-02-27 12:43:23 +00:00
Hartmut Holzgraefe
04f2f981e0 changed the error checks on result set retrieval
UPDATEs not modifying anything are not actually bugs
2005-02-27 12:15:47 +00:00
Hartmut Holzgraefe
81770f3c39 no need to check for execution status, always free a result set if there
is one
2005-02-27 12:05:46 +00:00
Hartmut Holzgraefe
fa5070b39c just to be sure ... 2005-02-27 11:55:39 +00:00
Hartmut Holzgraefe
beb7151936 cols 2005-02-27 11:46:38 +00:00
Hartmut Holzgraefe
8725ed75cd CS / whitespace 2005-02-27 11:42:18 +00:00
Hartmut Holzgraefe
d3fcc41be7 use auto generated error -> state mappings 2005-02-27 11:39:15 +00:00
Hartmut Holzgraefe
4c4ec3c5db line endings 2005-02-27 11:36:07 +00:00
Hartmut Holzgraefe
409a94ffea error code mapping (generated from mysql 5 sql_state.h file using
the get_error_codes.php script)
2005-02-27 11:31:49 +00:00
Hartmut Holzgraefe
49a383ef4f initial checkin 2005-02-27 11:29:17 +00:00
Wez Furlong
cbe40ddd2d fix comma 2005-02-27 01:30:58 +00:00
Wez Furlong
2c5b2fc105 Alan: moved your fields away, but reserved you a pointer.
Changed PDO::lastInsertId() to have following proto:

	string PDO::lastInsertId([string name])

this allows arbitrary unique identitifers to be returned from the driver.

The optional name parameter is for databases that require additional contextual
information to be able to return the correct identifier.  None currently use
it, but pgsql will be on the list of drivers that do.
2005-02-26 17:27:51 +00:00
Wez Furlong
31f5f8f907 fix line endings 2005-02-26 15:41:54 +00:00
Marcus Boerger
b89fda667f - Drop driver name from generic tests and reserve those names for driver
specific tests.
# Well a little design correction
2005-02-24 00:11:16 +00:00
Marcus Boerger
b786b93b7a - Delay ctor call so that it can overwrite everything and the data can
already be accessed from the ctor.
2005-02-23 23:28:30 +00:00
Marcus Boerger
3f1738f96d - Add new tests 2005-02-23 01:13:13 +00:00
Marcus Boerger
3cb441df9a - Add new tests 2005-02-23 00:56:34 +00:00
Marcus Boerger
ab8f1f316b - Add new test 2005-02-21 18:55:51 +00:00
Marcus Boerger
74b1cee57f - Show warnings 2005-02-21 18:54:45 +00:00
Hartmut Holzgraefe
0ef339df92 "SET SESSION" is not supported by MySQL 3.23, as session is the default
scope for SET anyway we can drop the SESSION specifier (PECL Bug #3470)
2005-02-21 16:10:03 +00:00
Hartmut Holzgraefe
fd39b78b39 fix for PECL bug #3529 2005-02-20 23:56:14 +00:00
Hartmut Holzgraefe
5f3dd68ac5 fix for PECL bug 3530 2005-02-20 23:08:34 +00:00
Marcus Boerger
f607beb486 - Forgot to change extension name 2005-02-20 19:12:55 +00:00
Marcus Boerger
776144866c - Add tests 2005-02-20 18:23:12 +00:00
Wez Furlong
86708673fb Fix connecting to remote host, patch by Tim Friebe 2005-02-18 15:11:27 +00:00
Wez Furlong
55f53a5a96 symlinked pdo drivers under ext.
Enabled PDO and PDO_SQLITE by default.
Fixup PDO header detection so that it searches in the correct order, and
correctly picks up the headers when building from outside of the source
tree.

TODO: make pdo_XXX auto-enable when XXX is enabled.  Volunteers welcome.
2005-02-17 04:23:15 +00:00
Ilia Alshanetsky
f57b8d6dc5 Set auto-commit after establishing the connection, otherwise we have a crash. 2005-02-13 17:16:24 +00:00
Hartmut Holzgraefe
aedea8539c no need to check for all functions of a group,
added check for prepared statement functions
2005-02-13 14:42:46 +00:00
Hartmut Holzgraefe
fc20765c5e fix aclocal warning (newer versions are more strict about this) 2005-02-13 07:17:06 +00:00
Hartmut Holzgraefe
e087455493 add function existance check 2005-02-13 07:15:02 +00:00
Hartmut Holzgraefe
b6828f5949 Fixed domain socket / named pipe handling 2005-02-13 06:52:45 +00:00
Wez Furlong
f2d2da300f zts 2005-02-13 06:41:46 +00:00
Wez Furlong
47d1c2ad65 autocommit flag gets set always by PDO before invoking this method;
we should unconditionally inspect it here.
2005-02-13 06:37:29 +00:00
Hartmut Holzgraefe
486370dc7c autocommit setting done right 2005-02-13 00:55:16 +00:00
Hartmut Holzgraefe
5d4fb518ae added MySQL transaction support 2005-02-13 00:51:17 +00:00
Ilia Alshanetsky
5904d59ffd Fixed compiler warnings. 2005-02-12 20:58:29 +00:00
Wez Furlong
e9f5fb53f3 only do this magic on non-win32 platforms 2005-02-10 01:34:39 +00:00
Wez Furlong
c28a0b9fcb disable dep 2005-02-09 05:18:02 +00:00
Wez Furlong
201ec3dc02 prep for release 2005-02-09 05:04:40 +00:00