Commit Graph

129 Commits

Author SHA1 Message Date
Johannes Schlüter
7f6fa981b3 MFB52: Fix include path 2009-07-01 14:13:07 +00:00
Pierre Joye
76a395e73d - fix build 2009-06-28 12:41:51 +00:00
David Soria Parra
565e6bdbdf Fix bug #48644 mysqlnd does not compile with '--enable-mysqlnd-threading' 2009-06-23 14:14:32 +00:00
Johannes Schlüter
ed4b37eb39 The experimental warning sohuld be in the configure output... 2009-06-23 13:19:22 +00:00
Andrey Hristov
64046529f0 Fix two problems:
- The value of mysqli_get_client_info() has been changed recently and did
not include "mysqlnd" anymore thus the test suite was thinking the build
is always libmysql. This did not kept the suite from running pconn tests
- Going back to the libc allocator because the memory arena could be on a
  persistent connections. If the build is not debug there will be no error
  but the memory will be freed and in the second use of this pconn freed
  memory will be used - not good! For now the arena doesn't take an argument
  whether it should allocate persistently or not, thus persistent is safe
  for now.

Johannes gave his +1 to commit this.
2009-06-17 16:21:34 +00:00
Andrey Hristov
56b1c8fe39 C-comments should be used 2009-06-16 17:59:19 +00:00
Andrey Hristov
7289831fe0 Memory usage optimisation. mysqlnd is not libmysql. mysqlnd does use the
Zend allocator, which means that is easier to hit memory_limit if you
have big stored (buffered) result sets. Before with libmysql you won't
hit memory_limit because libmysql uses libc's allocator and nothing is
checked. Now, with mysqlnd the situation is stricter and it is easier to
hit memory_limit. We try to optimize for big result sets. If a result set
is larger than 10 rows we will start freeing some data to keep memory usage
after 10 rows constant. This will help in the cases where a buffered result
set is scrolled forward only and just only once, or mysqlnd will need to
decode data from the network buffers again - yes, it is a trade-off between
CPU time and memory size. The best for big result sets is of course using
unbuffered queries - for comparison : 3 Million rows with buffered take
at least 180MB, with buffered you will stay at 3MB, and unbuffered will be
just 7-8% slower.
2009-06-16 13:06:45 +00:00
Andrey Hristov
5d3ea92ee9 Hardwire function call instead of using callbacks. We don't actually need
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.
2009-06-16 09:15:09 +00:00
Andrey Hristov
9ac36809f0 Use Zend's allocator instead of libc's and also don't try to work on
zvals that are NULLs.
2009-06-16 07:53:03 +00:00
Andrey Hristov
dc9d37998f Fix crash when tracing is enabled. Position after buffer was used also
direct usage of MYSQLND_STRING pointer instead of the "s" property of the
structure.
2009-06-12 13:24:37 +00:00
Andrey Hristov
b2f0e08307 Revert by adding an ifdef 2009-06-11 17:53:13 +00:00
Pierre Joye
54ac8205a0 - nuke unused var 2009-06-11 17:16:35 +00:00
Pierre Joye
c590f68297 - MF53: silent warning and make it less ambiguous 2009-06-11 17:14:34 +00:00
Johannes Schlüter
361c9d353f Use a better extension version 2009-06-11 10:08:09 +00:00
Andrey Hristov
433286f150 Protect the code when variable is NULL, which should never happen, but
anyway, you know about "never happens"
2009-06-11 08:51:20 +00:00
Andrey Hristov
6f90ebd669 Check the pointer before calling a function on it, or we will crash.
This is a very rare situation where the server is totally broken.
2009-06-11 08:32:34 +00:00
Andrey Hristov
18f107f94c MFB: Reference decrement in own function. Make a function which is not
called externally static, from PHPAPI.
2009-06-11 08:31:10 +00:00
Pierre Joye
7cc3ad6313 - fix TS build 2009-06-09 10:03:42 +00:00
Pierre Joye
67f88a0c3f - ws 2009-06-09 09:51:56 +00:00
Andrey Hristov
efc752375e Merge with the branch, someone made changes in PHP5_3 and did not merge.
Also switch off the zval cache for now.
2009-06-08 10:19:29 +00:00
Andrey Hristov
1683d46dc9 Add support for mysql_stmt_store_result() from libmysql 6.0.8+ and 5.4.x 2009-05-29 13:09:22 +00:00
Andrey Hristov
37234bb393 Fix for the failing mysql_stmt_execute() test. Data was cleaned after
stmt_reset() but it should stay and be freed as later as next stmt_execute()
2009-05-29 12:19:26 +00:00
Andrey Hristov
9230362631 Fix a very well hidden error because of not being careful with CPP.
I usually don't make this mistake :)
2009-05-29 08:05:21 +00:00
Andrey Hristov
86aa4e8035 Fix a valgrind warning as well as more trace log information 2009-05-28 17:49:00 +00:00
Andrey Hristov
09b56ed2a5 Fix a problem with cursors, which did not happen with unbuffered PS for
some reason. Double free of the data, which led to valgrind warnigns.
The fix actually optimizes the code in this cases because the old code
used copy_ctor while the new one skips it because it is not needed.
Transferring data ownership and nulling works best, for PS where we
always copy the string from the result set, unlike the text protocol.
2009-05-28 16:35:16 +00:00
Andrey Hristov
c90b10a290 Fix a bug with mysqlnd_fetch_field(_direct()). With mysqlnd the optimised
function was called, which however, doesn't respect that during store the
raw data is not unpacked, to be lazy. The data is unpacked to zvals later,
during every row fetch. However, this way max_length won't be calculated
correctly. So, if a mysqlnd_fetch_field(_direct) call comes we need to
unpack everything and then calculate max_length...and that is expensive,
defies our lazy unpacking optimisation.
2009-05-28 11:47:15 +00:00
Andrey Hristov
8b43f4fddc ws 2009-05-26 13:42:43 +00:00
Andrey Hristov
6d9d60b902 Fix a typo, utf8 is 3 byte max, for us, for now
Add a another cset
2009-05-26 13:42:06 +00:00
Johannes Schlüter
16606a9cdf Fix #47535 Compilation failure in ps_fetch_from_1_to_8_bytes() 2009-04-20 09:15:46 +00:00
Felipe Pena
cf5e94b010 - Sync with 5.3 2009-03-30 19:43:47 +00:00
Johannes Schlüter
53034b18cb - Fix #47819 (Getting pdo_mysql.so: undefined symbol: mysqlnd_debug_init at
startup)
2009-03-30 13:53:35 +00:00
Felipe Pena
7c860bb018 - Removed leftover UG(unicode) checks 2009-03-27 19:50:56 +00:00
Felipe Pena
04c90a0f51 - Removed:
- UG(unicode) checks
- Changed:
     - ZEND_STR_TYPE -> IS_UNICODE
     - convert_to_text -> convert_to_unicode
