summaryrefslogtreecommitdiff
path: root/ext/mysqlnd/mysqlnd_wireprotocol.c
Commit message (Collapse)AuthorAgeFilesLines
* allow persistency of PSAndrey Hristov2010-03-121-3/+4
|
* Fix second bug in that code, + instead of += thus not increasingAndrey Hristov2010-02-011-1/+1
| | | | | | a pointer and mangling data. Again, ext/mysql and ext/mysqli doesn't have access to this codepath.
* Fix a bug in mysqlnd where a pointer was not incrementedAndrey Hristov2010-02-011-0/+1
| | | | | | | | and thus wrong data was saved MYSQLND_FIELD::db. However, this wasn't caught because there is no code in mysql/mysqli/pdo_mysql which reads that field of the structure. The problem was found during code review.
* make mysqlnd's tracing API more reusableAndrey Hristov2010-01-131-2/+2
|
* more typedef cosmeticsAndrey Hristov2010-01-111-2/+2
|
* cosmetics. typedef-ed types should be in capital caseAndrey Hristov2010-01-111-59/+59
|
* remove extern defintion of a variable that is no moreAndrey Hristov2010-01-111-4/+3
| | | | | | used outside of the file where it is declared. Also really export with PHPAPI the protocol init/deinit functions
* improve the stats subsystem. Reduce the number of macro definitionsAndrey Hristov2010-01-081-7/+7
| | | | | | in half by smartly introducing 2 new macros. Make MYSQLND::stats a pointer from being aggregated and add triggers.
* add restart_psession and end_psession hooksAndrey Hristov2010-01-081-0/+13
|
* Change of way the packet objects are created/initialisedAndrey Hristov2010-01-071-0/+188
| | | | | | | | If the protocol gets changed, ever, we can decide at runtime easily which protocol to use by instantiating the right protocol object. But this is restricted to the structure of the packets, not the flow.
* Move this function to MYSQLND_NET as it works on theAndrey Hristov2009-12-211-49/+1
| | | | | php stream
* magic numbers to macrosAndrey Hristov2009-12-211-18/+20
|
* refactoring : move more network related functions toAndrey Hristov2009-12-171-349/+8
| | | | | | | mysqlnd_net.c . Now communication is split on two levels: - logical (functions send and receive) - physical (functions network_read and network_write)
* During refactoring of the function mysqlnd_stream_write_w_header() it wasAndrey Hristov2009-12-171-91/+47
| | | | | | | | | | found that there is a bug in the way the data is sent, although a very rare one which will only affect very large queries which have length 16777214. The communication will hang. A way to test it is to execute the following: ./php -r '$c=mysqli_connect("127.0.0.1","root","root","test"); $q="insert into test.tblob values(\"".str_repeat("a",256*256*256-1-34)."\")"; $c->query($q);'
* Remove unneeded dereferencesAndrey Hristov2009-12-161-14/+6
|
* move MYSQLND_NET code to a separate file.Andrey Hristov2009-12-161-278/+0
| | | | | | mysqlnd_wireprotocol is about the protocol not the transport layer
* Move code out of mysqlnd_conn::connect to mysqlnd_net::connect.Andrey Hristov2009-12-151-0/+90
| | | | | | Thus mysqlnd_conn::connect() does less of what it should not do - think about the transport level.
* refactor: move code that belongs to MYSQLND_NET out of MYSQLNDAndrey Hristov2009-12-151-23/+90
|
* - fix build, come on, it is not that hard to test before commit, is it?Pierre Joye2009-12-111-1/+3
|
* Make MYSQLND_NET dynamically allocated structure with allocatorAndrey Hristov2009-12-111-39/+94
| | | | | and deallocator. More member functions will come.
* Remove the zval caching from mysqlnd. It was disabled versions agoAndrey Hristov2009-12-091-59/+0
| | | | | | due to problems on windows, which were not debugged. Better have code that is disabled not in the core.
* - void is NaN, you can't do math ops on void. Declarations go first. Fix TS ↵Pierre Joye2009-11-301-1/+1
| | | | build
* fix debug windows build as well as remove a compilation warningAndrey Hristov2009-11-261-2/+2
| | | | | (a header not included)
* Compressed protocol support + extensibility for mysqlndAndrey Hristov2009-11-201-201/+437
|
* Fixing problems when calling connect (again and again) on a valid connection ↵Ulf Wendel2009-10-151-1/+1
| | | | handle. Most of the patch comes from Andrey.
* Fix ZTS buildAndrey Hristov2009-09-301-0/+2
|
* Afix not included by the fix committed by Ulf.Andrey Hristov2009-09-171-1/+1
| | | | | | | pemalloc and then efree - too bad! Sorry for committing in two passes, my big tree is already patched with compressed.
* Fix (by Andrey) and test for bug #49442 . Don't use efree() for memory ↵Ulf Wendel2009-09-161-3/+3
| | | | allocated with malloc()... If a connection gets created by mysqli_init(), mysqlnd makes it 'persistent'. 'Persistent' means that mysqlnd uses malloc(). mysqlnd does use malloc() instead of ealloc() because it is unknown if the connection will become a true persistent connection in the sense of ext/mysqli. It is unknown if the user wants a persistent connection or not until the user calls mysqli_real_connect(). To avoid tricky conversions mysqlnd uses malloc(), which sets a private persistent flag in the mysqlnd structures. A precondition for the crash to happen was that the private persistent flag is set. The flag is also set when creating a real persistent connection (in the sense of ext/mysqli) and so the bug can happen with mysql_init()/mysqli_real_connect() and mysql_connect('p:<host>', ...). Therefore we test both cases. Note the (tricky?) difference between the implementation detail'mysqlnd private persistent flag = use malloc()' and persistent connections from a user perspective. Although mysqlnd will always set its private persistent flag and use malloc() for connections created with mysqli_init() it is still up to the user to decide in mysqli_real_connect() if the connection shall become a (true) persistent connection or not.
* Next attempt to fix http://bugs.php.net/bug.php?id=48745. Patch by Andrey.Ulf Wendel2009-09-091-1/+10
|
* Fix for bug#48745Andrey Hristov2009-08-281-18/+18
| | | | | mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields
* MFB52: Fix include pathJohannes Schlüter2009-07-011-1/+1
|
* - fix buildPierre Joye2009-06-281-1/+2
|
* Hardwire function call instead of using callbacks. We don't actually needAndrey Hristov2009-06-161-3/+3
| | | | | | | | | callbacks, it was done for making 2 functions static, not to pollute the global functions space but that had its price of 8 bytes overheat per allocation, which is just too much. Also making the app member 32b instead of 64b, which should save additional 4 byte, to the total of 12 byte per allocation of a row buffer.
* Fix crash when tracing is enabled. Position after buffer was used alsoAndrey Hristov2009-06-121-5/+3
| | | | | | direct usage of MYSQLND_STRING pointer instead of the "s" property of the structure.
* Revert by adding an ifdefAndrey Hristov2009-06-111-0/+3
|
* - nuke unused varPierre Joye2009-06-111-1/+0
|
* - MF53: silent warning and make it less ambiguousPierre Joye2009-06-111-11/+11
|
* Check the pointer before calling a function on it, or we will crash.Andrey Hristov2009-06-111-1/+1
| | | | | This is a very rare situation where the server is totally broken.
* Merge with the branch, someone made changes in PHP5_3 and did not merge.Andrey Hristov2009-06-081-2/+7
| | | | | Also switch off the zval cache for now.
* Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* More type fixes for WindowsAndrey Hristov2008-11-061-8/+7
|
* Get rid of many defines (which simplifies the code a lot),Andrey Hristov2008-11-061-3/+3
| | | | | as well as uint->unsigned int
* 64bit fixes:Andrey Hristov2008-10-311-43/+41
| | | | | | | - fixes to sprintf modifiers, cleaning warnings - use _t types, like uint64_t instead of uint64, thus skipping series of typedefs.
* Fix a crash introduced yesterday in mysqlnd, non-zts mode - missing if () forAndrey Hristov2008-09-161-6/+14
| | | | | | | | STAT_LAST was accessing wrong memory thus overwritting method pointers. Windows doesn't have atoll(), which is C99, C89 has only atoi() + atol(). Win has _atoi64, so use it.
* Add float conversions too. Float users should understand how float works!!!Andrey Hristov2008-09-151-2/+10
|
* Compile-in a string-to-int conversion for INT columns by default,Andrey Hristov2008-09-151-2/+2
| | | | | controlled by a ini setting.
* - More statisticsAndrey Hristov2008-09-121-20/+130
| | | | | | | - Fixed endless loop - mysqlnd_stmt_next_result() returned FAIL but as it is defined to be 1 (and PASS is 0), checking for mysqlnd_stmt_more_result() was successful although we were expecting a FAIL.
* More debugging infoAndrey Hristov2008-07-221-4/+11
|
* Sync with bzrAndrey Hristov2008-07-151-2/+0
|
* Update ext/mysql's and ext/mysqli's testsAndrey Hristov2008-04-241-7/+23
| | | | | | Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in mysqlnd builds as libmysql doesn't support this feature.