Commit Graph

80 Commits

Author SHA1 Message Date
Andrey Hristov
ce4e6f4db5 Handle MySQL 5.5 authentication features.
Authentication protocol can be changed, a new raw
packet is introduced, which includes only the "encrypted"
data for the auth plugin, sent after change protocol (0xFE)
is sent to the client.
2011-01-24 12:34:47 +00:00
Andrey Hristov
16c6ce94d2 Update on the mysqlnd auth plugins, changed the plugin
structure and where they load themselves.
0xFE packets (method switch) needs to be done, additional
wire-level packet to be created to be parsed and the packet
doesn't fit the PACKET_OK structure anymore.
2011-01-14 20:04:17 +00:00
Andrey Hristov
5ca5c2bf43 Change things to allow passing of the password length
to mysqlnd. This is needed as a password might include
a \0 and thus we need to be binary safe.
2011-01-14 13:00:42 +00:00
Andrey Hristov
429e07bba2 grok the MySQL 5.5 extended handshake.
Move the authentication routines, the native ones, to
separate file and encapsulate them in a plugin.
Depending on the server version and what the server
requests (or doesn't in old versions) load the authentication
plugin to handle it.
Currently only the 4.1+ authentication is supported. More to come
2011-01-12 21:40:05 +00:00
Felipe Pena
0203cc3d44 - Year++ 2011-01-01 02:17:06 +00:00
Andrey Hristov
cfac5f5b67 extending the API interface - plugins can register
themselves with a structure and can be searched.
Every plugin can have statistics and they are shown
under the statistics of mysqlnd in MINFO.
2010-12-28 15:16:21 +00:00
Andrey Hristov
60bfedb1e6 rename parameter, should not conflict with global symbol -
the socket function
2010-10-05 16:27:49 +00:00
Andrey Hristov
75ed0bbb3e fixing more types 2010-10-05 10:30:00 +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
383d7d005a fix build on windows, seems this macro is not defined 2010-09-01 16:54:20 +00:00
Andrey Hristov
b2bcf3ae48 OPT_COMPRESS support for mysqlnd_conn::set_client_option
To be used by mysqli_options
2010-09-01 14:47:36 +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
ebaee8a4d0 Lay foundations for named pipe support in mysqlnd 2010-08-09 17:01:57 +00:00
David Soria Parra
d9afaad77f make ssl_set return value in mysqlnd compatible with libmysqli return value 2010-08-06 19:47:03 +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
986e30048d missed this one in the last commit, the real type 2010-06-18 12:00:57 +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
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
6d434e70a4 Init should return status value because initialization can fail.
In this case mysqlnd_init() should return NULL to the end-user.
2010-05-25 22:40:47 +00:00
Andrey Hristov
8a093b3811 Allow overloading of mysqlnd_result_meta_init().
Add free space for future hooks.
2010-05-14 15:11:56 +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
ec0fe858c6 Remove unused parameter 2010-05-03 16:09:05 +00:00
Andrey Hristov
8e8348a4b0 Handle OOM when resizing blocks during data fetch 2010-05-03 14:16:04 +00:00
Andrey Hristov
16d5d5966e const-ify fields 2010-04-28 12:29:13 +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
6d951e2ded - Fix copyrights 2010-04-20 13:50:34 +00:00
Andrey Hristov
a9880e78c6 CS + WS changes 2010-04-15 12:55:04 +00:00
Andrey Hristov
c04f752625 Fix for bug#49234 method not found ssl_set
Patch was tested and compiles on Windows. (Thanks Kalle)
2010-04-15 11:01:30 +00:00
Andrey Hristov
a8460553be 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
564a1d07f8 allow persistency of PS 2010-03-12 13:03:46 +00:00
Andrey Hristov
7bf18d9766 add typedefs for all structure methods, and then reuse these typedefs 2010-02-15 16:58:33 +00:00
Andrey Hristov
5dff8f9045 make send_close a hook, too 2010-02-09 19:05:40 +00:00
Andrey Hristov
055f558554 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
a449a371a8 cosmetics. typedef-ed types should be in capital case 2010-01-11 20:10:10 +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
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
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
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
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
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
e6e40722d9 refactor: move code that belongs to MYSQLND_NET out of MYSQLND 2009-12-15 13:13:51 +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
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
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