Commit Graph

632 Commits

Author SHA1 Message Date
Ulf Wendel
94b7b548c5 MySQL 5.6 fractional seconds and PS 2011-08-12 11:51:44 +00:00
Ulf Wendel
6e54341273 MySQL 5.6 fractional seconds and PS 2011-08-12 11:51:44 +00:00
Ulf Wendel
12954aa27d Andrey, please have a look. Not sure if the test is correct, e.g. MySQL 5.5.3+ really needed? 2011-08-12 11:23:36 +00:00
Ulf Wendel
caca693403 Andrey, please have a look. Not sure if the test is correct, e.g. MySQL 5.5.3+ really needed? 2011-08-12 11:23:36 +00:00
Ulf Wendel
4bb63cb7a0 Andrey, please have a look. Not sure if the test is correct, e.g. MySQL 5.5.3+ really needed? 2011-08-12 11:23:36 +00:00
Ulf Wendel
e0cc7032f1 Andrey, please have a look. This should not cause errors. 2011-08-12 11:23:16 +00:00
Ulf Wendel
17fb279359 Andrey, please have a look. This should not cause errors. 2011-08-12 11:23:16 +00:00
Ulf Wendel
ae89daff6f Andrey, please have a look. This should not cause errors. 2011-08-12 11:23:16 +00:00
Andrey Hristov
8a929d8942 Fix for bug #55283 SSL options set by mysqli_ssl_set ignored for MySQLi persistent connections 2011-08-05 13:39:30 +00:00
Andrey Hristov
534de60284 Fix for bug #55283 SSL options set by mysqli_ssl_set ignored for MySQLi persistent connections 2011-08-05 13:39:30 +00:00
Andrey Hristov
5f1107144a Fix for bug #55283 SSL options set by mysqli_ssl_set ignored for MySQLi persistent connections 2011-08-05 13:39:30 +00:00
Andrey Hristov
c9e7716cfd Add mysqli_error_list() that returns an array with errors. Typically only
one and just one for libmysql. mysqlnd can return generate more than one error
during its work and with mysqli_error() only the last error is being reported.
In the array returned by mysqli_error_list() / $mysqli->error_list, all errors will be found.
The list is reset when the next command is executed
2011-08-04 09:51:26 +00:00
Andrey Hristov
11f198b203 Add mysqli_error_list() that returns an array with errors. Typically only
one and just one for libmysql. mysqlnd can return generate more than one error
during its work and with mysqli_error() only the last error is being reported.
In the array returned by mysqli_error_list() / $mysqli->error_list, all errors will be found.
The list is reset when the next command is executed
2011-08-04 09:51:26 +00:00
Ulf Wendel
e2ad8e9c1c Double check if line is sill usable and connected to last successfully selected db. 2011-07-26 16:14:59 +00:00
Ulf Wendel
498aaae6d8 Double check if line is sill usable and connected to last successfully selected db. 2011-07-26 16:14:59 +00:00
Ulf Wendel
5d4d7837fa Double check if line is sill usable and connected to last successfully selected db. 2011-07-26 16:14:59 +00:00
Ulf Wendel
823de19461 Check what happens if switching DB via API fails. Expected: no change of current DB/schema. 2011-07-26 15:37:59 +00:00
Ulf Wendel
8e3de07b4f Check what happens if switching DB via API fails. Expected: no change of current DB/schema. 2011-07-26 15:37:59 +00:00
Ulf Wendel
62b3c85b05 Check what happens if switching DB via API fails. Expected: no change of current DB/schema. 2011-07-26 15:37:59 +00:00
Ulf Wendel
658d0d66fd Test update. 5.4+ is more verbose. 2011-07-25 15:07:54 +00:00
Ulf Wendel
bd07868280 Test update. 5.4+ is more verbose. 2011-07-25 15:07:54 +00:00
Ulf Wendel
43db337405 Test update. 5.4+ throws a catchable fatal error, 5.3 does not. 2011-07-25 14:53:01 +00:00
Ulf Wendel
93b501ed61 Test update. 5.4+ throws a catchable fatal error, 5.3 does not. 2011-07-25 14:53:01 +00:00
Andrey Hristov
d4ae5bd995 Fix for bug 54674..typo in the check of SJIS 2011-05-09 16:20:35 +00:00
Andrey Hristov
6242101f2b Fix for bug 54674..typo in the check of SJIS 2011-05-09 16:20:35 +00:00
Andrey Hristov
133ba9b5dd fix buffer overflow - overwriting with 0x0, due to
unchecked buffer size. This can be easily workarouned on 
existing unpatched systems by increasing
mysqlnd.net_cmd_buffer_size ini variable to more than 8k
2011-03-24 16:12:18 +00:00
Andrey Hristov
8b33e6fae0 fix buffer overflow - overwriting with 0x0, due to
unchecked buffer size. This can be easily workarouned on 
existing unpatched systems by increasing
mysqlnd.net_cmd_buffer_size ini variable to more than 8k
2011-03-24 16:12:18 +00:00
Ulf Wendel
38fd7f48d0 Limit test with 65k params, should crash mysqlnd 2011-03-24 13:40:06 +00:00
Ulf Wendel
a270348c24 Limit test with 65k params, should crash mysqlnd 2011-03-24 13:40:06 +00:00
Ulf Wendel
1eb3bdd802 Coverage for a 'silent server protocol change' from the past for which both mysqlnd and libmysql have workarounds. 2011-03-23 08:57:52 +00:00
Ulf Wendel
8307f9e892 Coverage for a 'silent server protocol change' from the past for which both mysqlnd and libmysql have workarounds. 2011-03-23 08:57:52 +00:00
Ulf Wendel
afdcb5ecb4 Test coverage for some of the cases where LAST_INSERT_ID() and API *_insert_id() differ as documented in the MySQL manual in particular the C API reference section 2011-03-17 15:18:22 +00:00
Ulf Wendel
8bbd451647 Test coverage for some of the cases where LAST_INSERT_ID() and API *_insert_id() differ as documented in the MySQL manual in particular the C API reference section 2011-03-17 15:18:22 +00:00
Andrey Hristov
d903915f93 Fix for bug #54221 mysqli::get_warnings segfault when used in multi queries 2011-03-17 10:28:53 +00:00
Andrey Hristov
56cdee2def Fix for bug #54221 mysqli::get_warnings segfault when used in multi queries 2011-03-17 10:28:53 +00:00
Johannes Schlüter
7d0a6c3f8b - Fix tests. temp dir might be something other than /tmp 2011-02-22 14:49:32 +00:00
Johannes Schlüter
0448336c2c - Fix tests. temp dir might be something other than /tmp 2011-02-22 14:49:32 +00:00
Andrey Hristov
eb0dd2b8ab fixed a problem in mysqlnd. 0 was always as num_rows returned for
unbuffered sets (text protocol and PS).
2011-02-16 16:36:33 +00:00
Andrey Hristov
1bdc780d30 fixed a problem in mysqlnd. 0 was always as num_rows returned for
unbuffered sets (text protocol and PS).
2011-02-16 16:36:33 +00:00
Ulf Wendel
0b474317fd Don't expect a certain server reply, it is undefined what happens. 2011-01-28 13:41:02 +00:00
Ulf Wendel
267bf9b31b Don't expect a certain server reply, it is undefined what happens. 2011-01-28 13:41:02 +00:00
Ulf Wendel
b961a26705 Check PAM auth plugin build in to mysqlnd. I am afraid one cant do much better testing without making many assumptions on the server setup. 2011-01-25 17:00:30 +00:00
Ulf Wendel
a55e03aaff Fix tests: don't expect people to use a certain db/schema for testing 2011-01-17 13:06:44 +00:00
Ulf Wendel
ad8892f91d Fix tests: don't expect people to use a certain db/schema for testing 2011-01-17 13:06:44 +00:00
Kalle Sommer Nielsen
d244ac46a1 MFT: Added 'db' and 'catalog' keys to the field fetching functions (FR #39847) 2011-01-17 11:20:54 +00:00
Kalle Sommer Nielsen
5ba90aefb0 Added 'catalog' to the field fetching functions in mysqli (Thanks to Johannes for the headsup) 2011-01-17 10:43:53 +00:00
Kalle Sommer Nielsen
69a3575b38 Implemented FR #39847 (mysqli_fetch_[field|fields|field_direct] need to return db) 2011-01-07 18:25:55 +00:00
Andrey Hristov
eaaef0d870 Proper fix for
Bug #53503      mysqli::query returns false after successful LOAD DATA query
which fixes als #56349, same behavior but in ext/mysql. Both due to a bug
in mysqlnd. Never was a problem with libmysql.
Also fixed the 53503's test case as it always reported PASS, even when there
should have been a failure.
2011-01-07 14:22:30 +00:00
Andrey Hristov
5549e066f2 Proper fix for
Bug #53503      mysqli::query returns false after successful LOAD DATA query
which fixes als #56349, same behavior but in ext/mysql. Both due to a bug
in mysqlnd. Never was a problem with libmysql.
Also fixed the 53503's test case as it always reported PASS, even when there
should have been a failure.
2011-01-07 14:22:30 +00:00
Andrey Hristov
cfac5f5b67 extending the API interface - plugins can register
themselves with a structure and can be searched.
Every plugin can have statistics and they are shown
under the statistics of mysqlnd in MINFO.
2010-12-28 15:16:21 +00:00
Kalle Sommer Nielsen
b529d43c0d Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query) 2010-12-12 16:17:50 +00:00
Kalle Sommer Nielsen
7456f1d8f8 Fixed bug #53503 (mysqli::query returns false after successful LOAD DATA query) 2010-12-12 16:17:50 +00:00
Andrey Hristov
7ff7f9780e fix test after newly introduced constant 2010-12-02 19:11:41 +00:00
Andrey Hristov
9f045cd40e fix test after newly introduced constant 2010-12-02 19:11:41 +00:00
Ulf Wendel
1891feac44 Testing for the two new statistics 'bytes_received_real_data_normal' and 'bytes_received_real_data_ps' 2010-11-12 12:21:35 +00:00
Ulf Wendel
b343748d56 Testing for the two new statistics 'bytes_received_real_data_normal' and 'bytes_received_real_data_ps' 2010-11-12 12:21:35 +00:00
Andrey Hristov
837391a9a7 two new stats 2010-11-05 20:07:34 +00:00
Andrey Hristov
bcb4c8427e two new stats 2010-11-05 20:07:34 +00:00
Andrey Hristov
1f9cf93cac Fix for Bug #52686 mysql_stmt_attr_[gs]et arg. points to incorrect type 2010-10-06 11:11:02 +00:00
Andrey Hristov
4f62c099cd Fix for Bug #52686 mysql_stmt_attr_[gs]et arg. points to incorrect type 2010-10-06 11:11:02 +00:00
Andrey Hristov
517fd63c32 fix the test 2010-09-29 11:40:57 +00:00
Andrey Hristov
9d6fa31713 fix the test 2010-09-29 11:40:57 +00:00
Andrey Hristov
6a43b14849 Fixed bug #45921 (Can't initialize character set hebrew)
sorry for committing it separated
2010-09-27 12:37:23 +00:00
Andrey Hristov
42a80fac8c Fixed bug #45921 (Can't initialize character set hebrew) 2010-09-27 12:35:59 +00:00
Ulf Wendel
8bb124394b Let's try not to have 'uft8'-only tests and avoid setting the charset upon connect. I've changed the tests to make no assumptions on the server charset setting. var_dump()/EXPECTF tests got replaced with dynamic tests which try to take the current charset into account. 2010-09-23 15:08:43 +00:00
Ulf Wendel
1ab38567b9 Let's try not to have 'uft8'-only tests and avoid setting the charset upon connect. I've changed the tests to make no assumptions on the server charset setting. var_dump()/EXPECTF tests got replaced with dynamic tests which try to take the current charset into account. 2010-09-23 15:08:43 +00:00
Ulf Wendel
389965f1de Merge from head: do not use deprecated function aliases. The test logic is unchanged. 2010-09-23 14:59:13 +00:00
Andrey Hristov
1af3e68880 Unify, force one charset at connect, thus fixing
test failures because different servers have different
system charsets.
2010-09-22 18:25:33 +00:00
Andrey Hristov
bdaec773b5 Unify, force one charset at connect, thus fixing
test failures because different servers have different
system charsets.
2010-09-22 18:25:33 +00:00
Ulf Wendel
44fba4d934 Test update for sql_mode = ansi 2010-09-22 15:22:22 +00:00
Ulf Wendel
7f0ec2a127 Test update for sql_mode = ansi 2010-09-22 15:22:22 +00:00
Andrey Hristov
c0528261d7 update tests 2010-09-22 11:09:29 +00:00
Andrey Hristov
047f0e4d88 update tests 2010-09-22 11:09:29 +00:00
Ulf Wendel
2ff0c392e7 Trying to pimp gcov.php.net code coverage tests.. trying to cover mysqlnd compress code with a standard test run 2010-09-20 19:01:13 +00:00
Ulf Wendel
10974d77f4 Trying to pimp gcov.php.net code coverage tests.. trying to cover mysqlnd compress code with a standard test run 2010-09-20 19:01:13 +00:00
Ulf Wendel
7f6d8e53fd Align test to the style used in the other tests 2010-09-20 18:26:11 +00:00
Ulf Wendel
f7c54d0737 Align test to the style used in the other tests 2010-09-20 18:26:11 +00:00
Ulf Wendel
1a40f20729 No reason not to run the tests with libmysql. Its long, long ago that pconnect has been a mysqlnd only feature 2010-09-20 17:26:39 +00:00
Ulf Wendel
579b5f2d63 No reason not to run the tests with libmysql. Its long, long ago that pconnect has been a mysqlnd only feature 2010-09-20 17:26:39 +00:00
Andrey Hristov
531085785b add test case for 52891 2010-09-20 09:02:31 +00:00
Andrey Hristov
e389303ef3 add test case for 52891 2010-09-20 09:02:31 +00:00
Ulf Wendel
0dc0d76854 Fix test 2010-09-15 08:20:15 +00:00
Andrey Hristov
fc2143b993 unify magic quotes handling. Also fix a problem which
resulted in a longjmp in debug PHP,because of usage of
zval that is NULL in a hash context.
2010-09-14 16:09:42 +00:00
Ulf Wendel
4789901728 Test for http://bugs.php.net/52221. Test will fail with mysqlnd but should pass with libmysql. 2010-09-03 14:20:32 +00:00
Ulf Wendel
d1f40f7439 Fix test failure. Add new test for MYSQLI_OPT_INT_AND_FLOAT_NATIVE mysqlnd feature. 2010-09-02 14:57:38 +00:00
Ulf Wendel
48814f96ef Fix test failure. Add new test for MYSQLI_OPT_INT_AND_FLOAT_NATIVE mysqlnd feature. 2010-09-02 14:57:38 +00:00
Ulf Wendel
42fea46887 Adding MYSQLI_OPT_SSL_VERIFY_SERVER_CERT for use with mysqli_options(). 2010-08-30 16:59:10 +00:00
Ulf Wendel
f671ad6275 Adding MYSQLI_OPT_SSL_VERIFY_SERVER_CERT for use with mysqli_options(). 2010-08-30 16:59:10 +00:00
Ulf Wendel
6338f99d52 Test for http://bugs.mysql.com/bug.php?id=49406, Binding params doesn't work when selecting a date inside a CASE-WHEN 2010-08-26 13:35:20 +00:00
Ulf Wendel
db9667d2a5 Test for http://bugs.mysql.com/bug.php?id=49406, Binding params doesn't work when selecting a date inside a CASE-WHEN 2010-08-26 13:35:20 +00:00
Andrey Hristov
c204922c7f Added utf16 and utf32 support, as in MySQL 5.5, in mysqlnd.
Fixed tests, so they don't try to use SET NAMES utf16|utf32,
as character_set_client can't be set to those (the lexer can't
read ucs2, utf16 and utf32).
Added support for 4-byte utf8, as found in MySQL 5.5
2010-08-16 17:44:50 +00:00
Andrey Hristov
277c7d4dea Added utf16 and utf32 support, as in MySQL 5.5, in mysqlnd.
Fixed tests, so they don't try to use SET NAMES utf16|utf32,
as character_set_client can't be set to those (the lexer can't
read ucs2, utf16 and utf32).
Added support for 4-byte utf8, as found in MySQL 5.5
2010-08-16 17:44:50 +00:00
Andrey Hristov
0a9ca62a77 Fix test, so it doesn't fail with MySQL 5.5, where InnoDB
is the default engine
2010-08-16 16:15:15 +00:00
Andrey Hristov
5d54d79e04 Fix test, so it doesn't fail with MySQL 5.5, where InnoDB
is the default engine
2010-08-16 16:15:15 +00:00
Andrey Hristov
4d72dba301 detect easily which charset doesn't work 2010-08-16 16:13:55 +00:00
Andrey Hristov
3ed9d8fd85 detect easily which charset doesn't work 2010-08-16 16:13:55 +00:00
Andrey Hristov
d7b72a0494 Fix for bug #52433 Call to undefined method mysqli::poll() 2010-08-13 09:18:06 +00:00
Andrey Hristov
973e134d2d Fix for bug #52433 Call to undefined method mysqli::poll() 2010-08-13 09:18:06 +00:00
Andrey Hristov
4dece1a2a9 update tests 2010-07-07 15:53:34 +00:00
Andrey Hristov
b580bc3875 Cleanup in trunk. Remove some functions, noted in
UPGRADING. sed-ed the tests to change the usage
to the real function name.
2010-07-07 12:09:36 +00:00
Andrey Hristov
ce1bd65d29 arginfo for mysqli, was too fast to commit in trunk instead of one
directory up, thus the patch was split in two.
2010-07-07 11:37:35 +00:00
Andrey Hristov
6900399d7e Arginfo for mysqli 2010-07-07 11:36:29 +00:00
Andrey Hristov
5a4a66cdd5 Fix for bug #52115 mysqli_result::fetch_all returns null, not an empty array 2010-06-18 17:25:41 +00:00
Andrey Hristov
c7f10efabc Fix for bug #52115 mysqli_result::fetch_all returns null, not an empty array 2010-06-18 17:25:41 +00:00
Andrey Hristov
2f838ef547 Fix the test for libmysql, which expects the certificates
to be in the directory where the interpreter is started. When
using mysqlnd they should not include path and will be found
in the directory of the script.
2010-06-14 18:23:17 +00:00
Andrey Hristov
0da5464a81 Fix the test for libmysql, which expects the certificates
to be in the directory where the interpreter is started. When
using mysqlnd they should not include path and will be found
in the directory of the script.
2010-06-14 18:23:17 +00:00
Andrey Hristov
65b1895759 Fixed bug #52082 (character_set_client & character_set_connection reset after
mysqli_change_user())

