Commit Graph

638 Commits

Author SHA1 Message Date
Ulf Wendel
1e0743df12 Fixing test 2009-09-29 16:37:50 +00:00
Ulf Wendel
1e0d7fc509 Fixing test 2009-09-28 10:42:36 +00:00
Ulf Wendel
260596bfaa Trying to respect time limit to please Andrey who must be using slooow hardware... 2009-09-25 13:21:44 +00:00
Andrey Hristov
089e8b56a1 Fix mysqli_stmt_attr_set in libmysql mode.
mysql_stmt_attr_set returns my_bool instead of int.
If it was int, then 0 is success and !0 is failure, but
for my_bool 0 (FALSE) is failure and !0 is success.
2009-09-25 12:25:54 +00:00
Andrey Hristov
07757b4f2f Fix a crash in the rare case when a persistent connection
is found dead, after CHNG_USER. mysql->mysql will be NULL
and segfault will follow.
2009-09-25 11:38:19 +00:00
Ulf Wendel
6ae4ba4173 Large package to check how compression handles package queues. 2009-09-25 10:56:17 +00:00
Andrey Hristov
1d25ad7f5c Remove unused variable 2009-09-25 10:55:06 +00:00
Ulf Wendel
8ad273c88e Replacing MYSQL_TEST_COMPRESS env var with more generic MYSQL_TEST_CONNECT_FLAGS to be able to test all connection flags. Fixing some test. 2009-09-25 10:54:16 +00:00
Andrey Hristov
5d8d0fcfb1 Fix error code checking for mysql_stmt_attr_set. There
is a test that checks this.
2009-09-25 10:52:29 +00:00
Ulf Wendel
e123cae8ac Proxying as many connect calls as possible to make testing of the compression protocol @ mysqlnd easier. By setting the environment variable MYSQL_TEST_COMPRESS you can tell the tests to set the MYSQLI_CLIENT_COMPRESS flag upon connect. 2009-09-24 12:51:03 +00:00
Ulf Wendel
9326836676 Fixing test 2009-09-24 09:40:24 +00:00
Ulf Wendel
d3b2b3c155 Coverage for the OO variants of some functions 2009-09-24 08:19:56 +00:00
Andrey Hristov
5a1ae5b876 Fix handling of BIT fields for non-PS. We need
macros from mysqlnd to be able to convert a bit
stream to a number. BIT is binary data thus
the result is a string, and not unicode
2009-09-22 15:07:39 +00:00
Andrey Hristov
e4be0b369c Fix handling of BIT fields in mysqli, when libmysql is used
We need to use macros from mysqlnd to be able to read the
bit fields, as they are specially encoded. mysqlnd is always
there, 5.3+, so its macros can be used, even if mysqlnd is
not compiled as library of choice.
2009-09-22 13:58:52 +00:00
Ulf Wendel
f0cf479eb4 Fixing test 2009-09-22 08:42:44 +00:00
Ulf Wendel
f532a81aea Fixing test. There is nothing we can do about the MySQL Client Library allocate huge 4GB buffers for some SQL types. 2009-09-22 07:11:50 +00:00
Ulf Wendel
1cafe8c54c Fixing test. Can't wait to see the new run-tests materialize for detecting skip section parse errors. 2009-09-22 06:59:04 +00:00
Ulf Wendel
decdb55cef Fixing test 2009-09-21 15:59:22 +00:00
Ulf Wendel
16be7ee5c5 Fixing test 2009-09-21 15:24:47 +00:00
Ulf Wendel
ddef8f511f Moving test code around to get test failures down without testing less. Users of the MySQL Client Lib should always call stmt_bind_result after execute - not before. 2009-09-21 14:20:05 +00:00
Ulf Wendel
4dcea7c624 Fixing test by calling it a known limit. We keept the test failing as a reminder to think about how to handle BIT(32) and up but none of us has an idea. Thinks work fine up to BIT(31) - the limitation should be documented. 2009-09-21 12:02:30 +00:00
Ulf Wendel
b979107fd0 Fixing test 2009-09-21 11:54:15 +00:00
Ulf Wendel
0c8262069f Not nice but neither the MySQL Client Library not mysqlnd are supposed to detect invalid flags. Therefore: fixing test 2009-09-21 10:16:44 +00:00
Ulf Wendel
356371a7bc Fixing mysqli_result_references_mysqlnd.php 2009-09-21 10:06:13 +00:00
Ulf Wendel
b35ffe4689 Fixing mysqli_get_client_stats.phpt. More testing for MYSQLI_INIT_COMMAND 2009-09-21 09:35:23 +00:00
Ulf Wendel
0d202cd84d Fixing test: references has to be collected even if the users disables the collection of statistics. It is needed for memory management. 2009-09-21 08:59:00 +00:00
Ulf Wendel
a65e1456e9 Fixing test - the standard test table will not accept NULL values for column id 2009-09-21 08:36:14 +00:00
Andrey Hristov
528e66fbf5 Fix for bug#48909 Segmentation fault in mysqli_stmt_execute 2009-09-18 14:32:01 +00:00
Ulf Wendel
4bb9113812 better coverage for mysqli_info 2009-09-17 07:11:25 +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
30a6d1b851 Fix for bug #49357 (MySQLi extension fails to recognize POINT (spatial) colums).
Do yourself a favour and use mysqlnd. mysqlnd has no isuses here.

