Commit Graph

183 Commits

Author SHA1 Message Date
Andrey Hristov
01adfaee5f Unify. The typedef-ed structs in mysqlnd are always capitalized. 2009-12-23 11:58:45 +00:00
Johannes Schlüter
c764995c8e install mysqlnd headers to allow shared build of extensions 2009-12-22 19:30:09 +00:00
Andrey Hristov
c95fa280ed 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
e1251edc16 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
41ac91aecf Move this function to MYSQLND_NET as it works on the
php stream
2009-12-21 16:52:10 +00:00
Andrey Hristov
ce349e3540 magic numbers to macros 2009-12-21 16:17:31 +00:00
Andrey Hristov
b4477669b4 Move compression and decompression code to separate functions
which can be overloaded on purpose.
2009-12-21 16:09:13 +00:00
Andrey Hristov
028bd4ba02 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
22528b14a4 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
d233b0b2af 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
a1ef2d9fb3 Remove unneeded dereferences
(oops, committed the trunk changes from a wrong directory, which splitted
this commit).
2009-12-16 14:06:09 +00:00
Andrey Hristov
b3546d1b5e 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
5e1c95fda4 remove duplicated code 2009-12-15 17:39:30 +00:00
Andrey Hristov
c101f7f542 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
70690e1163 remove C++ comments 2009-12-15 14:48:24 +00:00
Andrey Hristov
523471f7e8 export this function 2009-12-15 14:26:24 +00:00
Andrey Hristov
0371ef1070 refactor: move code that belongs to MYSQLND_NET out of MYSQLND 2009-12-15 13:13:51 +00:00
Pierre Joye
af206a90ae - 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
13c8bba00a 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
a9295f0343 remove stale comment 2009-12-11 10:21:34 +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
a633de0020 bump version number 2009-12-10 11:59:14 +00:00
Andrey Hristov
00d76a8445 Add plugin storage for MYSQLND_STMT too 2009-12-10 11:18:05 +00:00
Andrey Hristov
06a417b6a9 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
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
d8a8d823ce Fix compilation warnings 2009-12-09 18:11:03 +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
0f0f5f229b 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
2386938aea - disable this debug code until it is actually fixed 2009-12-03 10:41:20 +00:00
Andrey Hristov
bfc0ec1891 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
2bc887e1d3 fix macro so that 5-byte BIT values are decoded correctly 2009-12-02 11:58:04 +00:00
Pierre Joye
2a3ec70d10 - 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
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
4ebc0fdfbc Update charset table 2009-11-24 13:59:56 +00:00
Andrey Hristov
5143fe41e2 Compressed protocol support + extensibility for mysqlnd 2009-11-20 08:12:14 +00:00
Ulf Wendel
08db32e073 Fix: log slow queries in stats regardless of mysqlnd.log_mask setting. 2009-10-23 12:44:05 +00:00
Andrey Hristov
7b5ce9ab49 Don't forget to update the length too 2009-10-22 17:36:12 +00:00
Andrey Hristov
f2814dd0df Have the lengths also to skip many calls to strlen 2009-10-22 17:07:55 +00:00
Ulf Wendel
629d8fe47e Updating mysqlnd version number. 2009-10-22 16:10:02 +00:00
Ulf Wendel
00654b8a06 Fixing stats, updating test to accept new stats 2009-10-22 16:05:33 +00:00
Andrey Hristov
1aad525c6e Move definition 2009-10-22 15:17:03 +00:00
Andrey Hristov
a692479d21 Count number of affected_rows for normal and PS queries 2009-10-22 14:30:51 +00:00
Ulf Wendel
d01d398bad Fixing host info for TCP/IP and aligning mysqlnd and libmysql 2009-10-19 12:09:48 +00:00
Ulf Wendel
3eeaf566e0 Extending mysqlnd statistics/monitoring. Now counting COM_* commands. 2009-10-16 13:02:01 +00:00
Ulf Wendel
d8dc47d58f Making mysqlnd emit no warnings when fetching pooled persistent connections that have timed out or are unusable for any other reason - bug #49761 2009-10-15 20:46:08 +00:00
Ulf Wendel
ab4670ee53 Fixing problems when calling connect (again and again) on a valid connection handle. Most of the patch comes from Andrey. 2009-10-15 15:49:40 +00:00
Ulf Wendel
a1d3a3224e Avoid buffer resizing and let the initial buffer allocation happen a couple of lines later with conn->m->set_client_option(conn, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, ...). Andrey, I leave it to you to change the default size to 128k. 2009-10-08 16:33:17 +00:00
Ulf Wendel
4e6a1c2754 Fixing pconnect statistics. 2009-10-08 11:40:16 +00:00
Andrey Hristov
309fced64d Increase the minimal size of the command buffer, which is used
for sending queries and in the future commpressed patch for reading
almost all packets from the wire instead of using stack buffers.
2009-10-07 17:33:51 +00:00
Andrey Hristov
06523621dd revert the last change 2009-10-06 12:53:01 +00:00