diff options
author | Andrey Hristov <andrey@php.net> | 2019-01-07 18:45:33 +0200 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2019-01-07 18:47:39 +0200 |
commit | 8975e4dcd7d6ff5758cd97a9125eedf7b5aa6e77 (patch) | |
tree | ee3d4e450bd02dba690a81ab3dc8a65b85fe7a7b /ext/mysqlnd/mysqlnd_driver.c | |
parent | ba5cb2eb325ffb933e4120c173c44e2e674e1506 (diff) | |
download | php-git-8975e4dcd7d6ff5758cd97a9125eedf7b5aa6e77.tar.gz |
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.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_driver.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/mysqlnd/mysqlnd_driver.c b/ext/mysqlnd/mysqlnd_driver.c index dc08c649bc..46872d9ecb 100644 --- a/ext/mysqlnd/mysqlnd_driver.c +++ b/ext/mysqlnd/mysqlnd_driver.c @@ -143,9 +143,9 @@ MYSQLND_METHOD(mysqlnd_object_factory, get_connection)(MYSQLND_CLASS_METHODS_TYP data->protocol_frame_codec = mysqlnd_pfc_init(persistent, factory, data->stats, data->error_info); data->vio = mysqlnd_vio_init(persistent, factory, data->stats, data->error_info); data->payload_decoder_factory = mysqlnd_protocol_payload_decoder_factory_init(data, persistent); - data->run_command = mysqlnd_command_factory_get(); + data->command = mysqlnd_command_get_methods(); - if (!data->protocol_frame_codec || !data->vio || !data->payload_decoder_factory || !data->run_command) { + if (!data->protocol_frame_codec || !data->vio || !data->payload_decoder_factory || !data->command) { new_object->m->dtor(new_object); DBG_RETURN(NULL); } |