Commit Graph

41 Commits

Author SHA1 Message Date
Andrey Hristov
37cbcf3850 remove C++ comments 2009-12-15 14:48:24 +00:00
Andrey Hristov
a5640ede09 export this function 2009-12-15 14:26:24 +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
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
7674c942c7 Compressed protocol support + extensibility for mysqlnd 2009-11-20 08:12:14 +00:00
Ulf Wendel
cfb54072cf Updating mysqlnd version number. 2009-10-22 16:10:02 +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
Andrey Hristov
2743c7a6df Fix ZTS build 2009-09-30 23:34:56 +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
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
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
Johannes Schlüter
361c9d353f Use a better extension version 2009-06-11 10:08:09 +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
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
Johannes Schlüter
6a6e94c0d9 - Improve mysqlnd's internal method registration 2009-02-16 17:25:37 +00:00
Sebastian Bergmann
7f4dc8702a Bump copyright year, 3 of 3. 2008-12-31 11:12: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
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
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
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
fd699ce7d3 Fix possible bug with persistent connections 2008-06-24 11:19:07 +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
62e8d0f5aa Another fix 2008-02-14 15:20:08 +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
508841bb5c Fix the build, add a missing file 2008-01-29 18:13:12 +00:00
Andrey Hristov
e580f0fd24 Moving extension specific code to php_mysqlnd.c as the old rule is. 2008-01-28 23:24:05 +00:00
Andrey Hristov
18c8e6501b MFB: 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:27:49 +00:00
Andrey Hristov
69f4a40d99 Merge with internal version 2008-01-23 19:09:33 +00:00
Andrey Hristov
69f7eaa749 - 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:16:46 +00:00
Sebastian Bergmann
9b620d50b4 Bump copyright year, 2 of 2. 2007-12-31 07:12:20 +00:00
Andrey Hristov
9ac92cfecb Update mysqlnd in HEAD
Updated ext/mysql and ext/mysqli in HEAD
2007-10-02 10:45:27 +00:00
Andrey Hristov
7186530157 Update CVS
- Fix BIT problem for BIT values represented with 5 bytes. Typo.
- Make it possible with an ini variable to switch off/on statistics
  collection.
- Compile-out debug checking of uneaten data from the line, when the
  build is release. According to callgrind this was eating some percentage.
2007-08-03 16:32:27 +00:00
Jani Taskinen
f3c2a33f42 - Moved mysqnd to it's own directory: It is sort of an extension itself.
(Similar to what ext/libxml is..)
2007-07-25 23:47:33 +00:00