libmysql >= 5.1.23 will PASS, older library versions will fail
2010-06-14 17:16:20 +00:00
Andrey Hristov
1d9c49bb3c Fixed bug #52082 (character_set_client & character_set_connection reset after
mysqli_change_user())

libmysql >= 5.1.23 will PASS, older library versions will fail
2010-06-14 17:16:20 +00:00
Ulf Wendel
afcb62ba1e Fixing tests 2010-06-10 13:40:13 +00:00
Ulf Wendel
6c0ddd0b6f Fixing tests 2010-06-10 13:40:13 +00:00
Ulf Wendel
aeae0d1bad Portability improvement 2010-06-08 14:57:10 +00:00
Ulf Wendel
01a9630946 Portability improvement 2010-06-08 14:57:10 +00:00
Ulf Wendel
3e5ac35bd9 Portability improvements 2010-06-08 14:29:05 +00:00
Ulf Wendel
0484919f62 Portability improvements 2010-06-08 14:29:05 +00:00
Ulf Wendel
6b1d256af5 More SQL strict mode updates 2010-06-08 13:05:49 +00:00
Ulf Wendel
7b27887091 More SQL strict mode updates 2010-06-08 13:05:49 +00:00
Ulf Wendel
949b509299 Making tests pass strict sql mode. 2010-06-08 10:55:12 +00:00
Ulf Wendel
0fb528edee Making tests pass strict sql mode. 2010-06-08 10:55:12 +00:00
Andrey Hristov
4cd5db922b Fix test 2010-05-31 16:53:33 +00:00
Andrey Hristov
8fc1e91e61 Fix test 2010-05-31 16:53:33 +00:00
Ulf Wendel
c0a8ce2f61 Updating test to reflect the latest and more verbose mysqlnd error messages, updating mysqlnd error message as well. 2010-05-31 13:56:42 +00:00
Ulf Wendel
73a32c52d2 Updating test to reflect the latest and more verbose mysqlnd error messages, updating mysqlnd error message as well. 2010-05-31 13:56:42 +00:00
Ulf Wendel
9b334da667 Fixing test - make sure it checks the same conditions for libmysql and mysqlnd 2010-05-31 12:55:59 +00:00
Ulf Wendel
31aada825f Fixing test - make sure it checks the same conditions for libmysql and mysqlnd 2010-05-31 12:55:59 +00:00
Ulf Wendel
fb80ebe102 Fixing test 2010-05-31 12:22:48 +00:00
Ulf Wendel
c96feb3dda Fixing test 2010-05-31 12:22:48 +00:00
Ulf Wendel
4b5666a539 Fixing mysqli_stmt_attr_set @ libmysql 2010-05-31 12:10:04 +00:00
Ulf Wendel
f0446ca9e3 Fixing mysqli_stmt_attr_set @ libmysql 2010-05-31 12:10:04 +00:00
Ulf Wendel
ba6ee3fc06 Open server bug: mysqlnd works around it, libmysql fails. Let's skip because MySQL Server version tests are tricky and error prone. 2010-05-27 13:01:17 +00:00
Ulf Wendel
cc3db5cc65 Open server bug: mysqlnd works around it, libmysql fails. Let's skip because MySQL Server version tests are tricky and error prone. 2010-05-27 13:01:17 +00:00
Ulf Wendel
6356bcbbb9 Test fixes and updates to work with a wider range of MySQL server configs 2010-05-27 12:09:39 +00:00
Ulf Wendel
b094e5296b Test fixes and updates to work with a wider range of MySQL server configs 2010-05-27 12:09:39 +00:00
Andrey Hristov
44acaec542 Fix test 2010-05-26 13:36:49 +00:00
Andrey Hristov
0d468290be Fix test 2010-05-26 13:36:49 +00:00
Andrey Hristov
f9ad56eab9 Remove a function that has no usage. The zval cache was disabled/removed
in 5.3.0-RC3.
2010-05-26 13:30:19 +00:00
Andrey Hristov
560169068d Update test file 2010-05-18 11:36:54 +00:00
Andrey Hristov
7dd13d56cc Add iterator to mysqli_result. Works both for :
- USE_RESULT, can be iterated only once, kind of forward iterator
- STORE_RESULT, can be iterated multiple times
2010-05-18 10:39:26 +00:00
Andrey Hristov
87bac04bf1 Better fix for #51605 2010-05-13 11:05:09 +00:00
Andrey Hristov
6cefa510d6 Better fix for #51605 2010-05-13 11:05:09 +00:00
Andrey Hristov
d3b7aaa3fc One more time fixing the tests, lets use $IS_MYSQLND which comes from connect.inc 2010-05-11 15:55:07 +00:00
Andrey Hristov
70b6fd2ae4 One more time fixing the tests, lets use $IS_MYSQLND which comes from connect.inc 2010-05-11 15:55:07 +00:00
Andrey Hristov
cab261ea16 Fix for mysqli_stmt_execute.phpt, should be ran only against
4.1+ servers. MySQL's SLEEP function is available since 5.0.12, thus
the tests that use this function should be ran only if the server
is at least 5.0.12.
2010-05-11 15:49:03 +00:00
Andrey Hristov
ab232ebb09 Fix for mysqli_stmt_execute.phpt, should be ran only against
4.1+ servers. MySQL's SLEEP function is available since 5.0.12, thus
the tests that use this function should be ran only if the server
is at least 5.0.12.
2010-05-11 15:49:03 +00:00
Andrey Hristov
98585ccb37 These tests should be run only if mysqli uses mysqlnd. Part of fix for
Bug #51712 Test mysql_mysqlnd_read_timeout_long must fail on MySQL4
2010-05-11 15:27:03 +00:00
Andrey Hristov
fd6f3961f8 These tests should be run only if mysqli uses mysqlnd. Part of fix for
Bug #51712 Test mysql_mysqlnd_read_timeout_long must fail on MySQL4
2010-05-11 15:27:03 +00:00
Andrey Hristov
41ad139d17 Fix for bug #51605 (Mysqli zombie links) 2010-05-11 10:03:16 +00:00
Andrey Hristov
962aa93ec7 Fix for bug #51605 (Mysqli zombie links) 2010-05-11 10:03:16 +00:00
Andrey Hristov
b72437494b Add a test case for the recently fixed memleak 2010-04-29 13:19:57 +00:00
Andrey Hristov
60db5154d2 Add a test case for the recently fixed memleak 2010-04-29 13:19:57 +00:00
Andrey Hristov
16e4bd5d58 Try blob columns instead of int, and insert a lot of data at once 2010-04-29 12:07:02 +00:00
Andrey Hristov
d7abb57745 Try blob columns instead of int, and insert a lot of data at once 2010-04-29 12:07:02 +00:00
Andrey Hristov
3d900d4cad Fixed very rare memory leak in mysqlnd, when binding thousands of columns 2010-04-27 12:32:34 +00:00
Andrey Hristov
8546225b6e Fixed very rare memory leak in mysqlnd, when binding thousands of columns 2010-04-27 12:32:34 +00:00
Andrey Hristov
8525f7bb02 Test case for the buffer overflow in mysqlnd_change_user 2010-04-27 08:45:23 +00:00
Andrey Hristov
a00f8f4ea7 Test case for the buffer overflow in mysqlnd_change_user 2010-04-27 08:45:23 +00:00
Andrey Hristov
af6dd192b3 Fix for bug #51647 Certificate file without private key (pk in another file) doesn't work 2010-04-23 13:54:40 +00:00
Andrey Hristov
e9f9f66f2e Fix for bug #51647 Certificate file without private key (pk in another file) doesn't work 2010-04-23 13:54:40 +00:00
Andrey Hristov
dd9fc198ce Fix for bug#49234 method not found ssl_set
Patch was tested and compiles on Windows. (Thanks Kalle)
2010-04-15 11:01:30 +00:00
Andrey Hristov
c04f752625 Fix for bug#49234 method not found ssl_set
Patch was tested and compiles on Windows. (Thanks Kalle)
2010-04-15 11:01:30 +00:00
Andrey Hristov
be73f948d2 Fixing the second test 2010-04-08 13:18:52 +00:00
Andrey Hristov
4b2111d178 Fixing the second test 2010-04-08 13:18:52 +00:00
Andrey Hristov
48c3d20dd4 one more fix and both work with libmysql and mysqlnd 2010-04-08 10:53:38 +00:00
Andrey Hristov
4e441ef30b one more fix and both work with libmysql and mysqlnd 2010-04-08 10:53:38 +00:00
Andrey Hristov
840d2dc8a7 Another fix for the 16 chars user limitation of MySQL 2010-04-07 18:28:46 +00:00
Andrey Hristov
48392f04fa Another fix for the 16 chars user limitation of MySQL 2010-04-07 18:28:46 +00:00
Andrey Hristov
dfbe6cb392 Fix test. The usernames in the server are 16 chars long 2010-04-07 18:05:42 +00:00
Andrey Hristov
7670d2948d Fix test. The usernames in the server are 16 chars long 2010-04-07 18:05:42 +00:00
Andrey Hristov
94cd357f5b Make it coupled - what is allocated with mnd_ should be freed
with mnd_ and vice versa.
Added mnd_pestrndup and mnd_pestrdup, which wrap the normal
calls to be able to track this calls.
Fixed some failing tests.
2010-03-29 17:04:16 +00:00
Andrey Hristov
4870cac70e Make it coupled - what is allocated with mnd_ should be freed
with mnd_ and vice versa.
Added mnd_pestrndup and mnd_pestrdup, which wrap the normal
calls to be able to track this calls.
Fixed some failing tests.
2010-03-29 17:04:16 +00:00
Andrey Hristov
ec36ac1610 Fix tests that fail when the MySQL's socket file is not /tmp/mysql.sock
as it is in when compiled from source and the default for mysqlnd.
SuSE for example uses /var/run/mysql/mysql.sock . Also, sql.safe_mode
(ext/mysql and ingres) needs the socket.
Fix possible crashes in mysqlnd. When packets are shorter, functions should
return error.
2010-03-26 16:58:25 +00:00
Andrey Hristov
7868bca437 Fix tests that fail when the MySQL's socket file is not /tmp/mysql.sock
as it is in when compiled from source and the default for mysqlnd.
SuSE for example uses /var/run/mysql/mysql.sock . Also, sql.safe_mode
(ext/mysql and ingres) needs the socket.
Fix possible crashes in mysqlnd. When packets are shorter, functions should
return error.
2010-03-26 16:58:25 +00:00
Johannes Schlüter
eb0de2af90 revert 293939 Fixed bug #50636 (MySQLi_Result sets values before calling
constructor)
2010-02-11 21:42:48 +00:00
Ulf Wendel
7c7d7ac1fa No idea which recent change has cause this little API change, however it is not a big change and maybe it is even an improvement. 2010-02-02 13:10:50 +00:00
Ulf Wendel
8aa8b6135b Tests related to #50727 2010-02-01 12:18:50 +00:00
Andrey Hristov
6407250e70 Fix for bug#50772
mysqli constructor without parameters does not return a working mysqli object
2010-01-25 13:23:32 +00:00
Ulf Wendel
795f716832 Updating test to new libmysql feature set (first introduced in MySQL 6.0 but now backported to MySQL 5.5). 2010-01-04 15:29:18 +00:00
Ulf Wendel
bd4c681a42 Fixing test 2010-01-04 14:59:04 +00:00
Ulf Wendel
bf9d5991ea Tweaking test. Andrey, you once requested such a test, please have a look if it does exactly what you want it to do. 2010-01-04 14:34:44 +00:00
Ulf Wendel
39e27c9030 The internal zval cache has been removed and not been reintroduced... remove corresponding test code 2010-01-04 13:44:10 +00:00
Pierrick Charron
614fd65795 Fixed bug #50636 (MySQLi_Result sets values before calling constructor) 2010-01-03 16:59:33 +00:00
Ulf Wendel
e2a2205a58 Test for what Andrey has found with 16M packets 2009-12-17 14:15:28 +00:00
Ulf Wendel
671ebe958a Adapting tests to accept actual behaviour found in 5.2, 5.3 and 6.0. The behaviour is wrong according to the documentation: mysqli_connect_error() should return an empty string (not NULL), if there is no error. However, changing this would break BC and most users will not notice the difference between NULL and empty string anyway. 2009-12-09 12:06:10 +00:00
Ulf Wendel
5ed0015f62 mysqli won't accept empty string for socket, skip test of mysqli.default_socket if test run does not use socket 2009-11-04 16:56:32 +00:00
Ulf Wendel
4a95aa3989 Fix for bug #49965 . Let mysqli_options() try to cast option values to the appropriate type. 2009-11-03 14:56:04 +00:00
Ulf Wendel
00654b8a06 Fixing stats, updating test to accept new stats 2009-10-22 16:05:33 +00:00
Ulf Wendel
d356459971 There subtle differences between Linux and Win. mysqlnd is a bit more verbose on Win... silencing to make the test pass 2009-10-21 18:57:45 +00:00
Ulf Wendel
8df115c25e Making test a bit more portable 2009-10-20 17:54:57 +00:00
Ulf Wendel
03c3c1edb3 Fixing test 2009-10-20 17:03:32 +00:00
Ulf Wendel
3258a6572d libmysql is still 'buggy' - skip test with libmysql 2009-10-20 14:11:43 +00:00
Ulf Wendel
3fb67347ea Well, hacking around to cope with mysql version specific behaviour if using libmysql... 2009-10-20 13:58:57 +00:00
Ulf Wendel
87a4f09cbf Skipping tests if InnoDB is available but disabled. I wonder what InnoDB status comes next... 2009-10-20 12:41:58 +00:00
Ulf Wendel
57c1b63c2d Fixing typo in SKIPIF and partly skipping tests if using remote MySQL because LOAD LOCAL INFILE will fail 2009-10-20 12:31:04 +00:00
Ulf Wendel
eb0e09f5dc Using require[_once] instead of include. Adding logic to connect.inc to detect multiple inclusions of connect.inc which leads to a Fatal error because of my_mysqli_connect() function redefinition. Some tests did include connect.inc twice -> run-tests - even the one from trunk - did not detect Fatal error in SKIPIF -> false-positive test result... 2009-10-19 20:07:25 +00:00
Ulf Wendel
344d6803ec mysqlnd is a bit more verbose than libmysql - silence mysqlnd here for easier comparison of test results. 2009-10-19 16:07:10 +00:00
Ulf Wendel
f610cdd9a2 MySQL server and metadata - a sad story... trying to make the test pass with a few more server versions 2009-10-19 12:55:11 +00:00
Ulf Wendel
d01d398bad Fixing host info for TCP/IP and aligning mysqlnd and libmysql 2009-10-19 12:09:48 +00:00
Ulf Wendel
3eeaf566e0 Extending mysqlnd statistics/monitoring. Now counting COM_* commands. 2009-10-16 13:02:01 +00:00
Ulf Wendel
ab4670ee53 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
5cb8e9b22a Updating test because of http://news.php.net/php.cvs/60561 2009-10-01 08:56:28 +00:00
Ulf Wendel
e56e60c3a0 Fixing test 2009-09-29 16:37:50 +00:00
Ulf Wendel
91315a9307 Fixing test 2009-09-28 10:42:36 +00:00
Ulf Wendel
8621a06eed Trying to respect time limit to please Andrey who must be using slooow hardware... 2009-09-25 13:21:44 +00:00
Andrey Hristov
3828ca158e 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
Ulf Wendel
bd69506171 Large package to check how compression handles package queues. 2009-09-25 10:56:17 +00:00
Ulf Wendel
a5e4c6f795 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
Ulf Wendel
c01b505a44 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
7b50b0794d Fixing test 2009-09-24 09:40:24 +00:00
Ulf Wendel
057a62fc52 Coverage for the OO variants of some functions 2009-09-24 08:19:56 +00:00
Ulf Wendel
75d415efbe Fixing test 2009-09-22 08:42:44 +00:00
Ulf Wendel
77f44b7926 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
5c67cdf62b 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
6ef632d129 Fixing test 2009-09-21 15:59:22 +00:00
Ulf Wendel
e94d475ad0 Fixing test 2009-09-21 15:24:47 +00:00
Ulf Wendel
e4f41b1f9f 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
9afd024715 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
47b209a3cd Fixing test 2009-09-21 11:54:15 +00:00
Ulf Wendel
dc1e7d6d6d 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
1a3b7774e6 Fixing mysqli_result_references_mysqlnd.php 2009-09-21 10:06:13 +00:00
Ulf Wendel
a0a8c5832f Fixing mysqli_get_client_stats.phpt. More testing for MYSQLI_INIT_COMMAND 2009-09-21 09:35:23 +00:00
Ulf Wendel
025e670f54 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
a77ee71cf0 Fixing test - the standard test table will not accept NULL values for column id 2009-09-21 08:36:14 +00:00
Andrey Hristov
967239727e MFH:Fix for bug#48909 Segmentation fault in mysqli_stmt_execute 2009-09-18 14:33:08 +00:00
Ulf Wendel
1388912ded better coverage for mysqli_info 2009-09-17 07:11:25 +00:00
Ulf Wendel
e6cf6693e6 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
20005db2a0 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
617b4e9bd1 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
c4c11fd38a 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
416ff5872d Andrey fixed the bug but the test was somewhat borked. Fixing test. 2009-09-09 18:31:00 +00:00
Ulf Wendel
f51e935e96 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
67c7a37d9b Fixed bug #49027 (mysqli_options() doesn't work when using mysqlnd) 2009-08-27 13:16:39 +00:00
Andrey Hristov
43d33e8a99 Fix for bug#46614 Extended MySQLi class gives incorrect empty() result 2009-08-27 12:41:14 +00:00
Jani Taskinen
10a7066591 - Fix test 2009-07-30 10:53:04 +00:00
Ulf Wendel
be7dd36297 MFH. Enabling test as requested by the skipif comment... it does pass when slightly modified. 2009-07-06 15:53:14 +00:00
Ulf Wendel
4786cfa4bf MFH. 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:45:19 +00:00
Ulf Wendel
556feffbd4 MFH. Adapting (old) tests to current PHP 6 semantics - s/unicode.semantics test/version_compare 2009-07-06 15:08:13 +00:00
Ulf Wendel
f611876b2e MFH. Adding --CLEAN-- sections to all ext/mysqli tests 2009-07-06 14:39:10 +00:00
Ulf Wendel
b90a412302 MFH. ... 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:14:39 +00:00
Ulf Wendel
26e9c79d4c MFH. Fixing borked test, again new run-tests.php has found it... Fails with HEAD, passes with 5.3 2009-07-03 08:25:25 +00:00
Ulf Wendel
5ac0398f73 MFH. Fixing borked test - thanks again new run-tests.php tool (and team). 2009-07-03 07:50:10 +00:00
Ulf Wendel
b5455f7a7d MFH - 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:52:58 +00:00
Ulf Wendel
1ad1a2a0af MFH - Fixing tests - messages/warnings can vary by version 2009-05-29 13:37:08 +00:00
Ulf Wendel
775cc0ca20 MFH - Updating test to reflect API changes. 2009-05-29 13:23:01 +00:00
Ulf Wendel
13d92e6957 MFH - Skip test for libmysql. The MySQL C-API does not support it, mysqlnd does... 2009-05-29 13:12:39 +00:00
Ulf Wendel
f3f1256332 MFH - 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:43 +00:00
Ulf Wendel
6252b5ca20 MFH - 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:55 +00:00
Ulf Wendel
3f17909a60 MFH - '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:26 +00:00
Ulf Wendel
2445a242ec MFH - 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:01:06 +00:00
Ulf Wendel
a027a64d73 MFH: Weaker test - libmysql/server error messages can differ by version 2009-05-29 10:34:23 +00:00
Ulf Wendel
396f5803e8 MFH - 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:49 +00:00
Ulf Wendel
19bdbc49c3 MFH - Skip when using libmysql. Likely a regression bug - http://bugs.mysql.com/bug.php?id=45184 2009-05-29 10:15:50 +00:00