If you insist on using the MySQL Client Library (libmysql) I strongly recommend to use mysqli_stmt_store_result() when fetching geometry data using prepared statements. When streaming data, which is the default for prepared statements, ext/mysqli will have to make a guess on the size of the result buffer it needs. The guess is based on a length reported by the MySQL CLient Library (libmysql). The MySQL Client Library reports 4GB (!) for a POINT - a conservative and safe guess. Consequently, ext/mysqli will try to allocate 4GB of RAM. The true (maximum) size of the column is not available before buffering the result on the client using mysqli_stmt_store_result(). If you call mysqli_stmt_store_result(), the result buffers will not get bigger than needed. However, store_result()/buffering is usually not what you want when you ask for prepared statements.
2009-09-11 13:38:47 +00:00
Ulf Wendel
a69c198790 Stepping back to PHP 5.2.x and earlier logic of allocating even huge pieces of memory for large BLOB types to avoid data truncation. This fixes the test failure of 005.phpt when using MySQL Client
Library (libmysql). The test does pass with mysqlnd because mysqlnd does not have any issues here.
2009-09-11 12:28:47 +00:00
Ulf Wendel
9af451ff49 Fixing a crash which must have existed since PHP 5.0. At least the crash can be reproduced with PHP 5.0.6. The crash happens only when using the MySQL Client Library (libmysql) - it does not happen
when using mysqlnd.
2009-09-11 12:16:56 +00:00
Ulf Wendel
667c597512 Andrey fixed the bug but the test was somewhat borked. Fixing test. 2009-09-09 18:31:00 +00:00
Ulf Wendel
86481c0ac0 Tests for http://bugs.php.net/bug.php?id=49357 (libmysql only) . The simple fix suggested in the bug system is not good enough, therefore no fix yet. 2009-09-09 17:10:29 +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
2e92372322 Fix for bug#46614 Extended MySQLi class gives incorrect empty() result 2009-08-27 12:41:14 +00:00
Jani Taskinen
90f148ab99 Merge from PHP_5_3 2009-08-04 14:51:29 +00:00
Jani Taskinen
65db89ffbe - Fixed bug #49122 (undefined reference to mysqlnd_stmt_next_result on compile with --with-mysqli and MySQL 6.0) 2009-08-02 01:07:38 +00:00
Jani Taskinen
0e6ed79e7e - Fix test 2009-07-30 10:53:04 +00:00
Ulf Wendel
a2577bb946 Enabling test as requested by the skipif comment... it does pass when slightly modified. 2009-07-06 15:52:48 +00:00
Ulf Wendel
4df1f0d912 Fixing mysqlnd version test to run some four previously skipped tests. There is no proper way to check the mysqlnd version. The best one can do is adapt the tests to what PHP 5.3 and PHP 6.0 return today. 2009-07-06 15:43:59 +00:00
Ulf Wendel
ec603a0c41 Adapting (old) tests to current PHP 6 semantics - s/unicode.semantics test/version_compare 2009-07-06 15:07:31 +00:00
Ulf Wendel
97e129a44e Adding --CLEAN-- sections to all ext/mysqli tests 2009-07-06 14:36:52 +00:00
Ulf Wendel
17eab779a3 ... to play with large data sets. Currently its only 10MB in size to keep the test runtime short. However, its easy to increase, if you want to test large data sets 2009-07-03 12:13:57 +00:00
Ulf Wendel
90436bdb58 Fixing borked test, again new run-tests.php has found it... Fails with HEAD, passes with 5.3 2009-07-03 08:23:57 +00:00
Ulf Wendel
1bbff4f7db Fixing borked test - thanks again new run-tests.php tool (and team). 2009-07-03 07:49:47 +00:00
Ulf Wendel
71ca6b83ce Adding XFAIL for some tests which expect the zval cache of mysqlnd to be on. It has been disabled for the PHP 5.3.0 release. Adding INI sections to ensure that statistics are collected. Adding tests that check if statistics collection can be disabled 2009-07-01 12:51:40 +00:00
Ulf Wendel
e92bf65c4c Fixing tests - messages/warnings can vary by version 2009-05-29 13:36:54 +00:00