| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
needed to move to a new structure MYSQLND_STMT. Makes
the code cleaner and less error-prone.
Also fix PDO/MySQL which directly touch mysqlnd internals
instead of using API calls.
|
| |
|
|
|
|
|
|
| |
We are anyway breaking the internal ABI in 5.3.2 so this won't hurt
and make us prepared for the future.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Things like this can be built on top of the core.
|
|
|
|
|
|
| |
due to problems on windows, which were not debugged. Better have
code that is disabled not in the core.
|
|
|
|
|
|
| |
on a upper level and by offloading it we reduce the complexity of
the core.
|
| |
|
| |
|
|
|
|
| |
that have timed out or are unusable for any other reason - bug #49761
|
| |
|
|
|
|
| |
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.
|
|
|
|
| |
(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.
|
|
|
|
|
| |
mysqlnd: mysql_num_fields returns wrong column count for mysql_list_fields
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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.
|
| |
|
|
|
|
|
| |
called externally static, from PHPAPI.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
- less warnings
- PHPAPI for mysqlnd_poll
|
|
|
|
|
| |
Includes 4 tests for mysqli_poll
|
|
|
|
|
| |
as well as uint->unsigned int
|
|
|
|
|
| |
controlled by a ini setting.
|
| |
|
| |
|
|
|
|
|
|
| |
Add mysqli_stmt_more_result()/mysqli_stmt_next_result(), but only in
mysqlnd builds as libmysql doesn't support this feature.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
- 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
----------------------------------------------------------------------
|
| |
|
|
|
|
|
| |
Updated ext/mysql and ext/mysqli in HEAD
|
|
|
|
|
|
|
|
|
| |
- 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.
|
|
(Similar to what ext/libxml is..)
|