Andrey Hristov
1a108f1bae
remove extern defintion of a variable that is no more
...
used outside of the file where it is declared.
Also really export with PHPAPI the protocol init/deinit functions
2010-01-11 19:13:43 +00:00
Andrey Hristov
8b3931b444
this function should be exporten in all cases, not only under PHP6
2010-01-11 18:40:11 +00:00
Andrey Hristov
d999552ae7
missed to commit in 5_3, here it comes, reusability of stats
2010-01-11 18:31:02 +00:00
Andrey Hristov
9b8d026d86
Rework the statistics macros to be reusable by external entities.
...
Rename handlers to triggers. Dynamically allocate space for the
statistics thus allow reusability.
2010-01-11 14:27:35 +00:00
Andrey Hristov
4a549fbb3d
missed to commit to the branch
2010-01-11 12:37:42 +00:00
Andrey Hristov
81695689b9
export some calls to init/deinit code outside of the module
2010-01-08 18:52:08 +00:00
Andrey Hristov
d20fdd603b
improve the stats subsystem. Reduce the number of macro definitions
...
in half by smartly introducing 2 new macros. Make MYSQLND::stats a pointer
from being aggregated and add triggers.
2010-01-08 17:35:20 +00:00
Andrey Hristov
3264e51983
add restart_psession and end_psession hooks
2010-01-08 13:47:03 +00:00
Andrey Hristov
73b23fca37
Change of way the packet objects are created/initialised
...
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.
2010-01-07 19:44:59 +00:00
Sebastian Bergmann
9ba1e81665
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Andrey Hristov
d76fa2b46c
move network creation to the init hook
2009-12-28 11:17:10 +00:00
Andrey Hristov
01adfaee5f
Unify. The typedef-ed structs in mysqlnd are always capitalized.
2009-12-23 11:58:45 +00:00
Johannes Schlüter
c764995c8e
install mysqlnd headers to allow shared build of extensions
2009-12-22 19:30:09 +00:00
Andrey Hristov
c95fa280ed
Fix double calls to free_contents if the connection cannot be
...
opened. mysqlnd have no probs, external code should not have too.
In any case, double call is not needed.
2009-12-22 17:44:42 +00:00
Andrey Hristov
e1251edc16
move state setting to the right place, in mysqlnd_init, no more
...
in mysqlnd::connect
2009-12-22 17:31:31 +00:00
Andrey Hristov
41ac91aecf
Move this function to MYSQLND_NET as it works on the
...
php stream
2009-12-21 16:52:10 +00:00
Andrey Hristov
ce349e3540
magic numbers to macros
2009-12-21 16:17:31 +00:00
Andrey Hristov
b4477669b4
Move compression and decompression code to separate functions
...
which can be overloaded on purpose.
2009-12-21 16:09:13 +00:00
Andrey Hristov
028bd4ba02
refactoring : move more network related functions to
...
mysqlnd_net.c . Now communication is split on two levels:
- logical (functions send and receive)
- physical (functions network_read and network_write)
2009-12-17 13:29:46 +00:00
Andrey Hristov
22528b14a4
During refactoring of the function mysqlnd_stream_write_w_header() it was
...
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);'
2009-12-17 12:30:58 +00:00
Andrey Hristov
d233b0b2af
call free_contents in every case, in case something is not freed
...
by the calling code
2009-12-16 14:38:30 +00:00
Andrey Hristov
a1ef2d9fb3
Remove unneeded dereferences
...
(oops, committed the trunk changes from a wrong directory, which splitted
this commit).
2009-12-16 14:06:09 +00:00
Andrey Hristov
b3546d1b5e
move MYSQLND_NET code to a separate file.
...
mysqlnd_wireprotocol is about the protocol not the transport
layer
2009-12-16 12:59:38 +00:00
Andrey Hristov
5e1c95fda4
remove duplicated code
2009-12-15 17:39:30 +00:00
Andrey Hristov
c101f7f542
Move code out of mysqlnd_conn::connect to mysqlnd_net::connect.
...
Thus mysqlnd_conn::connect() does less of what it should not do - think
about the transport level.
2009-12-15 17:33:06 +00:00
Andrey Hristov
70690e1163
remove C++ comments
2009-12-15 14:48:24 +00:00
Andrey Hristov
523471f7e8
export this function
2009-12-15 14:26:24 +00:00
Andrey Hristov
0371ef1070
refactor: move code that belongs to MYSQLND_NET out of MYSQLND
2009-12-15 13:13:51 +00:00
Pierre Joye
af206a90ae
- fix build, come on, it is not that hard to test before commit, is it?
2009-12-11 16:35:42 +00:00
Andrey Hristov
13c8bba00a
Make MYSQLND_NET dynamically allocated structure with allocator
...
and deallocator. More member functions will come.
2009-12-11 11:58:57 +00:00
Andrey Hristov
a9295f0343
remove stale comment
2009-12-11 10:21:34 +00:00
Andrey Hristov
0c7a9b8010
Move two functions which are used in the extension as methods of
...
the connection. Two functions less in the global namespace.
2009-12-11 10:18:00 +00:00
Andrey Hristov
a633de0020
bump version number
2009-12-10 11:59:14 +00:00
Andrey Hristov
00d76a8445
Add plugin storage for MYSQLND_STMT too
2009-12-10 11:18:05 +00:00
Andrey Hristov
06a417b6a9
Remove stub code which never actually was used for anything.
...
Things like this can be built on top of the core.
2009-12-09 20:38:11 +00:00
Andrey Hristov
6f598e62ff
Remove the zval caching from mysqlnd. It was disabled versions ago
...
due to problems on windows, which were not debugged. Better have
code that is disabled not in the core.
2009-12-09 20:21:05 +00:00
Andrey Hristov
d8a8d823ce
Fix compilation warnings
2009-12-09 18:11:03 +00:00
Andrey Hristov
4d2735007d
Remove disabled code - threaded fetching. This can be implemented
...
on a upper level and by offloading it we reduce the complexity of
the core.
2009-12-09 16:57:03 +00:00
Andrey Hristov
0f0f5f229b
I svn-commit.2.tmp (Modified) Row 2 Col 28 11:45 Ctrl-K H for help
...
fix compilation on windows and with other compilers who
don't like void* arithmetic
2009-12-03 10:50:02 +00:00
Pierre Joye
2386938aea
- disable this debug code until it is actually fixed
2009-12-03 10:41:20 +00:00
Andrey Hristov
bfc0ec1891
fix segfault introduced by Pierre in a recent commit
...
old code was doing something like
conn + sizeof(MYSQLND) * MYSQLND + plugin * sizeof(void) * sizeof(MYSQLND)
because `conn` is not casted to void*. `conn` has to be casted to void * and
then the whole experession will be void * and the calculations will work.
2009-12-03 09:43:26 +00:00
Andrey Hristov
2bc887e1d3
fix macro so that 5-byte BIT values are decoded correctly
2009-12-02 11:58:04 +00:00
Pierre Joye
2a3ec70d10
- void is NaN, you can't do math ops on void. Declarations go first. Fix TS build
2009-11-30 10:56:01 +00:00
Andrey Hristov
1cf1cb3015
fix debug windows build as well as remove a compilation warning
...
(a header not included)
2009-11-26 11:10:47 +00:00
Andrey Hristov
4ebc0fdfbc
Update charset table
2009-11-24 13:59:56 +00:00
Andrey Hristov
5143fe41e2
Compressed protocol support + extensibility for mysqlnd
2009-11-20 08:12:14 +00:00
Ulf Wendel
08db32e073
Fix: log slow queries in stats regardless of mysqlnd.log_mask setting.
2009-10-23 12:44:05 +00:00
Andrey Hristov
7b5ce9ab49
Don't forget to update the length too
2009-10-22 17:36:12 +00:00
Andrey Hristov
f2814dd0df
Have the lengths also to skip many calls to strlen
2009-10-22 17:07:55 +00:00
Ulf Wendel
629d8fe47e
Updating mysqlnd version number.
2009-10-22 16:10:02 +00:00
Ulf Wendel
00654b8a06
Fixing stats, updating test to accept new stats
2009-10-22 16:05:33 +00:00
Andrey Hristov
1aad525c6e
Move definition
2009-10-22 15:17:03 +00:00
Andrey Hristov
a692479d21
Count number of affected_rows for normal and PS queries
2009-10-22 14:30:51 +00:00
Ulf Wendel
d01d398bad
Fixing host info for TCP/IP and aligning mysqlnd and libmysql
2009-10-19 12:09:48 +00:00
Ulf Wendel
3eeaf566e0
Extending mysqlnd statistics/monitoring. Now counting COM_* commands.
2009-10-16 13:02:01 +00:00
Ulf Wendel
d8dc47d58f
Making mysqlnd emit no warnings when fetching pooled persistent connections that have timed out or are unusable for any other reason - bug #49761
2009-10-15 20:46:08 +00:00
Ulf Wendel
ab4670ee53
Fixing problems when calling connect (again and again) on a valid connection handle. Most of the patch comes from Andrey.
2009-10-15 15:49:40 +00:00
Ulf Wendel
a1d3a3224e
Avoid buffer resizing and let the initial buffer allocation happen a couple of lines later with conn->m->set_client_option(conn, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, ...). Andrey, I leave it to you to change the default size to 128k.
2009-10-08 16:33:17 +00:00
Ulf Wendel
4e6a1c2754
Fixing pconnect statistics.
2009-10-08 11:40:16 +00:00
Andrey Hristov
309fced64d
Increase the minimal size of the command buffer, which is used
...
for sending queries and in the future commpressed patch for reading
almost all packets from the wire instead of using stack buffers.
2009-10-07 17:33:51 +00:00
Andrey Hristov
06523621dd
revert the last change
2009-10-06 12:53:01 +00:00
Andrey Hristov
d9382399fc
count the queries
2009-10-06 10:33:23 +00:00
Andrey Hristov
2f81bcd44b
Fix ZTS build
2009-09-30 23:34:56 +00:00
Andrey Hristov
ba5c40b2ad
Use mnd_ wrappers wherever possible. Needed for
...
statistics.
2009-09-30 23:13:43 +00:00
Andrey Hristov
b9dcc28c24
Fix trace output. DBG_RETURN should be used in traced
...
functions.
2009-09-30 22:26:19 +00:00
Ulf Wendel
9408303390
Fixing a leak in mysqlnd when passing invalid fetch modes to mysqlnd.
2009-09-30 14:39:33 +00:00
Andrey Hristov
80f629ed9f
Fix possible crash when conn is NULL
2009-09-25 10:37:44 +00:00
Jani Taskinen
2c90fb8ea2
- Fix the build issue with php_mysqlnd_config.h ending up in wrong build directory
2009-09-24 18:01:17 +00:00
Dmitry Stogov
6f32199f75
Fixed compilation error
2009-09-23 08:33:23 +00:00
Andrey Hristov
452aca97e3
MFH:Check for the different types and create the
...
corresponding configuration file, so it can be used
by mysqli, even if mysqlnd is not enabled at all.
2009-09-22 14:44:11 +00:00
Andrey Hristov
c2e66884e1
MFH, a fix not included by the fix committed by Ulf.
...
pemalloc and then efree - too bad!
Sorry for committing in two passes, my big tree is already patched
with compressed.
2009-09-17 15:13:14 +00:00
Ulf Wendel
e6cf6693e6
Fix (by Andrey) and test for bug #49442 . Don't use efree() for memory 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.
2009-09-16 17:03:44 +00:00
Ulf Wendel
20005db2a0
Fix and tests for bug #49511 . mysqlnd and the MySQL Client Library (libmysql) use different networking APIs. mysqlnd does use PHP streams whereas libmysql uses its own wrapper of the operating level network calls. PHP sets by default a read timeout of 60s for streams - php.ini, default_socket_timeout. This default applies to all streams that set no other timeout value. mysqlnd has not set any other value and therefore it connections of long running queries can have been cut off after default_socket_timeout seconds resulting in a 2006 - MySQL Server has gone away error message. The MySQL Client Library sets a default timeout of 365 * 24 * 3600 seconds (1year) and waits for other timeouts to happen, e.g. TCP/IP timeouts. mysqlnd now uses the same very long timeout. The value is configurable through a new php.ini setting: mysqlnd.net_read_timeout. mysqlnd.net_read_timeout gets used by any extension (ext/mysql, ext/mysqli, PDO_MySQL) that uses mysqlnd. mysqlnd tells PHP Streams to use mysqlnd.net_read_timeout. Please note that there may be subtle differences between MYSQL_OPT_READ_TIMEOUT from the MySQL Client Library and PHP Streams. E.g. MYSQL_OPT_READ_TIMEOUT is documented to work only for TCP/IP connections and, prior to MySQL 5.1.2, only for Windows. PHP streams may not have this limitation. Please check the streams documentation, if in doubt.
2009-09-16 15:00:54 +00:00
Ulf Wendel
5f260e14b2
Next attempt to fix http://bugs.php.net/bug.php?id=48745 . Patch by Andrey.
2009-09-09 17:03:03 +00:00
Andrey Hristov
9bf747605d
Fix for bug#48745
...
mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields
2009-08-28 09:30:16 +00:00
Andrey Hristov
67c7a37d9b
Fixed bug #49027 (mysqli_options() doesn't work when using mysqlnd)
2009-08-27 13:16:39 +00:00
Andrey Hristov
2dcfcf7387
MFH: fix of the fix
2009-08-25 14:32:10 +00:00
Andrey Hristov
27cbcc6078
MFH:
...
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:25:01 +00:00
Andrey Hristov
cac5325aac
test 2
2009-08-03 14:50:10 +00:00
Andrey Hristov
af22257ba4
test
2009-08-03 14:46:11 +00:00
Johannes Schlüter
81761e636d
Fix path
2009-06-28 21:52:51 +00:00
Pierre Joye
a68f6c9c28
- fix build
2009-06-28 12:04:44 +00:00
Johannes Schlüter
9485cad688
Revert mysqlnd to RC3 state after issues with pconnects
2009-06-25 19:03:52 +00:00
David Soria Parra
4d7e6edd63
MFH: Fix bug #48644 mysqlnd does not compile with '--enable-mysqlnd-threading'
2009-06-23 14:15:28 +00:00
Johannes Schlüter
86eaa90955
MFH The experimental warning sohuld be in the configure output...
2009-06-23 13:19:28 +00:00
Johannes Schlüter
067276a043
Temporarily disable this optimization causing too much trouble, kept in HEAD
2009-06-18 15:07:23 +00:00
Andrey Hristov
0aada07656
MFH:
...
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:22:13 +00:00
Andrey Hristov
30800a79b9
MFH: C-comments
2009-06-16 18:00:00 +00:00
Andrey Hristov
10ee06ca48
MFH:
...
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:07:14 +00:00
Andrey Hristov
27270621cb
MFH:
...
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:38 +00:00
Andrey Hristov
a2acaa7fcd
MFH:
...
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:35 +00:00
Andrey Hristov
22c8786493
MFH:
...
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:57 +00:00
Andrey Hristov
9a2cc0ce67
Put these in an ifdef because they are not used at all if the zval cache
...
is off.
2009-06-11 17:54:04 +00:00
Pierre Joye
f2fcd8fb29
- silent warning and make it less ambiguous
2009-06-11 14:36:48 +00:00
Johannes Schlüter
11340cf299
MFH: Use a better extension version
2009-06-11 10:18:08 +00:00
Andrey Hristov
28c8d25dca
MFH:
...
Protect the code when variable is NULL, which should never happen, but
anyway, you know about "never happens" :)
2009-06-11 08:52:06 +00:00
Andrey Hristov
cff09ba5df
MFH:
...
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:35:47 +00:00
Andrey Hristov
a3b85c28c6
Sync with PHP6 - TSRMLS_FETCH
...
Extract reference decrement in own function
Remove PHPAPI of a function and make it static as it is not called
externally
2009-06-11 08:30:08 +00:00
Andrey Hristov
ec777b89f4
Merge with HEAD. Someone committed changes to HEAD and did not merge back to
...
the branch.
Also switch off the zval cache, for now.
2009-06-08 10:20:27 +00:00
Andrey Hristov
c1d46eb502
MFH:Add support for mysql_stmt_store_result() from libmysql 6.0.8+ and 5.4.x
2009-05-29 13:09:47 +00:00
Andrey Hristov
ccf0665170
MFH: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:40 +00:00
Andrey Hristov
133296f962
MFH: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:38 +00:00
Andrey Hristov
804f6138a6
MFH:Fix a valgrind warning as well as more trace log information
2009-05-28 17:49:29 +00:00
Andrey Hristov
76d091d5f5
MFH: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:41 +00:00
Andrey Hristov
6c4e8fa4f9
MFH:
...
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:48 +00:00
Andrey Hristov
7ae2505cab
Fix a typo, utf8 is 3 byte max, for us, for now
...
Add a another cset
2009-05-26 13:41:18 +00:00
Johannes Schlüter
501ecb10f4
Fix #47535 Compilation failure in ps_fetch_from_1_to_8_bytes()
2009-04-20 09:16:51 +00:00
Felipe Pena
dcd86aebd2
- MFH: Removed UG(unicode) checks
2009-03-30 16:52:33 +00:00
Johannes Schlüter
bcb40030a5
MFH Fix #47819 (Getting pdo_mysql.so: undefined symbol: mysqlnd_debug_init at
...
startup)
2009-03-30 13:55:47 +00:00
Johannes Schlüter
5942f27d86
MFH: mark mysqlnd's threading (which can be used for background pre-fetching)
...
experimental
2009-03-17 10:05:19 +00:00
Andrey Hristov
df7ebb5d41
MFH: Fix the build because the macro name has changed
2009-03-17 09:51:31 +00:00
Andrey Hristov
8f102c1697
MFH: Add charsets from MySQL 6.0 as a structure to be used later
2009-02-20 13:25:12 +00:00
Johannes Schlüter
ebef020ecc
- MFH: Improve mysqlnd's internal method registration
2009-02-16 17:26:43 +00:00
Johannes Schlüter
074b084852
MFH: export mysql_refresh
...
[DOC] This makes mysql_refresh() as described in
http://dev.mysql.com/doc/refman/6.0/en/mysql-refresh.html
available as mysqli_Refresh() and mysqli->refresh()
MYSQLI_REFRESH_BACKUP_LOG is only available when linking libmysql 6.0
or mysqlnd
2009-01-22 21:01:58 +00:00
Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
2008-12-31 11:15:49 +00:00
Johannes Schlüter
836dd82c8e
MFH: No infinite loop in case the connection broke
2008-11-28 14:38:03 +00:00
Andrey Hristov
d43b7b022f
MFH:
...
Windows fixes for mysqlnd
Less warnings + PHPAPI for mysqlnd_poll
2008-11-20 17:21:36 +00:00
Andrey Hristov
e62f5f8f03
MFH:
...
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:45:43 +00:00
Andrey Hristov
3343619b9a
MFH: Fix Windows build, pure C compiler
2008-11-18 18:02:44 +00:00
Andrey Hristov
825034cea5
MFH:
...
Asynchronous queries for mysqli, when mysqlnd is enabled.
Includes 4 tests for mysqli_poll
2008-11-18 17:02:18 +00:00
Andrey Hristov
737c3c89c6
MFB: More Windows types cleanup
2008-11-06 18:48:55 +00:00
Andrey Hristov
e49366850f
MFH: Use win32/php_stdint.h for stdint types on Windows
2008-11-06 14:21:50 +00:00
Andrey Hristov
e099d732a6
MFH: More cleanup of config-win.h
2008-11-06 11:29:20 +00:00
Andrey Hristov
9186528994
MFH:
...
Get rid of many defines (which simplifies the code a lot),
as well as uint->unsigned int
2008-11-06 10:37:47 +00:00
Andrey Hristov
a836ea7b71
Fix windows build
2008-11-01 21:22:29 +00:00
Andrey Hristov
9726d6b047
Fix the build
2008-10-31 21:29:54 +00:00
Andrey Hristov
77c1e145e1
MFB:
...
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:32:17 +00:00
Johannes Schlüter
04d9bbe65e
MFH: Fix #46285 (lastInsertId() returns "0" when a deferenced PDOStatement is
...
executed)
2008-10-27 17:21:22 +00:00
Andrey Hristov
7d4c51c2bd
MFH:
...
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:14:17 +00:00
Andrey Hristov
b18bf1f880
Fix a name
2008-10-27 14:38:31 +00:00
Johannes Schlüter
c3dab8f191
MFH: Don't dereference NULL-pointer
2008-10-19 12:28:43 +00:00
Johannes Schlüter
80720205c0
MFH: Improve order in MINFO output
2008-10-01 21:36:43 +00:00
Johannes Schlüter
3c335a3b5e
MFH: Handle failed connections right
2008-10-01 19:47:17 +00:00
Andrey Hristov
b429a84c2b
MFH:
...
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:35:01 +00:00
Andrey Hristov
8bb2465a51
MFH:
...
Add float conversions too. Float users should understand how float works!!!
2008-09-15 18:09:20 +00:00
Andrey Hristov
5f7bd521f0
MFH:Compile-in a string-to-int conversion for INT columns by default,
...
controlled by a ini setting.
2008-09-15 14:07:44 +00:00
Pierre Joye
6c7f41d482
- fix build (declaration must be fist in a given contex)
2008-09-14 22:10:24 +00:00
Andrey Hristov
99ea8068df
MFH:
...
- 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:08:41 +00:00
Johannes Schlüter
9a13dea744
MFH: constify strings
2008-08-19 10:42:11 +00:00
Johannes Schlüter
aeab8bade6
MFH: Fix empty error message when connecting to a bad server
2008-08-19 10:16:12 +00:00
Felipe Pena
0fbe6a0c14
- MFH: Added TSRMLS_DC to apply_func_args_t and zend_hash_apply_with_arguments.
2008-07-24 19:52:24 +00:00
Andrey Hristov
24e7d03e48
MFH: 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:07:38 +00:00
Andrey Hristov
2c54b3abb5
More debugging info for the trace log
2008-07-22 16:06:08 +00:00
Andrey Hristov
136a55fcd9
Sync with bzr
2008-07-15 13:11:09 +00:00
Jani Taskinen
1e2b2bbeae
- Some config*.m4 file cleanups: NO tabs in these!
2008-07-14 09:02:26 +00:00
Andrey Hristov
827b772c9f
Fix remaining valgrind problems with pconn and zval cache
...
HEAD merge will follow tomorrow.
2008-06-24 22:22:48 +00:00
Andrey Hristov
943e9a577b
Fix double-free, introduced lately
2008-06-24 13:19:29 +00:00
Andrey Hristov
e0f45cf7ae
Fix possible bug with persistent connections and mysqlnd
2008-06-24 11:01:38 +00:00
Andrey Hristov
9d7955b821
Add missing header
2008-06-24 08:01:13 +00:00
Andrey Hristov
f93e715fc5
Even more debug info
2008-06-24 06:56:36 +00:00
Andrey Hristov
ad0f0b73c7
Added more debug info for tracking problems
2008-06-23 22:21:18 +00:00
Andrey Hristov
e49404929a
Fix a bug that let PDO fail. It has been long fixed, but locally. Now I know
...
what it fixes :)
2008-05-29 15:49:32 +00:00
Elizabeth Marie Smith
7d4dfa8ee4
Windows configure fixes, a few additional lib names allowed, apache2 only on for zts builds since apache on win is always threaded, isapi no longer stops configure in non-zts mode, look for _debug for debug libraries when debug is enabled
2008-05-14 03:13:17 +00:00
Andrey Hristov
8256272540
Update mysqlnd
2008-05-07 15:14:26 +00:00
Andrey Hristov
f4e659d2af
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:22:19 +00:00
Johannes Schlüter
1a419cac12
- MFH: Fix Windows build
2008-04-23 16:56:51 +00:00
Andrey Hristov
de560f3161
MFB: Update CVS from the development tree
2008-04-16 12:57:38 +00:00
Andrey Hristov
5abe8c8d01
Small updates & a fix for
...
Bug #43832 mysqi_get_charset() doesn't expose charset comment
2008-03-25 18:27:17 +00:00
Andrey Hristov
85cd8525c9
Small fix and a test case to prove it's right
2008-03-20 15:29:14 +00:00
Andrey Hristov
6867385d75
- 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
(bug#44390 bind_param / bind_result and Object member variables)
- 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 14:03:30 +00:00
Andrey Hristov
caf3e9c3f1
Fixed a bunch of bugs reported in
...
Bug #44352 mysqli_connect_error() false negative for host errors
From now on the mysqli object doesn't have that magic properties, like
error, which were readable but not visible through isset(), property_exists()
and var_dump(). All other ext/mysqli classes were fixed too.
Now it will be easier to debug mysqli based applications.
2008-03-18 16:57:31 +00:00
Andrey Hristov
725b31fc6c
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:15:38 +00:00
Rob Richards
de52173257
MFH: fix win32 build
2008-02-25 22:57:09 +00:00
Andrey Hristov
7d0cee8c80
Fix memory leak
2008-02-20 15:18:17 +00:00
Andrey Hristov
4dd2425184
Fix compile warning
2008-02-19 15:38:58 +00:00
Andrey Hristov
28e7d996df
Another fix
2008-02-14 15:20:49 +00:00
Andrey Hristov
7e0be017df
Fix memory errors<
2008-02-14 14:50:21 +00:00
Andrey Hristov
2d9d22395f
Update mysqlnd - fix bg_store
2008-02-14 12:49:30 +00:00
Andrey Hristov
cf07e941f1
cvs sync
2008-02-11 16:44:48 +00:00
Andrey Hristov
55b1f666d7
new 6.0 flag
2008-02-11 14:48:04 +00:00
Andrey Hristov
9790d7bfe8
MFH: Fix a compatibility bug and a failing test
2008-02-06 14:12:32 +00:00
Andrey Hristov
1caa85a682
Pconnect working with mysqli_real_connect(). To less failing tests.
2008-02-06 11:34:44 +00:00
Andrey Hristov
2b6e11b555
Simplify unique string generation and plug a leak.
2008-02-04 17:55:06 +00:00
Andrey Hristov
2d5e8a1e55
Fix a leak, memory warning and failing test case.
2008-02-04 17:33:46 +00:00
Rob Richards
d7622b8ecf
MFH: fix win32 build
2008-01-29 22:06:43 +00:00
Andrey Hristov
829831f5ba
Fix the build, add a missing file
2008-01-29 18:11:46 +00:00
Dmitry Stogov
a55d235fef
missing spaces
2008-01-29 12:25:25 +00:00
Andrey Hristov
00877eff13
Moved initialization code into a function.
2008-01-29 11:59:53 +00:00
Andrey Hristov
d95c29d7f6
Moving extension specific code to php_mysqlnd.c as the old rule is.
2008-01-28 23:23:08 +00:00
Andrey Hristov
2033c1b7f2
some config.w32 fixes
...
moved mysqlnd's block allocator to a separate file and also now
it's part of the connection, no MT problems.
2008-01-28 22:50:06 +00:00
Andrey Hristov
7932ccba6d
More optimizations - less MM calls
...
Clearly separated fetching (physical reading) from decoding phases (data
interpretation). Threaded fetching added but disabled as needs more work for
Windows. For Linux needs some touches to add pthreads if this is enabled,
probably with a compile-time switch.
The code reorganisation makes it easy to add also async API, similar to
cURL's one.
2008-01-28 18:25:50 +00:00
Rob Richards
b65adbb4fb
MFH: fix win32 compile
2008-01-25 15:54:58 +00:00
Andrey Hristov
c52b63ea1d
Merge with internal version
2008-01-23 19:11:28 +00:00
Rob Richards
9238ee440f
MFH: fix win32 compile
2008-01-09 11:23:59 +00:00
Andrey Hristov
82e36686b3
strncpy->strlcpy
2008-01-08 13:11:55 +00:00
Andrey Hristov
60a1a17399
Header protection
2008-01-03 12:49:45 +00:00
Andrey Hristov
18aa7b9607
Remove unused field
2008-01-03 11:37:33 +00:00
Andrey Hristov
fdf20a8287
- Fix problems with double definitions
...
- Clean up a bit a type mess - 4 types less. No need to have aliases
for the same thing (unification is the name).
- New macro for Johannes mysqlnd_stmt_ro_result_metadata
2008-01-02 21:14:35 +00:00
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
2007-12-31 07:17:19 +00:00
Andrey Hristov
6d2bcdacc1
Fix segfault in debug build
2007-11-08 17:29:42 +00:00
Andrey Hristov
8b8cd15428
Fix build failure on Windows. Seems "free" can't be used even as method name of a structure. The MS compiler (the preprocessor most probably) changes it to _free_dbg
2007-10-23 10:10:18 +00:00
Andrey Hristov
8a2e9e6043
Sync mysqlnd. Should still compile with 5_2 for those who want to use the
...
current stable branch. mysqli from 5_3 patched for mysqlnd should be also
compilable with 5_2.
2007-10-16 20:56:22 +00:00
Yiduo (David) Wang
f4f0a47433
Fix build for mysqlnd
2007-10-07 21:47:36 +00:00
Andrey Hristov
8b9b553aa2
Import mysqlnd
...
Patch ext/mysql and ext/mysqli to support mysqlnd
2007-10-05 21:23:56 +00:00