Andrey Hristov
fd0d9822d8
remove stale comment
2009-12-11 10:21:34 +00:00
Andrey Hristov
2cc95115f3
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
1121c11899
bump version number
2009-12-10 11:59:14 +00:00
Andrey Hristov
311684e1e4
Add plugin storage for MYSQLND_STMT too
2009-12-10 11:18:05 +00:00
Andrey Hristov
3a7f8ea575
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
fd44827701
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
685a8398a9
Fix compilation warnings
2009-12-09 18:11:03 +00:00
Andrey Hristov
157f1bddf1
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
3cfacd1e07
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
330523c60c
- disable this debug code until it is actually fixed
2009-12-03 10:41:20 +00:00
Andrey Hristov
4c1065522d
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
8f0a26cc79
fix macro so that 5-byte BIT values are decoded correctly
2009-12-02 11:58:04 +00:00
Pierre Joye
80e5ef6fa5
- 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
0c6fa49fff
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
597406bbb3
Update charset table
2009-11-24 13:59:56 +00:00
Andrey Hristov
7674c942c7
Compressed protocol support + extensibility for mysqlnd
2009-11-20 08:12:14 +00:00
Ulf Wendel
bd64a66e1a
Fix: log slow queries in stats regardless of mysqlnd.log_mask setting.
2009-10-23 12:44:05 +00:00
Andrey Hristov
4afa56f846
Don't forget to update the length too
2009-10-22 17:36:12 +00:00
Andrey Hristov
a86ab84a4c
Have the lengths also to skip many calls to strlen
2009-10-22 17:07:55 +00:00
Ulf Wendel
cfb54072cf
Updating mysqlnd version number.
2009-10-22 16:10:02 +00:00
Ulf Wendel
277846d23c
Fixing stats, updating test to accept new stats
2009-10-22 16:05:33 +00:00
Andrey Hristov
b39c5e2332
Move definition
2009-10-22 15:17:03 +00:00
Andrey Hristov
8792edcf76
Count number of affected_rows for normal and PS queries
2009-10-22 14:30:51 +00:00
Ulf Wendel
0949463ed8
Fixing host info for TCP/IP and aligning mysqlnd and libmysql
2009-10-19 12:09:48 +00:00
Ulf Wendel
f0e6db4d56
Extending mysqlnd statistics/monitoring. Now counting COM_* commands.
2009-10-16 13:02:01 +00:00
Ulf Wendel
29d771c543
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
355a88f676
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
410804abc4
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
e9f9b39ae0
Fixing pconnect statistics.
2009-10-08 11:40:16 +00:00
Andrey Hristov
5b97f74b62
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
dc01e66027
revert the last change
2009-10-06 12:53:01 +00:00
Andrey Hristov
a86aff9871
count the queries
2009-10-06 10:33:23 +00:00
Andrey Hristov
2743c7a6df
Fix ZTS build
2009-09-30 23:34:56 +00:00
Andrey Hristov
bc7bbaa65a
Use mnd_ wrappers wherever possible. Needed for
...
statistics.
2009-09-30 23:13:43 +00:00
Andrey Hristov
4af8d99eb6
Fix trace output. DBG_RETURN should be used in traced
...
functions.
2009-09-30 22:26:19 +00:00
Ulf Wendel
d79cba2afd
Fixing a leak in mysqlnd when passing invalid fetch modes to mysqlnd.
2009-09-30 14:39:33 +00:00
Pierre Joye
f5e52c9a79
- fix TS build, this macro contains code and declaration, always put it right after your declaration
2009-09-28 12:54:23 +00:00
Andrey Hristov
cec76fd650
Fix possible crash when conn is NULL
2009-09-25 10:37:44 +00:00
Jani Taskinen
b41f9661f8
- 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
69df782740
Fixed compilation error
2009-09-23 08:33:23 +00:00
Andrey Hristov
67a0d7ad46
sync with branch, after Ulf's commits
2009-09-22 14:52:12 +00:00
Andrey Hristov
26f5344ed0
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:43:37 +00:00
Andrey Hristov
4ac04d8936
Afix 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:36 +00:00
Ulf Wendel
1b5f0f63b4
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
8e42cbfeac
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
5254c6f372
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
e8412fb61c
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
149914f644
Fixed bug #49027 (mysqli_options() doesn't work when using mysqlnd)
2009-08-27 13:16:39 +00:00
Andrey Hristov
ad310d21ee
Baby, one more time :(
2009-08-25 14:31:29 +00:00
Andrey Hristov
ac71943174
Better fix. A fix of the fix
2009-08-25 14:30:37 +00:00