andrey
0d1bc3e8e5
more refactoring stuff. Reduced code duplication in the authentication
...
code
2012-05-31 15:46:26 +03:00
andrey
5a2578a333
small refactoring - factour out code from connection establishment.
...
Add a define for the default authentication protocol - get away from
the hardcoded magic value
2012-05-30 15:24:17 +03:00
andrey
174bf906f8
refactor MYSQLND_NET, split it two parts for easy resharing
2012-04-30 17:01:56 +02:00
Johannes Schlüter
bb2f806534
Fix folding
2012-04-22 02:25:02 +02:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Andrey Hristov
de50e98a07
Add a middleman which can intercept the calls and can reroute them
2011-11-02 17:06:30 +00:00
Andrey Hristov
2627fafcbd
- shift a bit of code around
...
- when cloning use the methods of the original object
2011-11-02 15:08:01 +00:00
Andrey Hristov
989f2fbc14
fix trace log messages
2011-11-02 14:20:35 +00:00
Andrey Hristov
92ec40d8e4
Now really split the method tables and have different
...
methods for the handle and the data object.
Add auxiliary functions to work with the new methods.
Add possibility to clone a connection object - shadow copy.
2011-10-31 14:33:56 +00:00
Andrey Hristov
8fb6bdd5b8
Split struct MYSQLND in struct MYSQLND and struct MYSQLD_CONN_DATA.
...
A step in the direction of keeping internal data private
2011-10-31 11:46:24 +00:00
Andrey Hristov
f926a3c07d
Move from directly referencing an aggregated structure to using a
...
pointer to a structure. The structure is still aggregated but we add
a level of indirection for possible plugins to overwrite the storage
2011-10-25 23:01:49 +00:00
Andrey Hristov
3295415cce
Add hooks for __call like functionality and also allow to
...
handle calls that spread over two internal functions. Let's call it
a local TX.
2011-10-25 19:04:36 +00:00
Andrey Hristov
4321da0388
move plugin specific stuff to one file. create object factory
...
for similar objects
2011-10-24 12:34:44 +00:00
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
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
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
da2839f71d
fix valgrind warnings in debug builds
2011-08-26 12:14:31 +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
11e4f1e39a
longer error messages, don't cut them
2011-07-27 10:26:59 +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
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
59c5875f83
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
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
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
fe719c5e42
profiling in trace mode
2010-10-22 15:46:26 +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
60bfedb1e6
rename parameter, should not conflict with global symbol -
...
the socket function
2010-10-05 16:27:49 +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