Commit Graph

223 Commits

Author SHA1 Message Date
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
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
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
Ulf Wendel
b592b26ff2 Updating test to reflect API changes. 2009-05-29 13:22:47 +00:00
Ulf Wendel
ce638000ae Skip test for libmysql. The MySQL C-API does not support it, mysqlnd does... 2009-05-29 13:12:24 +00:00
Ulf Wendel
d8d9ef2c62 1) The wording of a message can differ by version and by libmysql vs. mysqlnd. 2) %i is better than %s 2009-05-29 13:02:30 +00:00
Ulf Wendel
0653a585d1 Behaviour is undefined with libmysql, accept whatever libmysql may return. With mysqlnd you get the defined value of -1 to indicate 'no value'. 2009-05-29 12:55:39 +00:00
Ulf Wendel
3da36d58dc 'Fixing' test to reflect a libmysql vs. mysqlnd difference. With libmysql it is not defined what mysql_stmt_store_result() shall return when one tries to store the (non-existing) result set of a failed SQL statement, http://dev.mysql.com/doc/refman/6.0/en/mysql-stmt-store-result.html . mysqlnd will detect the SQL failure and return false. libmysql will return true. If you want libmysql to change, file a bug report at MySQL... I don't think there is a good way to work around this in the extension itself. 2009-05-29 11:59:09 +00:00
Ulf Wendel
b59d4f6ffc Another detail where mysqlnd is superior than libmysql. The mysql_info() from libmysql does not support SELECT: http://dev.mysql.com/doc/refman/6.0/en/mysql-info.html . mysqlnd does support it. Libmysql feature request filed http://bugs.mysql.com/bug.php?id=45189 2009-05-29 11:00:53 +00:00
Ulf Wendel
64c8da2ff0 Weaker test - libmysql/server error messages can differ by version 2009-05-29 10:34:07 +00:00
Ulf Wendel
12c301e7ec Weaker test: functions are only available if HAVE_EMBEDDED_MYSQLI is set. There is probably no proper way to check this condition in the user land. 2009-05-29 10:25:37 +00:00
Ulf Wendel
05fdee2c65 Skip when using libmysql. Likely a regression bug - http://bugs.mysql.com/bug.php?id=45184 2009-05-29 10:15:32 +00:00
Andrey Hristov
6b21010022 The option has changed the name, hence we change the test 2009-05-29 08:58:10 +00:00
Ulf Wendel
8116eeb124 Asynchronous queries are mysqlnd only. If you want them with libmysql, ping JimW who works on Connector/C. 2009-05-28 18:57:14 +00:00
Ulf Wendel
db3f0aa99e Andrey needs to have a look at this one. The bug report itself is bogus. However, the bug report shows a result set and that is wrong. 2009-05-28 18:27:44 +00:00
Andrey Hristov
7b5dcc895a Forgot to commit this one, of the ANSI_QUOTES fame 2009-05-28 18:10:12 +00:00
Andrey Hristov
42495ccdde Fix again the tests for ANSI_QUOTES 2009-05-28 18:00:08 +00:00
Andrey Hristov
86aa4e8035 Fix a valgrind warning as well as more trace log information 2009-05-28 17:49:00 +00:00
Ulf Wendel
f9fb575cd7 I had accidently removed Andrey's path to work with ANSI QUOTES... fixing what I broke (part 1) 2009-05-28 15:47:08 +00:00
Ulf Wendel
85cb084fc5 1) Changing EXPECT[F] sections to work with PHP 5.3 and PHP 6. 2) Merging a couple of fixes I applied to PHP 5.3 only yesterday. The changes should make it a little easier to do MFH and follow the rules in the future as we will soon have identical tests for PHP 5_3 and HEAD. 2009-05-28 14:11:41 +00:00
Ulf Wendel
ff1535fe73 Fixing test (its OK in 5_3 and needs to be fixed in HEAD) 2009-05-28 13:55:46 +00:00
Andrey Hristov
7d2383061c Fix a test, UNSIGNED is expected 2009-05-28 10:16:18 +00:00
Andrey Hristov
2caa76ae62 Fix failures when the server is running with ANSI_QUOTES 2009-05-28 09:57:54 +00:00
Andrey Hristov
e3456c0460 Fix tests when the server is running with ANSI_QUOTES 2009-05-27 18:13:56 +00:00
Johannes Schlüter
00fc56bd92 Fix tests 2009-01-22 21:56:46 +00:00
Johannes Schlüter
9177d73c08 Fix #47050 mysqli_poll() modifies improper variables 2009-01-12 14:01:47 +00:00
Johannes Schlüter
66c17bcca4 - Fix #45940 MySQLI OO does not populate connect_error property on failed
connect
2009-01-12 12:54:17 +00:00
Johannes Schlüter
c7e001a736 Proper ctor usage (Fix #46044) 2009-01-07 16:29:42 +00:00
Felipe Pena
2632316e80 - Removed UEXPECT(F)
- Unicodified some tests
2009-01-06 00:56:04 +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
Johannes Schlüter
96b3cd0a64 Fix #46285 (lastInsertId() returns "0" when a deferenced PDOStatement is
executed)
2008-10-27 17:20:26 +00:00
Andrey Hristov
7d9744ae61 Fix tests 2008-10-27 14:33:09 +00:00
Andrey Hristov
722b9135d9 Fix for bug#46019 MySQLi::init() leaks memory 2008-09-19 11:35:37 +00:00
Antony Dovgal
2285d87ced fix test 2008-09-18 08:40:20 +00:00
Antony Dovgal
a46a628c7d clean up garbage 2008-08-26 11:05:59 +00:00
Antony Dovgal
cdf442f043 fix typo 2008-08-26 10:59:03 +00:00