Andrey Hristov
3a33ee63e8
Merge branch 'PHP-7.0'
2016-03-16 10:47:27 +01:00
Andrey Hristov
f2ab731a8c
Fix emails in headers. @mysql.com addresses are no more since many years.
2016-03-16 10:24:52 +01:00
Nikita Popov
2d1559f827
Move free_chunk and resize_chunk into memory pool
...
Drops 24 bytes from each chunk. For the example in bug #71468 it
reduces memory usage by 30%.
2016-02-22 19:40:32 +01:00
Nikita Popov
42fe5e6791
Drop mysqlnd mempool refcount
...
This member was no longer used.
Also fix handling of from_pool in resize_chunk. It was setting
pool to NULL instead of from_pool to FALSE.
2016-02-22 19:40:32 +01:00
Andrey Hristov
7e9a6f7202
Move cleanup code to a separate function and export it. Export also
...
other functions that can be of use for plugins
2016-01-15 03:08:02 +01:00
Andrey Hristov
bcf7172258
Forgot to add const-ness to the macro
2016-01-14 14:55:23 +01:00
Andrey Hristov
c69c23ba2f
Convenience macros
2016-01-14 12:58:41 +01:00
Andrey Hristov
4e8988b45a
commit 597db443cd
...
Author: John Bafford <john@bafford.com>
Date: Mon Jan 11 17:17:44 2016 -0500
MYSQLND_METHOD(mysqlnd_conn_data, get_scheme) should take socket_or_pipe by reference to allow modifications
Fixes a read-from-null crash in mnd_pestrdup when trying to duplicate the socket filename. (Fixes regression in e81ecc80c
)
2016-01-13 16:30:23 +01:00
Lior Kaplan
3d5438bf7b
Merge branch 'PHP-7.0'
...
* PHP-7.0:
Update header to PHP Version 7
Happy new year (Update copyright to 2016)
Happy new year (Update copyright to 2016)
2016-01-01 20:04:31 +02:00
Lior Kaplan
ed35de784f
Merge branch 'PHP-5.6' into PHP-7.0
...
* PHP-5.6:
Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf
Happy new year (Update copyright to 2016)
2016-01-01 19:21:47 +02:00
Andrey Hristov
139af35c25
Add a method for checking if the underlying stream is valid.
2015-12-01 12:52:36 +01:00
Andrey Hristov
6b0d026c76
Remove unused variable
2015-11-23 11:36:25 +01:00
Andrey Hristov
d477557094
Revert "Add some const-ness to the protocol frame codec"
...
This reverts commit f8c2b45948
.
2015-11-17 17:55:32 +01:00
Andrey Hristov
057ad5626b
Don't use the specific translated name but use the macro for this
2015-11-17 17:48:27 +01:00
Andrey Hristov
a6b79f08b3
More const and moved the declaration of php_mysqlnd_scramble() to mysqlnd_auth.h
2015-11-17 14:59:59 +01:00
Andrey Hristov
fae994fed9
Bring consistency to the class by renaming the methods too (from the
...
old temporary name)
2015-11-17 13:28:47 +01:00
Andrey Hristov
f8c2b45948
Add some const-ness to the protocol frame codec
2015-11-17 13:17:17 +01:00
Andrey Hristov
33e97d465d
mysqlnd refactoring:
...
- move MYSQLND_READ_BUFFER to own file
2015-11-17 12:32:01 +01:00
Andrey Hristov
4fed8a28d0
mysqlnd refactoring :
...
- move the command buffer out of the networking code to the protocol frame
codec.
2015-11-16 15:37:11 +01:00
Andrey Hristov
398caf9336
- Remove dead macrom mysql_list_fields()
...
- Small optimizations here and there
2015-11-16 11:55:46 +01:00
Andrey Hristov
0a7e08d385
MNDR:
...
- cleanup in mysqlnd_result.c
- switch from zend_ulong to size_t for lengths. Accordingly change
mysqli and pdo_mysql for this.
2015-11-12 16:19:16 +01:00
Andrey Hristov
c24d452f60
MNDR:
...
- less dereferencing in mysqlnd_ps . Dereference stmt->conn only once and
use a stack variable. Also make the source cleaner.
2015-11-12 16:19:16 +01:00
Andrey Hristov
2cea04165c
MNDR:
...
- move all data members from MYSQLND_PFC to MYSQLND_PFC_DATA
2015-11-12 16:19:16 +01:00
Andrey Hristov
c286d7075d
MNDR:
...
- move from char* + len to MYSQLND_STRING
- add some more const modifiers
2015-11-12 16:19:16 +01:00
Andrey Hristov
a530ecff97
MNDR:
...
- better name for MYSQLND_PPEC - MYSQLND_PFC (protocol frame codec)
2015-11-12 16:19:16 +01:00
Andrey Hristov
654d1a7caf
MNDR:
...
- rename MYSQLND_NET to MYSQLND_PPEC (protocol packet envelope codec).
PPEC does only the encoding and decoding to the protocol frame.
2015-11-12 16:19:16 +01:00
Andrey Hristov
e9f3139f43
MNDR:
...
- split MYSQLND_NET into MYSQLND_NET and MYSQLND_VIO
MYSQLND_NET is above MYSQLND_VIO. _NET takes care of protocol packet
counting (even with compressed), while VIO is just about the network
(or in case of windows, non-network, but PIPE) transport.
2015-11-12 16:19:16 +01:00
Andrey Hristov
0d3329fc93
MNDR:
...
- send_command and send_command_handle_response_* moved to a structure
2015-11-12 16:19:16 +01:00
Andrey Hristov
e81ecc80ca
MNDR:
...
- Move transport string generation to own function, which can be overloaded or sniffed
2015-11-12 16:19:16 +01:00
Andrey Hristov
b8b1d45c3c
MNDR:
...
- move connection establishment code to own command - COM_HANDSHAKE
2015-11-12 16:19:16 +01:00
Andrey Hristov
e6419ab401
MNDR:
...
- convert the API of MYSQLND_NET to MYSQLND_STRING
2015-11-12 16:19:16 +01:00
Andrey Hristov
baab519ae5
MNDR:
...
- decouple the commands from the connection. CONN ist passed now only in 1 case
2015-11-12 16:19:16 +01:00
Andrey Hristov
71e703761f
MNDR:
...
- clean up some things
2015-11-12 16:19:16 +01:00
Andrey Hristov
e30e884e53
MNDR:
...
- move COM_INIT_DE result handling to the command
2015-11-12 16:19:16 +01:00
Andrey Hristov
fefc3045a3
MNDR:
...
- remove COM_FIELD_LIST
2015-11-12 16:19:16 +01:00
Andrey Hristov
aa4966d4e3
MNDR:
...
- now send_command_handle_response() also doesn't depend directly on
MYSQLND_CONN_DATA
2015-11-12 16:19:16 +01:00
Andrey Hristov
109dc08ffd
MNDR:
...
- make the connection state a class
2015-11-12 16:19:16 +01:00
Andrey Hristov
78cb5456da
MNDR:
...
- simplify the macroses for the types
2015-11-12 16:19:16 +01:00
Andrey Hristov
e9bccffe29
MNDR:
...
- switch to macro generation of structure names for the methods
2015-11-12 16:19:16 +01:00
Andrey Hristov
4bb784cd0d
MNDR:
...
- make MYSQLND_ERROR_INFO a class
2015-11-12 16:19:16 +01:00
Andrey Hristov
fb1b5abe31
MNDR:
...
- switch to MYSQLND_CLASS_METHOD_TABLE_NAME_DECL() for automatic naming
of class methods
2015-11-12 16:19:16 +01:00
Andrey Hristov
5609eabc6f
MDNR:
...
- make MYSQLND_UPSERT_STATUS more like an object that a simple structure
Still use macros to make updates simple
2015-11-12 16:19:16 +01:00
Andrey Hristov
10d4fb8a94
MDNR:
...
- Refactor the command factory. Let the factory be exchangeable.
2015-11-12 16:19:16 +01:00
Andrey Hristov
7d7ff67b82
MDNR:
...
- send_command() is no more, thus we need commands for all COM_STMT_*
+ CHANGE_USER
2015-11-12 16:19:16 +01:00
Andrey Hristov
f6ec3df895
MNDR:
...
- Switch for directly executing a command over the wire to creating a
command object which is then executed.
2015-11-12 16:19:16 +01:00
Andrey Hristov
2a44cee4d5
MNDR:
...
- Remove unused variable
2015-11-12 16:19:16 +01:00
Andrey Hristov
784a371829
MNDR:
...
- Inject the object factory
2015-11-12 16:19:16 +01:00
Andrey Hristov
19443351ed
MNDR:
...
- remove static function and make it a method. The function doesn't need to
be in mysqlnd_ps.c as it doesn't use any resources anymore from it (it used
in the past)
2015-11-12 16:19:16 +01:00
Andrey Hristov
cfd868651a
MDNR:
...
- removed init() method from mysqlnd_conn_data and moved the initialization
to the object factory->get_connection(). Now it is unified as with the prepared
statement which doesn't have any init() method
- the protocol decoder factory now takes connection as parameter at creation and
thus there is no need to pass the connection as parameter when calling the read
or the write method of a packet.
- saved the protocol payload decoder factory as pointer in every packet (read/write)
so the connection doesn't need to be passed on every call of read/write (dependency
has been already injected at creation). This will alow to move protocol specific
code from MYSQLND_NET (send_ex()) to make MYSQLND_NET leaner and free from protocol
stuff.
2015-11-12 16:19:16 +01:00