Wez Furlong
64de59d9a7
avoid unterminated loop when closing the statement.
2006-04-22 16:35:18 +00:00
Wez Furlong
bb5f3aa012
This completes the fix for PECL #5827 ; we need to gobble up result sets in the
...
stmt dtor too.
2006-04-09 06:49:07 +00:00
Wez Furlong
0f4137fbd9
fix for PECL Bug #5827 .
...
We're responsible for gobbling up supplemental result sets in closeCursor()
(which is what PDO does for us if we didn't implement our own closer routine).
2006-04-09 06:41:42 +00:00
Ilia Alshanetsky
3608dd4c11
Fixed bug #36345 (PDO/MySQL problem loading BLOB over 1MB).
2006-02-14 14:26:11 +00:00
foobar
5bd93221a8
bump year and license version
2006-01-01 12:51:34 +00:00
Antony Dovgal
012e5bf4cd
add NEWDECIMAL, NEWDATE, GEOMETRY, SET and ENUM field types
2005-12-05 13:22:14 +00:00
Antony Dovgal
22efcfd530
MFH: fix possible crash in pdo_mysql_stmt_dtor()
2005-11-30 11:33:07 +00:00
Wez Furlong
c28a9a4e5c
Closes PECL Bug #5802
2005-10-29 02:41:50 +00:00
Wez Furlong
b2424b2e08
argh! we don't want to NULL the stmt here; freeing the results is not the same
...
as destroying the prepared statement handler, so we're leaking and breaking, as
can be seen by running the test suite.
brown paper bag for PDO in PHP 5.1RC4?
2005-10-29 02:16:35 +00:00
Antony Dovgal
7c01510b95
MFH: free && set to NULL S->stmt
2005-10-27 17:26:19 +00:00
Ilia Alshanetsky
4d0439e487
MFH: Fixed bug #34623 (Crash in pdo_mysql on longtext fields).
2005-10-19 14:11:56 +00:00
Marcus Boerger
b47525e508
- TSRM fix
2005-09-29 19:57:13 +00:00
Wez Furlong
fdd42afa6c
Fixup LOB handling for inserts (refs #34630 ).
...
Also tripped over the return of PECL #5200 ; looks like mysql doesn't return an
accurate length for the columns. The PDO driver will sanity check the real
length against the buffer size it allocated (based on the info provided by
mysql), so that we won't overrun the buffer. In addition, if a varchar field
is reported as having a length of less than 128, we'll allocate 128 just in
case.
If the data is truncated, report it via the appropriate sqlstate code.
There must be a better way to do this stuff.
2005-09-25 02:05:03 +00:00
Ilia Alshanetsky
156a899e4a
MFH: Fixed bug #34001 (pdo_mysql truncates numberic fields at 4 chars)
2005-09-01 01:57:01 +00:00
Ilia Alshanetsky
99d8090cb2
Fixed memory corruption (wrong order of operations of stored prep. stmt).
...
Optimize the max length calculation process.
2005-07-20 04:30:14 +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
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
fc48f9096d
gah!
2005-07-14 02:20:52 +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
8899425e26
strictly check the result of mysql_affected_rows()
2005-07-12 19:22:05 +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
Ilia Alshanetsky
e7b930ea9a
Make prepared statements obey buffering flag in MySQL.
2005-07-07 17:53:34 +00:00
Ilia Alshanetsky
307f622817
Fixed memory leak.
2005-07-07 15:54:00 +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
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
fa0e534f83
Various compiler warning fixes.
2005-05-18 22:40:56 +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
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
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
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
Ilia Alshanetsky
5904d59ffd
Fixed compiler warnings.
2005-02-12 20:58:29 +00:00
Wez Furlong
d134fb2a8d
update for api changes
2005-02-06 23:22:37 +00:00