2009-03-27 19:28:26 +00:00
Johannes Schlüter
5306bb0e4b - mark mysqlnd's threading (which can be used for background pre-fetching)
experimental
2009-03-17 10:04:57 +00:00
Andrey Hristov
7271069329 Fix the build, because the macro's name has changed 2009-03-17 09:51:04 +00:00
Andrey Hristov
cf78f35270 Add the charsets available from 6.0 as a structure, to be used later 2009-02-20 13:24:14 +00:00
Johannes Schlüter
6a6e94c0d9 - Improve mysqlnd's internal method registration 2009-02-16 17:25:37 +00:00
Johannes Schlüter
d15503bfcc - Export mysql_refresh to mysqli (mysqli_refresh(), $mysqli->refresh()) 2009-01-22 20:57:32 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12:40 +00:00
Johannes Schlüter
5522a99905 No infinite loop in case the connection broke 2008-11-28 14:37:43 +00:00
Pierre Joye
3def8739ce - declaration first (fix build win) 2008-11-22 23:52:40 +00:00
Andrey Hristov
2452619ed7 mysqlnd fixes for Windows :
- less warnings
- PHPAPI for mysqlnd_poll
2008-11-20 17:29:55 +00:00
Andrey Hristov
d38e2142c1 Fix a small bug that mysqlnd::next_result didn't care about an error in a
multi-statement. In an inner layer the error has been already set, thus it
needed better massage on the top level.
2008-11-19 17:41:25 +00:00
Andrey Hristov
a04cd72975 Fix windows build - pure C compiler 2008-11-18 18:02:06 +00:00
Andrey Hristov
983f575f22 Asynchronous queries for mysqli, when mysqlnd is enabled.
Includes 4 tests for mysqli_poll
2008-11-18 16:54:38 +00:00
Andrey Hristov
9532d30738 More type fixes for Windows 2008-11-06 18:37:32 +00:00
Andrey Hristov
de610e1dd7 Rely on win32/php_stdint.h on Windows for stdint types 2008-11-06 14:20:19 +00:00
Andrey Hristov
1ed87531cb More cleanup of config-win.h and missed merge, which actually occured in 5_3 2008-11-06 11:26:07 +00:00
Andrey Hristov
0b46d6b5a5 Get rid of many defines (which simplifies the code a lot),
as well as uint->unsigned int
2008-11-06 10:36:30 +00:00
Andrey Hristov
6fd6b92ffc Fix the windows build 2008-11-03 18:07:40 +00:00