Commit Graph

443 Commits

Author SHA1 Message Date
Johannes Schlüter
b83b4880d3 - Move the field access behind the check
# Only called from one place where the connection is checked, but
# playing safe, again (parfait)
2011-05-17 00:16:57 +00:00
Johannes Schlüter
898e3095f1 - Move the access behind the check.
# I can't find an unsafe call, but let's play safe
2011-05-16 10:15:28 +00:00
Andrey Hristov
9a197618b4 Fix range
(thanks again nihen)
2011-05-10 07:15:22 +00:00
Andrey Hristov
d4ae5bd995 Fix for bug 54674..typo in the check of SJIS 2011-05-09 16:20:35 +00:00
Andrey Hristov
91bddbe26e add the BLOCK_LEAVE macro for non-gcc and non-win 2011-05-04 19:09:12 +00:00
Andrey Hristov
84a309f87b reorganize the DBG_ macros, add DBG_BLOCK_XXX 2011-05-04 19:05:19 +00:00
Andrey Hristov
2d5e51db05 fix valgrind warning 2011-05-04 10:35:04 +00:00
Sebastian Bergmann
6f3148db81 Add optional argument to debug_backtrace() and debug_print_backtrace() to limit the amount of stack frames returned. 2011-04-09 09:52:24 +00:00
Pierre Joye
b7a99bbbb8 - fix build 2011-03-30 09:25:09 +00:00
Ulf Wendel
8138f7de40 Update of mysqlnd version. This has been forgotten when introducing set_autocommit, tx_commit, tx_rollback calls (http://svn.php.net/viewvc?view=revision&revision=308669). 2011-03-25 10:45:28 +00:00
Andrey Hristov
133ba9b5dd fix buffer overflow - overwriting with 0x0, due to
unchecked buffer size. This can be easily workarouned on 
existing unpatched systems by increasing
mysqlnd.net_cmd_buffer_size ini variable to more than 8k
2011-03-24 16:12:18 +00:00
Andrey Hristov
e7a5fb405e Fix compressed build, make it easier 2011-03-23 17:14:28 +00:00
Andrey Hristov
3ffac762b0 palloc is long dead, use more appropriate name 2011-03-22 14:39:58 +00:00
Andrey Hristov
a6d4f047d4 Fix message 2011-03-22 14:39:36 +00:00
Andrey Hristov
cfb01aab63 remove more unneeded includes 2011-03-22 12:54:02 +00:00
Andrey Hristov
15fd9c4f58 remove unneeded includes 2011-03-22 12:22:16 +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
8c14436f73 split mysqlnd_debug.c in 3 files 2011-03-18 11:58:46 +00:00
Andrey Hristov
34846cff4d Remove unused macros 2011-03-16 14:10:59 +00:00
Andrey Hristov
5d9b15feb1 allocate persistently 2011-03-16 12:42:59 +00:00
Andrey Hristov
4a38256394 compiler warnings fixed 2011-03-16 11:51:56 +00:00
Andrey Hristov
2a9e82d020 even better fix 2011-02-25 16:55:27 +00:00
Andrey Hristov
5373a3949c fix plugin counting, this is trunk only 2011-02-25 16:44:39 +00:00
Andrey Hristov
59c5875f83 move from macros to functions, which can be overwritten, if needed 2011-02-25 12:25:36 +00:00
Andrey Hristov
2e30412f20 fix invalid memory read. Thank you, valgrind 2011-02-21 16:24:37 +00:00
Andrey Hristov
eb0dd2b8ab fixed a problem in mysqlnd. 0 was always as num_rows returned for
unbuffered sets (text protocol and PS).
2011-02-16 16:36:33 +00:00
Andrey Hristov
01745fa657 Fix more warnings about size_t 2011-02-01 19:30:22 +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
423000075f Add two new enums constants from the server 2011-01-31 13:52:21 +00:00
Andrey Hristov
d82b05a64b Don't lose this data anymore. It worked without the fix,
but it with it is just correct (trunk only).
2011-01-31 13:29:18 +00:00
Kalle Sommer Nielsen
ddcac10dd1 Fixed bug #53795 (Connect Error from MySqli (mysqlnd) when using SSL) 2011-01-31 12:47:28 +00:00
Kalle Sommer Nielsen
c8a25b87f1 Use our own zend_strndup() implementation of strndup() -- Fixes build on platforms without strndup(), like Windows 2011-01-31 12:32:32 +00:00
Andrey Hristov
2e3e86b996 clear error before doing anything, because we can get
trapped by previous error :
php -r '$link = mysqli_init();
var_dump($link->real_connect("127.0.0.1", "unknown", "unknown"));
var_dump($link->real_connect("127.0.0.1", "known", "password"));'

shows the problem. The second connect did not work, as it should be.
2011-01-28 17:33:14 +00:00
Andrey Hristov
c2887dd8f5 a better habitat 2011-01-27 18:51:12 +00:00
Andrey Hristov
942ea00eea fix a crash in new code 2011-01-27 17:30:29 +00:00
Andrey Hristov
2cdc51e580 fix typos 2011-01-24 13:59:28 +00:00
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
87a2104c1a fix ZTS build 2011-01-19 17:51:02 +00:00
Pierre Joye
0c665f0996 - fix the fix (wrong test) 2011-01-18 10:29:26 +00:00
Pierre Joye
a1b2df31d6 - don't try to access if calloc fails (quick review of its usage: seems that the stats member is validated in other places, to be confirmed) 2011-01-17 14:07:40 +00:00
Pierre Joye
59dc221530 - fix NULL derefencing 2011-01-17 14:01:01 +00:00
Kalle Sommer Nielsen
2d9325ec2c Fix mysqlnd build 2011-01-16 15:44:48 +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