Andrey Hristov
4321da0388
move plugin specific stuff to one file. create object factory
...
for similar objects
2011-10-24 12:34:44 +00:00
Andrey Hristov
652490d43a
shift code around to two new files - mysqlnd_driver.c
...
and mysqlnd_ext_plugin.c (mysqlnd extension plugin)
2011-10-21 15:28:58 +00:00
Pierre Joye
a68abe830d
- fix TS build
2011-09-17 10:24:18 +00:00
Dmitry Stogov
d6ab6bc6ea
Fixed Windows build
2011-09-16 06:55:43 +00:00
Andrey Hristov
049a7c49cd
add query information to the trace log
2011-09-06 14:48:43 +00:00
Andrey Hristov
9f7ad10a63
function rename to comply with the schema of other callbacks
2011-09-02 11:22:41 +00:00
Andrey Hristov
d96e924b25
function rename to comply with the schema of other callbacks
2011-09-02 11:22:41 +00:00
Andrey Hristov
c9e7716cfd
Add mysqli_error_list() that returns an array with errors. Typically only
...
one and just one for libmysql. mysqlnd can return generate more than one error
during its work and with mysqli_error() only the last error is being reported.
In the array returned by mysqli_error_list() / $mysqli->error_list, all errors will be found.
The list is reset when the next command is executed
2011-08-04 09:51:26 +00:00
Andrey Hristov
3afdf62df0
throw out legacy code, that never was used for something
...
useful. Was added for QC but QC is now a plugin, not part of
the core.
2011-03-21 13:58:11 +00:00
Andrey Hristov
f06443593e
add a proxy for sppintf and vspprintf
2011-03-18 14:56:20 +00:00
Andrey Hristov
c90df5850b
WS
2011-03-18 13:55:25 +00:00
Andrey Hristov
2d2d1c7335
new function/methods - mysqlnd_stmt_flush. Removing
...
code duplication
2011-03-18 13:35:33 +00:00
Andrey Hristov
ca5df2a8bb
less trace info
2011-03-18 12:33:17 +00:00
Andrey Hristov
4a38256394
compiler warnings fixed
2011-03-16 11:51:56 +00:00
Andrey Hristov
44cd358f04
fix warnings. These checks are not needed because
...
param_no is unsigned, it wasn't in the beginning.
2011-02-01 16:55:20 +00:00
Andrey Hristov
6157793026
fix warnings. These checks are not needed because
...
param_no is unsigned, it wasn't in the beginning.
2011-02-01 16:55:20 +00:00
Pierre Joye
0c665f0996
- fix the fix (wrong test)
2011-01-18 10:29:26 +00:00
Pierre Joye
b3efabda4c
- fix the fix (wrong test)
2011-01-18 10:29:26 +00:00
Pierre Joye
59dc221530
- fix NULL derefencing
2011-01-17 14:01:01 +00:00
Pierre Joye
5c23366d6b
- fix NULL derefencing
2011-01-17 14:01:01 +00:00
Felipe Pena
927bf09c29
- Year++
2011-01-01 02:19:59 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Andrey Hristov
85b434465c
enable again after 5.3.4 has already been tagged
2010-12-08 21:55:29 +00:00
Andrey Hristov
fc6e70d8e4
switch this off for the release
2010-12-07 11:13:55 +00:00
Andrey Hristov
27ecaa7901
Skip additional result sets sent by MySQL 5.5 servers
...
which break the Protocol API
(see http://bugs.mysql.com/bug.php?id=58700 )
2010-12-06 13:59:14 +00:00
Andrey Hristov
5efdfee8c6
Skip additional result sets sent by MySQL 5.5 servers
...
which break the Protocol API
(see http://bugs.mysql.com/bug.php?id=58700 )
2010-12-06 13:59:14 +00:00
Andrey Hristov
2d2d6f84ba
fix some uninitialized variables. also fix shadowing of global symbols
2010-10-07 13:49:00 +00:00
Andrey Hristov
0e519d247e
fix some uninitialized variables. also fix shadowing of global symbols
2010-10-07 13:49:00 +00:00
Andrey Hristov
1f9cf93cac
Fix for Bug #52686 mysql_stmt_attr_[gs]et arg. points to incorrect type
2010-10-06 11:11:02 +00:00
Andrey Hristov
4f62c099cd
Fix for Bug #52686 mysql_stmt_attr_[gs]et arg. points to incorrect type
2010-10-06 11:11:02 +00:00
Andrey Hristov
3113744c57
Fix a problem that leads to leaks in plugins that
...
use stmt local data - no free is called for statements
that are over-prepared
2010-09-29 13:18:07 +00:00
Andrey Hristov
d55566c7b8
Fix a problem that leads to leaks in plugins that
...
use stmt local data - no free is called for statements
that are over-prepared
2010-09-29 13:18:07 +00:00
Andrey Hristov
22d73027d0
add another hook, maybe the last one, for MYSQLND_STMT, which
...
was missed before
2010-09-28 14:36:18 +00:00
Andrey Hristov
1762d63406
add another hook, maybe the last one, for MYSQLND_STMT, which
...
was missed before
2010-09-28 14:36:18 +00:00
Andrey Hristov
216effe4f5
WS fixes
2010-09-23 16:03:22 +00:00
Andrey Hristov
859a1404bf
WS fixes
2010-09-23 16:03:22 +00:00
Andrey Hristov
fbaed5476c
Fix for
...
Bug #52891 Wrong data inserted with mysqli/mysqlnd when using bind_param,value>LONG_MAX
2010-09-22 11:38:49 +00:00
Andrey Hristov
1de4cfb791
Fix for
...
Bug #52891 Wrong data inserted with mysqli/mysqlnd when using bind_param,value>LONG_MAX
2010-09-22 11:38:49 +00:00
Andrey Hristov
c974313aed
Switch from using PHP_MAJOR_VERSION to separate define for
...
unicode. Unicode is no more, but these are "bookmarks" where
to change mysqlnd, if Unicode becomes trendy again.
2010-08-12 12:02:02 +00:00
Andrey Hristov
92ef63a07b
Switch from using PHP_MAJOR_VERSION to separate define for
...
unicode. Unicode is no more, but these are "bookmarks" where
to change mysqlnd, if Unicode becomes trendy again.
2010-08-12 12:02:02 +00:00
Andrey Hristov
ee4818a12a
Two functions, which should be methods so one can catch
...
their output, for example
2010-06-24 19:52:13 +00:00
Andrey Hristov
89bd3af6b9
Two functions, which should be methods so one can catch
...
their output, for example
2010-06-24 19:52:13 +00:00
Andrey Hristov
53324e8830
Fix sprintf modifiers all around the place. In most cases
...
%u should be used. Where size_t is used then MYSQLND_SZ_T_SPEC should be
the modifier
2010-06-21 15:32:26 +00:00
Andrey Hristov
baf72b7336
Fix sprintf modifiers all around the place. In most cases
...
%u should be used. Where size_t is used then MYSQLND_SZ_T_SPEC should be
the modifier
2010-06-21 15:32:26 +00:00
Andrey Hristov
e692080fc5
void functions return nothing
2010-06-10 09:37:58 +00:00
Andrey Hristov
408d786aa2
void functions return nothing
2010-06-10 09:37:58 +00:00
Andrey Hristov
4a0b4494d4
defensive programming, check before using a resource
2010-06-01 14:16:27 +00:00
Andrey Hristov
c7831cbe27
defensive programming, check before using a resource
2010-06-01 14:16:27 +00:00
Andrey Hristov
41406516b6
Perform later initialization
2010-06-01 09:47:46 +00:00
Andrey Hristov
e6b4e01ce0
Perform later initialization
2010-06-01 09:47:46 +00:00
Andrey Hristov
2a043ed2d3
More check for valid MYSQLND_STMT before using it
2010-05-31 18:26:19 +00:00
Andrey Hristov
3fe085d10b
More check for valid MYSQLND_STMT before using it
2010-05-31 18:26:19 +00:00
Andrey Hristov
38f6c131e5
Don't reference row_packet before checking if dereferencing is possible
2010-05-31 18:18:37 +00:00
Andrey Hristov
40e6685063
Don't reference row_packet before checking if dereferencing is possible
2010-05-31 18:18:37 +00:00
Andrey Hristov
b472636375
Check if data is correct and initialize in a safe manner
2010-05-31 18:10:25 +00:00
Andrey Hristov
c195dc21a2
Check if data is correct and initialize in a safe manner
2010-05-31 18:10:25 +00:00
Andrey Hristov
047d6f2855
Handle problems in the row_decoder, return type used to be void,
...
now it can return on problems.
2010-05-31 17:57:03 +00:00
Andrey Hristov
d02e785d68
Handle problems in the row_decoder, return type used to be void,
...
now it can return on problems.
2010-05-31 17:57:03 +00:00
Andrey Hristov
b7385f02fd
Fix deallocation which can crash if the object is half-baken.
...
Happens during OOM.
2010-05-27 08:51:46 +00:00
Andrey Hristov
4de0da5a56
Fix deallocation which can crash if the object is half-baken.
...
Happens during OOM.
2010-05-27 08:51:46 +00:00
Andrey Hristov
58f13c3c9f
Handle the situation when MYSQLND_PROTOCOL's methods return NULL.
...
mysqlnd should not crash but gracefully return with an error.
2010-05-25 23:18:13 +00:00
Andrey Hristov
433cb868d6
Handle the situation when MYSQLND_PROTOCOL's methods return NULL.
...
mysqlnd should not crash but gracefully return with an error.
2010-05-25 23:18:13 +00:00
Andrey Hristov
c5ff0eb5b8
Gracefully handle OOM in mysqlnd_stmt_init. Release the handle
...
and return NULL.
2010-05-25 22:42:25 +00:00
Andrey Hristov
708b31a510
Gracefully handle OOM in mysqlnd_stmt_init. Release the handle
...
and return NULL.
2010-05-25 22:42:25 +00:00
Andrey Hristov
337513ffa0
Handle OOM in the code that generates PS Execute requests
...
to the server. Fixes crashes in case of OOM.
2010-05-25 19:19:29 +00:00
Andrey Hristov
954e7db644
Handle OOM in the code that generates PS Execute requests
...
to the server. Fixes crashes in case of OOM.
2010-05-25 19:19:29 +00:00
Andrey Hristov
b86ebe46cb
- Give possibility to overload mysqlnd_result_init().
...
- Always use conn->m->stmt_init instead of mysqlnd_stmt_init()
2010-05-14 13:18:39 +00:00
Andrey Hristov
8691786ebd
- Give possibility to overload mysqlnd_result_init().
...
- Always use conn->m->stmt_init instead of mysqlnd_stmt_init()
2010-05-14 13:18:39 +00:00
Andrey Hristov
ce0ea97850
OOM fixes
2010-05-14 13:04:33 +00:00
Andrey Hristov
dd85f9c2f2
OOM fixes
2010-05-14 13:04:33 +00:00
Andrey Hristov
ebae62d7c4
OOM stability fixes
2010-05-04 14:02:42 +00:00
Andrey Hristov
d53337bbe7
OOM stability fixes
2010-05-04 14:02:42 +00:00
Andrey Hristov
2b18a3ff93
Handle OOM stemming from mysqlnd_result_init in the same
...
function and up the stack.
2010-05-03 18:50:47 +00:00
Andrey Hristov
d0cef550a3
Handle OOM stemming from mysqlnd_result_init in the same
...
function and up the stack.
2010-05-03 18:50:47 +00:00
Andrey Hristov
ec0fe858c6
Remove unused parameter
2010-05-03 16:09:05 +00:00
Andrey Hristov
864f2da733
Remove unused parameter
2010-05-03 16:09:05 +00:00
Andrey Hristov
34e56fea0b
Remove dead code and add possibility to fine tune the size of
...
a mempool (used for result sets).
2010-04-22 15:07:40 +00:00
Andrey Hristov
1ed3da294b
Remove dead code and add possibility to fine tune the size of
...
a mempool (used for result sets).
2010-04-22 15:07:40 +00:00
Felipe Pena
a175419f84
- Fix copyrights
2010-04-20 13:50:34 +00:00
Felipe Pena
6d951e2ded
- Fix copyrights
2010-04-20 13:50:34 +00:00
Andrey Hristov
6aa682f564
CS + WS changes
2010-04-15 12:55:04 +00:00
Andrey Hristov
a9880e78c6
CS + WS changes
2010-04-15 12:55:04 +00:00
Andrey Hristov
aa8f43fad9
Recommit with an Windows build fix:
...
Fix inconsistencies
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
by it.
- add a mode to track memory usage (malloc/free)
2010-04-06 13:28:23 +00:00
Pierre Joye
96e2651fa2
- revert revision 297277, break the builds (declaration must go 1st, size of void * and other known situations). Also Johannes, can you check that commit pls? Thought we were in bugs fixing only for 5.3
2010-04-01 20:21:50 +00:00
Andrey Hristov
d339672e45
Fix inconsistencies
...
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
by it.
- add a mode to track memory usage (malloc/free)
2010-04-01 13:26:41 +00:00
Andrey Hristov
f534df710e
Fix inconsistencies
...
- memory allocated with spprintf, or likes, outside of mysqlnd's
allocator functions should not be freed by the mysqlnd's allocator
(a wrapper around emalloc/malloc).
- memory allocated by the mysqlnd's allocator should only be freed
by it.
- add a mode to track memory usage (malloc/free)
2010-04-01 13:26:41 +00:00
Andrey Hristov
4941b23bcd
Fix a bug that a statement that is reset doesn't clean
...
the wire properly (as it is done when the statement is closed).
If there is more that one result sets returned from the PS
(like a call to SP that returns at least one RSet next to the
status rset) then the line was blocked. PS Multi-Res is not supported
in any libmysql from a GA-ed MySQL.
2010-03-17 18:00:47 +00:00
Andrey Hristov
3ff193c05e
fix valgrind warning introduced with the latest patch. The memory
...
should be calloc-ed, not malloced, because the code that uses the
stmt storage needs that.
2010-03-17 11:40:37 +00:00
Andrey Hristov
7496cc761e
decouple the methods in MYSQLND_STMT from the data,
...
needed to move to a new structure MYSQLND_STMT. Makes
the code cleaner and less error-prone.
Also fix PDO/MySQL which directly touch mysqlnd internals
instead of using API calls.
2010-03-16 12:36:57 +00:00
Andrey Hristov
ccfd9cd744
allow persistency of PS
2010-03-12 13:03:46 +00:00
Andrey Hristov
e50de7d982
Pass tsrmls to all functions, which might need it in the future.
...
We are anyway breaking the internal ABI in 5.3.2 so this won't hurt
and make us prepared for the future.
2010-02-03 17:31:29 +00:00
Andrey Hristov
2331e28509
cosmetics. typedef-ed types should be in capital case
2010-01-11 20:10:10 +00:00
Andrey Hristov
d20fdd603b
improve the stats subsystem. Reduce the number of macro definitions
...
in half by smartly introducing 2 new macros. Make MYSQLND::stats a pointer
from being aggregated and add triggers.
2010-01-08 17:35:20 +00:00
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