Andrey Hristov
652490d43a
shift code around to two new files - mysqlnd_driver.c
...
and mysqlnd_ext_plugin.c (mysqlnd extension plugin)
2011-10-21 15:28:58 +00:00
Andrey Hristov
efb68d9399
api_ext to reverse_api
2011-10-19 15:04:12 +00:00
Andrey Hristov
5117bf657e
move change_user closer to connect
2011-10-18 14:10:44 +00:00
Andrey Hristov
b5f5770399
MYSQLND_NET refactored not to use any direct reference to MYSQLND (the connection)
...
QC will need an ifdef-layer to compile with this
2011-10-10 20:49:28 +00:00
Johannes Schlüter
a7410ea03d
- Fix folding
2011-09-25 13:06:09 +00:00
Johannes Schlüter
223e2ac106
- Fix folding
2011-09-25 13:06:09 +00:00
Pierre Joye
6c2b670e69
- fix build (macros mess)
2011-09-17 12:41:23 +00:00
Pierre Joye
a68abe830d
- fix TS build
2011-09-17 10:24:18 +00:00
Dmitry Stogov
d6ab6bc6ea
Fixed Windows build
2011-09-16 06:55:43 +00:00
Johannes Schlüter
f90bead78a
- Fix TSRM build
2011-09-01 12:04:54 +00:00
Johannes Schlüter
7d25510b1b
- Register extensions using mysqlnd (mysql, myslqi, pdo_mysql) with mysqlnd
2011-08-31 20:30:08 +00:00
Andrey Hristov
9756f766b6
fix valgrind warnings in debug builds
2011-08-26 12:14:31 +00:00
Andrey Hristov
da2839f71d
fix valgrind warnings in debug builds
2011-08-26 12:14:31 +00:00
Andrey Hristov
56d6f23196
relax constraint
2011-08-10 14:12:24 +00:00
Andrey Hristov
d627115800
relax constraint
2011-08-10 14:12:24 +00:00
Andrey Hristov
c9e7716cfd
Add mysqli_error_list() that returns an array with errors. Typically only
...
one and just one for libmysql. mysqlnd can return generate more than one error
during its work and with mysqli_error() only the last error is being reported.
In the array returned by mysqli_error_list() / $mysqli->error_list, all errors will be found.
The list is reset when the next command is executed
2011-08-04 09:51:26 +00:00
Andrey Hristov
94ccf70c77
longer error messages, don't cut them
2011-07-27 10:26:59 +00:00
Andrey Hristov
11e4f1e39a
longer error messages, don't cut them
2011-07-27 10:26:59 +00:00
Andrey Hristov
774e127a00
free data in case of failure in the callee not in the caller
2011-07-05 20:31:53 +00:00
Andrey Hristov
e77b49bfd3
free data in case of failure in the callee not in the caller
2011-07-05 20:31:53 +00:00
Andrey Hristov
ce816cb883
reuse code
2011-05-31 20:42:44 +00:00
Andrey Hristov
b97e76d512
reuse code
2011-05-31 20:42:44 +00:00
Andrey Hristov
2d5e51db05
fix valgrind warning
2011-05-04 10:35:04 +00:00
Andrey Hristov
f06443593e
add a proxy for sppintf and vspprintf
2011-03-18 14:56:20 +00:00
Andrey Hristov
ca5df2a8bb
less trace info
2011-03-18 12:33:17 +00:00
Andrey Hristov
d4a1f5ac06
revert to previous behavior
2011-02-25 12:52:21 +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
113cd9dc0f
move from macros to functions, which can be overwritten, if needed
2011-02-25 12:25:36 +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
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
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
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
Andrey Hristov
ddbbcdce49
Use common code to handle initial authentication and
...
COM_CHANGE_USER
2011-01-11 13:02:57 +00:00
Felipe Pena
927bf09c29
- Year++
2011-01-01 02:19:59 +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
17b8336047
fix a small bug about affected_rows in the text protocol
2010-12-16 12:56:19 +00:00
Andrey Hristov
b51abfb35f
fix a small bug about affected_rows in the text protocol
2010-12-16 12:56:19 +00:00
Andrey Hristov
e183ea0495
don't crash if the API is used incorrectly
2010-12-06 13:50:51 +00:00
Andrey Hristov
03fd10c479
don't crash if the API is used incorrectly
2010-12-06 13:50:51 +00:00
Andrey Hristov
fe719c5e42
profiling in trace mode
2010-10-22 15:46:26 +00:00
Andrey Hristov
924bb78167
profiling in trace mode
2010-10-22 15:46:26 +00:00
Andrey Hristov
25e84b6a23
Rename a method so it doesn't clash with a global symbol - a function
...
Fix compiler waring by extening the type of a variable
2010-10-05 17:03:50 +00:00
Andrey Hristov
396402fc97
Rename a method so it doesn't clash with a global symbol - a function
...
Fix compiler waring by extening the type of a variable
2010-10-05 17:03:50 +00:00
Andrey Hristov
548661d96d
rename parameter, should not conflict with global symbol -
...
the socket function
2010-10-05 16:27:49 +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
216effe4f5
WS fixes
2010-09-23 16:03:22 +00:00
Andrey Hristov
859a1404bf
WS fixes
2010-09-23 16:03:22 +00:00
Kalle Sommer Nielsen
1ac15b2f8e
Added TSRMLS macros into php_get_current_user()
2010-09-23 04:13:36 +00:00
Andrey Hristov
4c26112c88
Fix for
...
Request #48082 mysql_connect does not work with named pipes
2010-09-22 15:14:04 +00:00
Andrey Hristov
17ae7c1659
remove unneeded proxy function _mysqlnd_restart_psessoin
2010-09-15 12:23:45 +00:00
Andrey Hristov
f60bd23914
remove unneeded proxy function _mysqlnd_restart_psessoin
2010-09-15 12:23:45 +00:00
Andrey Hristov
d99ee78503
Remove unneeded proxy function _mysqlnd_end_psession
2010-09-15 12:11:33 +00:00
Andrey Hristov
d5f1517cd6
Remove unneeded proxy function _mysqlnd_end_psession
2010-09-15 12:11:33 +00:00
Andrey Hristov
8220c2e4ce
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
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
92ef63a07b
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
d27983e781
ws + cs
2010-08-12 11:38:08 +00:00
Andrey Hristov
8bf7114691
ws + cs
2010-08-12 11:38:08 +00:00
Andrey Hristov
f8c2680509
Lay foundations for named pipe support in mysqlnd
2010-08-09 17:01:57 +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
David Soria Parra
9d02d50df2
make ssl_set return value in mysqlnd compatible with libmysqli return value
2010-08-06 19:47:03 +00:00
Andrey Hristov
53324e8830
Fix sprintf modifiers all around the place. In most cases
...
%u should be used. Where size_t is used then MYSQLND_SZ_T_SPEC should be
the modifier
2010-06-21 15:32:26 +00:00
Andrey Hristov
baf72b7336
Fix sprintf modifiers all around the place. In most cases
...
%u should be used. Where size_t is used then MYSQLND_SZ_T_SPEC should be
the modifier
2010-06-21 15:32:26 +00:00
Andrey Hristov
59205a6655
split mysqlnd_connect() in two parts, one doing the authorization
2010-06-17 11:37:49 +00:00
Andrey Hristov
ae4ae5a313
split mysqlnd_connect() in two parts, one doing the authorization
2010-06-17 11:37:49 +00:00
Andrey Hristov
55f879015d
no more needed because of the charset fix in the previous changeset
2010-06-16 19:01:13 +00:00
Andrey Hristov
d47e50a9ff
no more needed because of the charset fix in the previous changeset
2010-06-16 19:01:13 +00:00
Andrey Hristov
65b1895759
Fixed bug #52082 (character_set_client & character_set_connection reset after
...
mysqli_change_user())
libmysql >= 5.1.23 will PASS, older library versions will fail
2010-06-14 17:16:20 +00:00
Andrey Hristov
1d9c49bb3c
Fixed bug #52082 (character_set_client & character_set_connection reset after
...
mysqli_change_user())
libmysql >= 5.1.23 will PASS, older library versions will fail
2010-06-14 17:16:20 +00:00
Andrey Hristov
6ebe80be5d
Don't use NULL pointer, always check before use
2010-05-27 12:39:12 +00:00
Andrey Hristov
3251e54f0f
Don't use NULL pointer, always check before use
2010-05-27 12:39:12 +00:00
Andrey Hristov
0e8b380941
Don't use conn->net without checking if it is NULL, because
...
it can be NULL in OOM conditions. This would cause a crash.
2010-05-26 13:47:43 +00:00
Andrey Hristov
ce136a825c
Don't use conn->net without checking if it is NULL, because
...
it can be NULL in OOM conditions. This would cause a crash.
2010-05-26 13:47:43 +00:00
Andrey Hristov
58f13c3c9f
Handle the situation when MYSQLND_PROTOCOL's methods return NULL.
...
mysqlnd should not crash but gracefully return with an error.
2010-05-25 23:18:13 +00:00
Andrey Hristov
433cb868d6
Handle the situation when MYSQLND_PROTOCOL's methods return NULL.
...
mysqlnd should not crash but gracefully return with an error.
2010-05-25 23:18:13 +00:00
Andrey Hristov
bcdc3b30f7
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
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
b86ebe46cb
- 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
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
7de2607c12
Handle gracefully OOM in mysqlnd_mempool_create and up the stack
2010-05-03 17:07:18 +00:00
Andrey Hristov
6dff9e55be
Handle gracefully OOM in mysqlnd_mempool_create and up the stack
2010-05-03 17:07:18 +00:00
Andrey Hristov
333581fcb4
Better handing of OOM in mysqlnd::set_client_option
2010-05-03 13:45:58 +00:00
Andrey Hristov
d0abd9510e
Better handing of OOM in mysqlnd::set_client_option
2010-05-03 13:45:58 +00:00
Andrey Hristov
a3168a398c
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
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
Andrey Hristov
2c38266536
Fix valgrind warning, usage of nirvana memory
2010-04-29 15:17:44 +00:00
Andrey Hristov
aec94a464b
Fix valgrind warning, usage of nirvana memory
2010-04-29 15:17:44 +00:00
Andrey Hristov
fa40847263
Fix possible crashes in case of OOM, as well as a leak.
2010-04-29 13:13:41 +00:00
Andrey Hristov
ac172db01f
Fix possible crashes in case of OOM, as well as a leak.
2010-04-29 13:13:41 +00:00
Andrey Hristov
be5920b3e9
Move the macro to mysqlnd_enum_n_def.h, because it can be reused
...
in other places. Also, premultiply the values by 4 and add some
reserve for future releases of the server.
2010-04-27 10:53:27 +00:00
Andrey Hristov
4b658e3ded
Move the macro to mysqlnd_enum_n_def.h, because it can be reused
...
in other places. Also, premultiply the values by 4 and add some
reserve for future releases of the server.
2010-04-27 10:53:27 +00:00
Andrey Hristov
5bb74e6562
Fixed buffer overflow in mysqlnd_change_user
2010-04-27 08:26:24 +00:00
Andrey Hristov
207a72ca0e
Fixed buffer overflow in mysqlnd_change_user
2010-04-27 08:26:24 +00:00