summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace zend_bool uses with boolNikita Popov2021-01-151-11/+11
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* MySQLnd: Clean up and optimize mysqlnd result set handlingNikita Popov2020-12-171-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a larger overhaul of the mysqlnd result set infrastructure: * Drop support for two different types of buffered results sets ("c" and "zval"). Possibly these made sense at some earlier time, but now (with minor adjustments) one option is strictly worse than the other. Buffered result sets already buffer the full row packets, from which zvals can be decoded. The "zval" style additionally also buffered the decoded zvals. As result sets, even buffered ones, are generally only traversed once, this just ends up wasting memory. Now, a potentially useful variation here would be to buffer the decoded zvals instead of the row packets, but that's not what the code was doing. * To make it really strictly better, pre-allocate the zval row buffer and reuse it for all rows. Previously the "c" style always allocated a new buffer for each row. * The fetch_row API now provides a populated zval[]. The task of populating an array is deferred to fetch_row_into, which also avoids duplicating this code in multiple places. The fetch_row_c API is also implemented on top of fetch_row now, rather than duplicating large parts of the code. * The row fetching code for prepared statements and normal result sets has been mostly merged. These already used the same infrastructure, but prepared statements used separate row fetching functions that were nearly the same as the normal ones. This requires passing the stmt into the result set, rather than just a flag. The only part that remains separate is reading of unbuffered results in the presence of PS cursors.
* MySQLnd: Simplify management of zval row bufferNikita Popov2020-12-151-2/+0
| | | | | | | | | | Something odd was being done here, with the row packet having a flag for whether it should allocate the zval buffer, which would then get moved into the result set. Keep the management of this buffer purely at the result set level. This also allows us to easily reuse the same buffer for all results, rather than allocating a new one for each fetch.
* Merge branch 'PHP-7.4'Nikita Popov2019-12-271-0/+9
|\ | | | | | | | | | | | | | | | | * PHP-7.4: Handle empty password fast path in caching_sha2_password Handle error response during caching_sha2_password auth Add support for caching_sha2_password in change user authentication Fix unix socket check during caching_sha2_password Support auth switch request during caching sha2 auth
| * Handle error response during caching_sha2_password authNikita Popov2019-12-271-0/+5
| | | | | | | | In particular, this fixes handling of expired passwords.
| * Support auth switch request during caching sha2 authNikita Popov2019-12-271-0/+4
| |
* | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
|/ | | | Closes GH-4732.
* Update and fix remaining year ranges (2019)Peter Kokot2019-02-081-1/+1
| | | | | | This patch follows previous license year ranges updates. With new approach source code files now have simplified headers with license information without year ranges.
* Remove local variablesPeter Kokot2019-02-031-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Re-commit MySQL 8 cached SHA auth supportNikita Popov2018-11-211-0/+10
| | | | | | | | | With changes to (hopefully) correctly fall back if OpenSSL support is missing. Furthermore the hard-coded dependency on ext/hash is no longer an issue, as this extension is required in master. This reverts commit 63072e9c0ebbb676cd39d0f867d873737c676add, reversing changes made to 4cbabb6852d2a7d966fb78a53d9d4c1cac18f10b.
* Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2018-09-041-10/+0
|\
| * Revert all MySQL auth related changesNikita Popov2018-09-041-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per bug #76651 these changes do not appear to work correctly in some cases. As no immediate fix seems to be forthcoming, I'm reverting these changes. Revert "Fixed invalid free introduced by d6e81f0bfd0cb90586dd83d4fd47a4302605261a (avoid keeping "invalid" pointer)" This reverts commit 11507c0e1bfa17a96480f3648397f6975c31551e. Revert "Fix mysqlnd build without openssl" This reverts commit 6c9db02ff7812c298d1e7e292ba731d9d3a66790. Revert "Fix VC compilation as variable size array is not supported" This reverts commit f96df64cb2219fda42ca875483f874cf3052647c. Revert "Fix MySQL 8 auth" This reverts commit d6e81f0bfd0cb90586dd83d4fd47a4302605261a.
* | Merge branch 'PHP-7.1'Johannes Schlüter2018-06-061-0/+10
|\ \ | |/
| * Fix MySQL 8 authJohannes Schlüter2018-06-061-0/+10
| |
| * year++Xinchen Hui2018-01-021-1/+1
| |
| * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| |
* | year++Xinchen Hui2018-01-021-1/+1
| |
* | Use single memory pool for result metadata and result set.Dmitry Stogov2017-11-151-0/+1
| |
* | Cleanup. Make difference between MYSQLND_ROW_BUFFER and ↵Dmitry Stogov2017-11-151-4/+4
| | | | | | | | MYSQLND_MEMORY_POOL_CHUNK (the last one is completely removed).
* | Use stack-allocated packets.Dmitry Stogov2017-11-141-17/+7
| |
* | Made "result", "statement" and "last_message" to always use Zend MM heap. ↵Dmitry Stogov2017-11-021-2/+0
| | | | | | | | (even for persistent connections these entities don't relive request boundary)
* | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|/
* Optimized memory handling of BIT fields. Less memory copies and lessAndrey Hristov2016-12-121-3/+0
| | | | memory usage.
* Fixed compilation warningsDmitry Stogov2016-06-221-1/+1
|
* Fix compiler warnings in mysqlndKalle Sommer Nielsen2016-04-031-1/+1
|
* Merge branch 'PHP-7.0'Andrey Hristov2016-03-161-3/+3
|\
| * Fix emails in headers. @mysql.com addresses are no more since many years.Andrey Hristov2016-03-161-5/+3
| |
* | Merge branch 'PHP-7.0'Lior Kaplan2016-01-011-1/+1
|\ \ | |/ | | | | | | | | | | * PHP-7.0: Update header to PHP Version 7 Happy new year (Update copyright to 2016) Happy new year (Update copyright to 2016)
| * Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
| |\ | | | | | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| | * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| | |
| | * bump yearXinchen Hui2015-01-151-1/+1
| | |
* | | More const and moved the declaration of php_mysqlnd_scramble() to mysqlnd_auth.hAndrey Hristov2015-11-171-3/+1
| | |
* | | MNDR:Andrey Hristov2015-11-121-1/+1
| | | | | | | | | | | | | | | - less dereferencing in mysqlnd_ps . Dereference stmt->conn only once and use a stack variable. Also make the source cleaner.
* | | MNDR:Andrey Hristov2015-11-121-9/+1
| | | | | | | | | | | | - better name for MYSQLND_PPEC - MYSQLND_PFC (protocol frame codec)
* | | MNDR:Andrey Hristov2015-11-121-1/+6
| | | | | | | | | | | | | | | - rename MYSQLND_NET to MYSQLND_PPEC (protocol packet envelope codec). PPEC does only the encoding and decoding to the protocol frame.
* | | MNDR:Andrey Hristov2015-11-121-2/+0
| | | | | | | | | | | | - moved networking code to mysqlnd_vio.c
* | | MNDR:Andrey Hristov2015-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | | - 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.
* | | MNDR:Andrey Hristov2015-11-121-3/+2
| | | | | | | | | | | | - move connection establishment code to own command - COM_HANDSHAKE
* | | MNDR:Andrey Hristov2015-11-121-2/+9
| | | | | | | | | | | | - decouple the commands from the connection. CONN ist passed now only in 1 case
* | | MNDR:Andrey Hristov2015-11-121-1/+0
| | | | | | | | | | | | - remove COM_FIELD_LIST
* | | MNDR:Andrey Hristov2015-11-121-8/+4
| | | | | | | | | | | | | | | - now send_command_handle_response() also doesn't depend directly on MYSQLND_CONN_DATA
* | | MNDR:Andrey Hristov2015-11-121-2/+2
| | | | | | | | | | | | - make MYSQLND_ERROR_INFO a class
* | | MDNR:Andrey Hristov2015-11-121-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | MNDR:Andrey Hristov2015-11-121-2/+2
|/ / | | | | | | | | - Rename MYSQLND_PROTOCOL to MYSQLND_PROTOCOL_PAYLOAD_DECODER_FACTORY - Rename other symbols related to MYSQLND_PROTOCOL accordingly
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-11/+11
| |
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | reduce the struct size by 8 byte on 64 bitAnatol Belski2014-09-141-4/+4
| |
* | master renames phase 1Anatol Belski2014-08-251-4/+4
| |
* | ported mysql and mysqlndAnatol Belski2014-08-191-4/+4
| |