Andrey Hristov
a449a371a8
cosmetics. typedef-ed types should be in capital case
2010-01-11 20:10:10 +00:00
Andrey Hristov
9939429f4e
remove extern defintion of a variable that is no more
...
used outside of the file where it is declared.
Also really export with PHPAPI the protocol init/deinit functions
2010-01-11 19:13:43 +00:00
Andrey Hristov
9831a18d17
this function should be exporten in all cases, not only under PHP6
2010-01-11 18:40:11 +00:00
Andrey Hristov
6af43eaccb
missed to commit in 5_3, here it comes, reusability of stats
2010-01-11 18:31:02 +00:00
Andrey Hristov
1ea390938b
and another change to make the stats API re-usable
2010-01-11 18:27:31 +00:00
Andrey Hristov
41ead37c04
Rework the statistics macros to be reusable by external entities.
...
Rename handlers to triggers. Dynamically allocate space for the
statistics thus allow reusability.
2010-01-11 14:27:35 +00:00
Andrey Hristov
b2fcc0587f
Add the remaining code for statistics triggers
2010-01-08 19:14:06 +00:00
Andrey Hristov
b1ac377163
export some calls to init/deinit code outside of the module
2010-01-08 18:52:08 +00:00
Andrey Hristov
a98a67940a
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
fcef58951b
add restart_psession and end_psession hooks
2010-01-08 13:47:03 +00:00
Andrey Hristov
81b0630f5a
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
Sebastian Bergmann
22f4ef45fe
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Andrey Hristov
d3619df322
move network creation to the init hook
2009-12-28 11:17:10 +00:00
Andrey Hristov
066dad5ff9
Unify. The typedef-ed structs in mysqlnd are always capitalized.
2009-12-23 11:58:45 +00:00
Johannes Schlüter
30dbb982bd
install mysqlnd headers to allow shared build of extensions
2009-12-22 19:30:09 +00:00
Andrey Hristov
707e86274b
Fix double calls to free_contents if the connection cannot be
...
opened. mysqlnd have no probs, external code should not have too.
In any case, double call is not needed.
2009-12-22 17:44:42 +00:00
Andrey Hristov
e695a83c66
move state setting to the right place, in mysqlnd_init, no more
...
in mysqlnd::connect
2009-12-22 17:31:31 +00:00
Andrey Hristov
a3e5d1852a
Move this function to MYSQLND_NET as it works on the
...
php stream
2009-12-21 16:52:10 +00:00
Andrey Hristov
3e3d0e0d88
magic numbers to macros
2009-12-21 16:17:31 +00:00
Andrey Hristov
c9c418b971
Move compression and decompression code to separate functions
...
which can be overloaded on purpose.
2009-12-21 16:09:13 +00:00
Andrey Hristov
f8dcfbc74f
refactoring : move more network related functions to
...
mysqlnd_net.c . Now communication is split on two levels:
- logical (functions send and receive)
- physical (functions network_read and network_write)
2009-12-17 13:29:46 +00:00
Andrey Hristov
60697e1876
During refactoring of the function mysqlnd_stream_write_w_header() it was
...
found that there is a bug in the way the data is sent, although a very rare
one which will only affect very large queries which have length 16777214. The
communication will hang. A way to test it is to execute the following:
./php -r '$c=mysqli_connect("127.0.0.1","root","root","test");
$q="insert into test.tblob values(\"".str_repeat("a",256*256*256-1-34)."\")";
$c->query($q);'
2009-12-17 12:30:58 +00:00
Andrey Hristov
e0441d594e
call free_contents in every case, in case something is not freed
...
by the calling code
2009-12-16 14:38:30 +00:00
Andrey Hristov
6adc50b460
Remove unneeded dereferences
2009-12-16 14:05:35 +00:00
Andrey Hristov
9f21c91a08
move MYSQLND_NET code to a separate file.
...
mysqlnd_wireprotocol is about the protocol not the transport
layer
2009-12-16 12:59:38 +00:00
Andrey Hristov
857e83a249
remove duplicated code
2009-12-15 17:39:30 +00:00
Andrey Hristov
1fc65ed8bb
Move code out of mysqlnd_conn::connect to mysqlnd_net::connect.
...
Thus mysqlnd_conn::connect() does less of what it should not do - think
about the transport level.
2009-12-15 17:33:06 +00:00
Andrey Hristov
37cbcf3850
remove C++ comments
2009-12-15 14:48:24 +00:00
Andrey Hristov
a5640ede09
export this function
2009-12-15 14:26:24 +00:00
Andrey Hristov
e6e40722d9
refactor: move code that belongs to MYSQLND_NET out of MYSQLND
2009-12-15 13:13:51 +00:00
Pierre Joye
1ab58199a9
- fix build, come on, it is not that hard to test before commit, is it?
2009-12-11 16:35:42 +00:00
Andrey Hristov
b1d4cea57e
Make MYSQLND_NET dynamically allocated structure with allocator
...
and deallocator. More member functions will come.
2009-12-11 11:58:57 +00:00
Andrey Hristov
fd0d9822d8
remove stale comment
2009-12-11 10:21:34 +00:00
Andrey Hristov
2cc95115f3
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
1121c11899
bump version number
2009-12-10 11:59:14 +00:00
Andrey Hristov
311684e1e4
Add plugin storage for MYSQLND_STMT too
2009-12-10 11:18:05 +00:00
Andrey Hristov
3a7f8ea575
Remove stub code which never actually was used for anything.
...
Things like this can be built on top of the core.
2009-12-09 20:38:11 +00:00
Andrey Hristov
fd44827701
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
685a8398a9
Fix compilation warnings
2009-12-09 18:11:03 +00:00
Andrey Hristov
157f1bddf1
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
3cfacd1e07
I svn-commit.2.tmp (Modified) Row 2 Col 28 11:45 Ctrl-K H for help
...
fix compilation on windows and with other compilers who
don't like void* arithmetic
2009-12-03 10:50:02 +00:00
Pierre Joye
330523c60c
- disable this debug code until it is actually fixed
2009-12-03 10:41:20 +00:00
Andrey Hristov
4c1065522d
fix segfault introduced by Pierre in a recent commit
...
old code was doing something like
conn + sizeof(MYSQLND) * MYSQLND + plugin * sizeof(void) * sizeof(MYSQLND)
because `conn` is not casted to void*. `conn` has to be casted to void * and
then the whole experession will be void * and the calculations will work.
2009-12-03 09:43:26 +00:00
Andrey Hristov
8f0a26cc79
fix macro so that 5-byte BIT values are decoded correctly
2009-12-02 11:58:04 +00:00
Pierre Joye
80e5ef6fa5
- void is NaN, you can't do math ops on void. Declarations go first. Fix TS build
2009-11-30 10:56:01 +00:00
Andrey Hristov
0c6fa49fff
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
597406bbb3
Update charset table
2009-11-24 13:59:56 +00:00
Andrey Hristov
7674c942c7
Compressed protocol support + extensibility for mysqlnd
2009-11-20 08:12:14 +00:00
Ulf Wendel
bd64a66e1a
Fix: log slow queries in stats regardless of mysqlnd.log_mask setting.
2009-10-23 12:44:05 +00:00
Andrey Hristov
4afa56f846
Don't forget to update the length too
2009-10-22 17:36:12 +00:00