Commit Graph

290 Commits

Author SHA1 Message Date
Andrey Hristov
73b23fca37 Change of way the packet objects are created/initialised
If the protocol gets changed, ever, we can decide at runtime
easily which protocol to use by instantiating the right protocol
object. But this is restricted to the structure of the packets, not
the flow.
2010-01-07 19:44:59 +00:00
Andrey Hristov
41ac91aecf Move this function to MYSQLND_NET as it works on the
php stream
2009-12-21 16:52:10 +00:00
Andrey Hristov
0c7a9b8010 Move two functions which are used in the extension as methods of
the connection. Two functions less in the global namespace.
2009-12-11 10:18:00 +00:00
Andrey Hristov
00d76a8445 Add plugin storage for MYSQLND_STMT too 2009-12-10 11:18:05 +00:00
Andrey Hristov
6f598e62ff Remove the zval caching from mysqlnd. It was disabled versions ago
due to problems on windows, which were not debugged. Better have 
code that is disabled not in the core.
2009-12-09 20:21:05 +00:00
Andrey Hristov
4d2735007d Remove disabled code - threaded fetching. This can be implemented
on a upper level and by offloading it we reduce the complexity of
the core.
2009-12-09 16:57:03 +00:00
Andrey Hristov
1cf1cb3015 fix debug windows build as well as remove a compilation warning
(a header not included)
2009-11-26 11:10:47 +00:00
Andrey Hristov
5143fe41e2 Compressed protocol support + extensibility for mysqlnd 2009-11-20 08:12:14 +00:00
Andrey Hristov
a692479d21 Count number of affected_rows for normal and PS queries 2009-10-22 14:30:51 +00:00
Andrey Hristov
2f81bcd44b Fix ZTS build 2009-09-30 23:34:56 +00:00
Andrey Hristov
ba5c40b2ad Use mnd_ wrappers wherever possible. Needed for
statistics.
2009-09-30 23:13:43 +00:00
Johannes Schlüter
9485cad688 Revert mysqlnd to RC3 state after issues with pconnects 2009-06-25 19:03:52 +00:00
Andrey Hristov
30800a79b9 MFH: C-comments 2009-06-16 18:00:00 +00:00
Andrey Hristov
27270621cb MFH:
Hardwire function call instead of using callbacks. We don't actually need
callbacks, it was done for making 2 functions static, not to pollute the
global functions space but that had its price of 8 bytes overheat per
allocation, which is just too much. Also making the app member 32b instead
of 64b, which should save additional 4 byte, to the total of 12 byte per
allocation of a row buffer.
2009-06-16 09:15:38 +00:00
Andrey Hristov
ccf0665170 MFH:Fix for the failing mysql_stmt_execute() test. Data was cleaned after
stmt_reset() but it should stay and be freed as later as next stmt_execute()
2009-05-29 12:19:40 +00:00
Andrey Hristov
804f6138a6 MFH:Fix a valgrind warning as well as more trace log information 2009-05-28 17:49:29 +00:00
Andrey Hristov
76d091d5f5 MFH:Fix a problem with cursors, which did not happen with unbuffered PS for
some reason. Double free of the data, which led to valgrind warnigns.
The fix actually optimizes the code in this cases because the old code
used copy_ctor while the new one skips it because it is not needed.
Transferring data ownership and nulling works best, for PS where we
always copy the string from the result set, unlike the text protocol.
2009-05-28 16:35:41 +00:00
Johannes Schlüter
ebef020ecc - MFH: Improve mysqlnd's internal method registration 2009-02-16 17:26:43 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Andrey Hristov
d43b7b022f MFH:
Windows fixes for mysqlnd
Less warnings + PHPAPI for mysqlnd_poll
2008-11-20 17:21:36 +00:00
Andrey Hristov
9186528994 MFH:
Get rid of many defines (which simplifies the code a lot),
as well as uint->unsigned int
2008-11-06 10:37:47 +00:00
Andrey Hristov
77c1e145e1 MFB:
64bit fixes:
- fixes to sprintf modifiers, cleaning warnings
- use _t types, like uint64_t instead of uint64, thus skipping series of
typedefs.
2008-10-31 20:32:17 +00:00
Johannes Schlüter
04d9bbe65e MFH: Fix #46285 (lastInsertId() returns "0" when a deferenced PDOStatement is
executed)
2008-10-27 17:21:22 +00:00
Johannes Schlüter
c3dab8f191 MFH: Don't dereference NULL-pointer 2008-10-19 12:28:43 +00:00
Andrey Hristov
99ea8068df MFH:
- More statistics
- Fixed endless loop - mysqlnd_stmt_next_result() returned FAIL but as it
  is defined to be 1 (and PASS is 0), checking for mysqlnd_stmt_more_result()
  was successful although we were expecting a FAIL.
2008-09-12 15:08:41 +00:00
Andrey Hristov
24e7d03e48 MFH: Fixed bug#44897 - failed to prepare statement
After a PS "CALL()" we have at least one result set. If the SP does also some, then
     we need to clean the wire more fool-proof.
2008-07-23 14:07:38 +00:00
Andrey Hristov
136a55fcd9 Sync with bzr 2008-07-15 13:11:09 +00:00
Andrey Hristov
f4e659d2af Update ext/mysql's and ext/mysqli's tests
Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in
mysqlnd builds as libmysql doesn't support this feature.
2008-04-24 14:22:19 +00:00
Andrey Hristov
de560f3161 MFB: Update CVS from the development tree 2008-04-16 12:57:38 +00:00
Andrey Hristov
5abe8c8d01 Small updates & a fix for
Bug #43832 mysqi_get_charset() doesn't expose charset comment
2008-03-25 18:27:17 +00:00
Andrey Hristov
6867385d75 - Don't modify the variables which are passed for parameter binding.
We need to clone them, if there will be a transformation (convert_to_xxx)
  which will change the origin
  (bug#44390 bind_param / bind_result and Object member variables)
- Make mysqlnd more compatible to libmysql, in this case if the execute of
  a statement fails set the state of the statement back to PREPARED
- A test case to check the case of a failing statement.
2008-03-20 14:03:30 +00:00
Andrey Hristov
7e0be017df Fix memory errors< 2008-02-14 14:50:21 +00:00
Rob Richards
d7622b8ecf MFH: fix win32 build 2008-01-29 22:06:43 +00:00
Andrey Hristov
2033c1b7f2 some config.w32 fixes
moved mysqlnd's block allocator to a separate file and also now
it's part of the connection, no MT problems.
2008-01-28 22:50:06 +00:00
Andrey Hristov
7932ccba6d More optimizations - less MM calls
Clearly separated fetching (physical reading) from decoding phases (data
interpretation). Threaded fetching added but disabled as needs more work for
Windows. For Linux needs some touches to add pthreads if this is enabled,
probably with a compile-time switch.
The code reorganisation makes it easy to add also async API, similar to
cURL's one.
2008-01-28 18:25:50 +00:00
Andrey Hristov
c52b63ea1d Merge with internal version 2008-01-23 19:11:28 +00:00
Andrey Hristov
fdf20a8287 - Fix problems with double definitions
- Clean up a bit a type mess - 4 types less. No need to have aliases
  for the same thing (unification is the name).
- New macro for Johannes mysqlnd_stmt_ro_result_metadata
2008-01-02 21:14:35 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Yiduo (David) Wang
f4f0a47433 Fix build for mysqlnd 2007-10-07 21:47:36 +00:00
Andrey Hristov
8b9b553aa2 Import mysqlnd
Patch ext/mysql and ext/mysqli to support mysqlnd
2007-10-05 21:23:56 +00:00