Andrey Hristov
8975e4dcd7
Simplify the command factory
...
Since more than an year it not possible to create commands in the heap
but they are allocated on the stack and directly run. In this regard, it
doesn't make sense to have all the vararg stuff. Commands made sense
to be created and pushed onto a stack then a general executor will
run thru the stack and execute/handle the commands.
2019-01-07 18:47:39 +02:00
Nikita Popov
152dc924c5
Drop WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF
...
And perform some code cleanups this allows.
2018-09-22 18:53:32 +02:00
Dmitry Stogov
d0a6b1009f
Use zval_ptr_dtor() to replace bound variables (original values nay be circular structures).
2018-07-05 16:46:38 +03:00
Gabriel Caruso
6400264856
Trailing whitespaces
...
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514
year++
2018-01-02 12:57:58 +08:00
Dmitry Stogov
6bcace1b72
Use single memory pool for result metadata and result set.
2017-11-15 14:07:09 +03:00
Dmitry Stogov
e2c9dfb5de
Cleanup. Make difference between MYSQLND_ROW_BUFFER and MYSQLND_MEMORY_POOL_CHUNK (the last one is completely removed).
2017-11-15 11:33:32 +03:00
Dmitry Stogov
69462bdf4c
Embeded zend_list into st_mysqlnd_error_info, to avoid extra allocation/deallocation.
2017-11-15 00:53:51 +03:00
Dmitry Stogov
4d5330fbe1
Run mysqlmd commands in one step (without separate create/run/free).
2017-11-14 17:32:41 +03:00
Dmitry Stogov
93334b5fc2
Use stack-allocated packets.
2017-11-14 15:10:27 +03:00
Dmitry Stogov
a7305eb539
Made "result", "statement" and "last_message" to always use Zend MM heap. (even for persistent connections these entities don't relive request boundary)
2017-11-02 03:27:25 +03:00
Xinchen Hui
39327b90e3
Merge branch 'PHP-7.0' into PHP-7.1
...
* PHP-7.0:
Fix invalid free of persistent results on error/connection loss in mysqlnd (bug 74376)
Conflicts:
ext/mysqlnd/mysqlnd_ps.c
2017-04-07 15:20:53 +08:00
Yussuf Khalil
27120d4412
Fix invalid free of persistent results on error/connection loss in mysqlnd (bug 74376)
2017-04-05 20:57:03 +02:00
Nikita Popov
da5e09ad03
Merge branch 'PHP-7.0' into PHP-7.1
2017-01-12 21:15:57 +01:00
rfussenegger
bd75f9e613
Fix bug #69899
2017-01-12 21:13:39 +01:00
Sammy Kaye Powers
dac6c639bb
Update copyright headers to 2017
2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9
Update copyright headers to 2017
2017-01-04 11:14:55 -06:00
Kalle Sommer Nielsen
bb198ec9a6
Fix compiler warnings in mysqlnd
2016-04-03 02:27:25 +02:00
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
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
Xinchen Hui
3aa2182db6
Merge branch 'PHP-7.0'
2015-11-27 15:53:19 +08:00
Xinchen Hui
a347b0be48
Fixed bug #70949 (SQL Result Sets With NULL Can Cause Fatal Memory Errors)
2015-11-27 15:52:55 +08: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
94ce013bff
MNDR:
...
- remove unused macros
2015-11-12 16:19:16 +01:00
Andrey Hristov
2e3fc57c5c
MNDR:
...
- move things out of mysqlnd_priv.h
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
71e703761f
MNDR:
...
- clean up some things
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
f7a445856d
MNDR:
...
- pass connection closer and its context
- remove unused parameter
2015-11-12 16:19:16 +01:00
Andrey Hristov
280c834c49
MNDR:
...
- rename the macro for updating the connection state
2015-11-12 16:19:16 +01:00
Andrey Hristov
3eee292669
MNDR:
...
- Remove the SET_STMT_ERROR macro
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
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
e24dc94f32
MDNR:
...
- remove dead code
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
f16686faa7
MNDR:
...
- don't use the static function name but the hook
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
34a33928d6
MNDR:
...
- Rename MYSQLND_PROTOCOL to MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY
- Rename other symbols related to MYSQLND_PROTOCOL accordingly
2015-11-12 16:19:16 +01:00
Andrey Hristov
6051a47776
MNDR
...
- Rename simple_command* to send_command
2015-11-12 16:19:16 +01:00
Xinchen Hui
141f0ca18c
Fixed Bug #69796 mysqli_stmt::fetch doesn't assign null values to bound variables
2015-06-11 13:35:43 +08:00
Andrey Hristov
ed0f134a64
Split mysqlnd_stmt::execute in 2 logical parts :
...
- mysqlnd_stmt::send_execute() which just creates the wire message by using
an aux function and sends it to the server
- mysqlnd_stmt::parse_execute_respose() which is responsible for handling
the bytes sent from the server in response to COM_EXECUTE.
This makes it possible to implement finer method overwriting in mysqlnd
plugins.
2015-04-07 21:39:29 +02:00
Xinchen Hui
fc33f52d8c
bump year
2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d
bump year
2015-01-15 23:26:37 +08:00