Andrey Hristov
eb02cd4450
Fix bug#48198 error: 'MYSQLND_LLU_SPEC' undeclared
...
Possibly fix also :
Bug #48780 mysqlnd compile failure
Bug #46952 mysqlnd compile failure with suncc
2009-08-25 14:14:23 +00:00
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
Andrey Hristov
2c697a2572
Fix the build
2008-10-31 21:30:58 +00:00
Andrey Hristov
65f5d4e434
64bit fixes:
...
- fixes to sprintf modifiers, cleaning warnings
- use _t types, like uint64_t instead of uint64, thus skipping series of
typedefs.
2008-10-31 20:30:33 +00:00
Johannes Schlüter
96b3cd0a64
Fix #46285 (lastInsertId() returns "0" when a deferenced PDOStatement is
...
executed)
2008-10-27 17:20:26 +00:00
Andrey Hristov
0b77134114
Fix overusage of memory when the result set is empty. Then no memory will be
...
allocated compared to before. Also grow (realloc) the rset with 10% instead
of 33% - more reallocs but better memory usage. Of course later theres is a
realloc to shrink the rset t ofree it from unused rows but its better to
to eat too much at once.
2008-10-27 15:13:42 +00:00
Andrey Hristov
c52f1524e7
Fix a name
2008-10-27 14:38:17 +00:00
Johannes Schlüter
c2e0aaebb6
Don't dereference NULL-pointer
2008-10-19 12:22:49 +00:00
Johannes Schlüter
e7bd1e240c
Improve order in MINFO output
2008-10-01 21:35:27 +00:00
Johannes Schlüter
9fe2c9f531
Handle failed connections right
2008-10-01 19:46:58 +00:00
Andrey Hristov
a7226f1a03
Fix a crash introduced yesterday in mysqlnd, non-zts mode - missing if () for
...
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.
2008-09-16 14:34:11 +00:00
Andrey Hristov
1eb634c0e3
Forgot to merge these changes - Float conversion
2008-09-15 18:10:38 +00:00
Andrey Hristov
9b48b002f6
Add float conversions too. Float users should understand how float works!!!
2008-09-15 18:07:58 +00:00
Andrey Hristov
02ae7e8737
Compile-in a string-to-int conversion for INT columns by default,
...
controlled by a ini setting.
2008-09-15 14:02:55 +00:00
Andrey Hristov
5b93dff141
- More statistics
...
- 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.
2008-09-12 15:06:55 +00:00
Johannes Schlüter
71c14293fc
constify strings
2008-08-19 10:42:00 +00:00
Johannes Schlüter
a11121e8df
Fix empty error message when connecting to a bad server
2008-08-19 10:15:56 +00:00
Felipe Pena
8e1b4a55cc
- Added TSRMLS_DC to apply_func_args_t and zend_hash_apply_with_arguments.
2008-07-24 19:50:23 +00:00
Andrey Hristov
40267cdcf8
Fixed bug#44897 - failed to prepare statement
...
After a PS "CALL()" we have at least one result set. If the SP does also some, then
we need to clean the wire more fool-proof.
2008-07-23 14:06:31 +00:00
Andrey Hristov
ea85e2924f
More debugging info
2008-07-22 16:05:28 +00:00
Andrey Hristov
73dfa53ca8
Sync with bzr
2008-07-15 13:12:27 +00:00
Jani Taskinen
430feb52a6
MFB
2008-07-14 10:32:45 +00:00
Andrey Hristov
fd699ce7d3
Fix possible bug with persistent connections
2008-06-24 11:19:07 +00:00
Andrey Hristov
e5f72d0685
Add missing header
2008-06-24 08:02:06 +00:00
Andrey Hristov
c9d53ab74c
Even more debug info
2008-06-24 06:56:59 +00:00
Andrey Hristov
f3cf29671a
Added more debug info for tracking problems
2008-06-23 22:21:55 +00:00
Andrey Hristov
8a72f8d6ed
MFB
2008-05-29 15:50:10 +00:00
Elizabeth Marie Smith
132ecdfa7d
MFB and steph's pecl fixes into confutils
2008-05-14 03:32:27 +00:00
Andrey Hristov
493b0bb51b
Update mysqlnd - new ini variable
2008-05-07 15:16:27 +00:00
Andrey Hristov
5da78b297b
Update ext/mysql's and ext/mysqli's tests
...
Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in
mysqlnd builds as libmysql doesn't support this feature.
2008-04-24 14:04:58 +00:00
Johannes Schlüter
5105552d5a
- Fix Windows build
2008-04-23 16:55:51 +00:00
Andrey Hristov
c931468b88
Update ext/mysql, ext/mysqli and ext/mysqlnd from development tree
2008-04-16 12:53:18 +00:00
Andrey Hristov
1bf96fdf5c
MFB : Fix for Bug #43832 mysqi_get_charset() doesn't expose charset comment
2008-03-25 18:28:13 +00:00
Andrey Hristov
9732763eca
Small fix and a test case to prove it
2008-03-20 15:34:09 +00:00
Andrey Hristov
0e884df573
- Don't modify the variables which are passed for parameter binding.
...
We need to clone them, if there will be a transformation (convert_to_xxx)
which will change the origin.
- Make mysqlnd more compatible to libmysql, in this case if the execute of
a statement fails set the state of the statement back to PREPARED
- A test case to check the case of a failing statement.
2008-03-20 13:25:49 +00:00
Andrey Hristov
e53f44b9bd
MFB - Bug #44352 mysqli_connect_error() false negative for host errors
2008-03-18 16:58:43 +00:00
Andrey Hristov
60869b3e8e
Update mysqlnd, ext/mysql and ext/mysqli - now possible to compile with different
...
configurations one or the another extension to use libmysql or mysqlnd mixed in
one binary
2008-03-10 20:27:15 +00:00
Rob Richards
7a92403c87
fix win32 build
2008-02-25 22:56:06 +00:00
Andrey Hristov
5855e35b01
Fix memory leak
2008-02-20 15:20:14 +00:00
Andrey Hristov
7b0625865b
Fix a compile warning + test
2008-02-19 15:38:24 +00:00
Andrey Hristov
62e8d0f5aa
Another fix
2008-02-14 15:20:08 +00:00
Andrey Hristov
91b568e65d
Fix memory errors
2008-02-14 14:48:57 +00:00
Andrey Hristov
77d6a5afe8
Update mysqlnd - fix bg_store
2008-02-14 12:51:00 +00:00
Andrey Hristov
82ad02f0cd
cvs sync
2008-02-11 16:45:15 +00:00
Andrey Hristov
925c22c65b
new 6.0 flag
2008-02-11 14:48:39 +00:00
Andrey Hristov
0c65a68fc9
Fix a bug and a test
2008-02-06 14:11:32 +00:00
Andrey Hristov
8d7807d681
MFB: Simplify unique string generation and plug a leak.
2008-02-04 17:55:51 +00:00
Andrey Hristov
cfcf16f0f7
Fix a leak and memory warning.
2008-02-04 17:32:43 +00:00
Rob Richards
65c4bd9d08
fix win32 build
2008-01-29 22:06:16 +00:00
Andrey Hristov
508841bb5c
Fix the build, add a missing file
2008-01-29 18:13:12 +00:00
Dmitry Stogov
205eda4377
missing spaces
2008-01-29 12:25:38 +00:00