Commit Graph

36 Commits

Author SHA1 Message Date
Andrey Hristov
4439bde560 small cleanups 2011-01-24 13:58:18 +00:00
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
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
769a3cf0c3 - More features for the profiling, create aggregates and dump them
on file close.
- Also add a trace modifier to switch on and off the profiling.
- With additional compiler switch the profiling can be completely omitted,
of course it makes sense only when --enable-debug. Because otherwise
there is no tracing, thus no profiling.
- Added a fix for Windows for handling trace files on different devices
 (special handing of ':' )
2010-10-29 15:02:39 +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
3010485d44 Handle OOM cases, in case of persistent connections this is real
and the Zend MM won't help.
2010-04-29 15:49:51 +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
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
204f52f7e0 export more functionality for phpize builds 2010-01-13 18:00:41 +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
7674c942c7 Compressed protocol support + extensibility for mysqlnd 2009-11-20 08:12:14 +00:00
Andrey Hristov
b39c5e2332 Move definition 2009-10-22 15:17:03 +00:00
Ulf Wendel
1b5f0f63b4 Fix (by Andrey) and test for bug #49442 . Don't use efree() for memory allocated with malloc()... If a connection gets created by mysqli_init(), mysqlnd makes it 'persistent'. 'Persistent' means that mysqlnd uses malloc(). mysqlnd does use malloc() instead of ealloc() because it is unknown if the connection will become a true persistent connection in the sense of ext/mysqli. It is unknown if the user wants a persistent connection or not until the user calls mysqli_real_connect(). To avoid tricky conversions mysqlnd uses malloc(), which sets a private persistent flag in the mysqlnd structures. A precondition for the crash to happen was that the private persistent flag is set. The flag is also set when creating a real persistent connection (in the sense of ext/mysqli) and so the bug can happen with mysql_init()/mysqli_real_connect() and mysql_connect('p:<host>', ...). Therefore we test both cases. Note the (tricky?) difference between the implementation detail'mysqlnd private persistent flag = use malloc()' and persistent connections from a user perspective. Although mysqlnd will always set its private persistent flag and use malloc() for connections created with mysqli_init() it is still up to the user to decide in mysqli_real_connect() if the connection shall become a (true) persistent connection or not. 2009-09-16 17:03:44 +00:00
Johannes Schlüter
6a6e94c0d9 - Improve mysqlnd's internal method registration 2009-02-16 17:25:37 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Andrey Hristov
0b46d6b5a5 Get rid of many defines (which simplifies the code a lot),
as well as uint->unsigned int
2008-11-06 10:36:30 +00:00
Andrey Hristov
65f5d4e434 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:30:33 +00:00
Johannes Schlüter
71c14293fc constify strings 2008-08-19 10:42:00 +00:00
Andrey Hristov
5da78b297b 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:04:58 +00:00
Andrey Hristov
e53f44b9bd MFB - Bug #44352 mysqli_connect_error() false negative for host errors 2008-03-18 16:58:43 +00:00
Andrey Hristov
925c22c65b new 6.0 flag 2008-02-11 14:48:39 +00:00
Andrey Hristov
6d9fdbce50 MFB:
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:54:21 +00:00
Andrey Hristov
18c8e6501b MFB: 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:27:49 +00:00
Andrey Hristov
69f4a40d99 Merge with internal version 2008-01-23 19:09:33 +00:00
Andrey Hristov
5a4f6015bb strncpy->strlcpy 2008-01-08 13:13:39 +00:00
Andrey Hristov
69f7eaa749 - 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:16:46 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Andrey Hristov
a0aa80a3f8 Sync mysqlnd with HEAD. Same sources as in 5_3 2007-10-16 20:58:35 +00:00
Andrey Hristov
9ac92cfecb Update mysqlnd in HEAD
Updated ext/mysql and ext/mysqli in HEAD
2007-10-02 10:45:27 +00:00
Andrey Hristov
de29322de4 Fix crashes with pconn in ext/mysql 2007-08-06 15:11:46 +00:00
Andrey Hristov
7186530157 Update CVS
- Fix BIT problem for BIT values represented with 5 bytes. Typo.
- Make it possible with an ini variable to switch off/on statistics
  collection.
- Compile-out debug checking of uneaten data from the line, when the
  build is release. According to callgrind this was eating some percentage.
2007-08-03 16:32:27 +00:00
Jani Taskinen
f3c2a33f42 - Moved mysqnd to it's own directory: It is sort of an extension itself.
(Similar to what ext/libxml is..)
2007-07-25 23:47:33 +00:00