Commit Graph

446 Commits

Author SHA1 Message Date
Nuno Lopes
fc86edab7d fix typo in tmp file path 2007-08-11 15:38:34 +00:00
Ulf Wendel
a166bd39ac I forgot those files when merging mysqlnd SVN and HEAD. Only required by
tests that test experimental features and are skipped by default that's why
I missed them.
2007-08-09 10:16:24 +00:00
Ulf Wendel
af91a4056a No need for an extra skip*.inc file, this check is done in just one place 2007-08-09 10:10:46 +00:00
Ulf Wendel
5846d6b84b More changes related to MYSQL_TEST_SKIP_CONNECT_FAILURE. 2007-08-09 10:01:20 +00:00
Ulf Wendel
112b742518 New tests (stubs?) for a few experimental (to be removed?) functions.
The tests will only be run if you set MYSQL_TEST_EXPERIMENTAL = 1.
2007-08-09 09:59:15 +00:00
Ulf Wendel
974935e6b8 Next set of files which now feature the new environment variable
MYSQL_TEST_SKIP_CONNECT_FAILURE which controls how connection problems
are handled: failure (MYSQL_TEST_SKIP_CONNECT_FAILURE = false, default)
or skip (MYSQL_TEST_SKIP_CONNECT_FAILURE = true)

Also, some minor tweaking of connection parameters in the tests.
2007-08-09 09:43:28 +00:00
Ulf Wendel
1855a57471 Introducing new environment variable:
MYSQL_TEST_SKIP_CONNECT_FAILURE = false

Every test that needs a working MySQL connection now includes
skipifconnectfailure.inc. If MYSQL_TEST_SKIP_CONNECT_FAILURE evaluates
to true skipifconnectfailure.inc tries to establish a database
connection. If no connection can be opened, the test will be skipped.
In case of MYSQL_TEST_SKIP_CONNECT_FAILURE = false (default) an no
connection, a test who cannot establish a connection will fail.

So, if you have a buggy configuration or a server that is sometimes
not available, you can now decide if you want the tests to ignore this
and skip the test or to fail (MYSQL_TEST_CONNECT_FAILURE = false, default).

Other, minor tweaks:
  042.phpt - whitespace
  067.phpt - parse error in SKIPIF section fixed
2007-08-09 08:41:12 +00:00
Jani Taskinen
6287087e70 - Align help texts and added note about embedded not being available when
the MySQL native driver is used.
2007-07-27 01:09:18 +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
Andrey Hristov
7bb46902f8 Alignment fixes for 64bit and fixing macroses 2007-07-25 12:42:00 +00:00
Antony Dovgal
f0cde2c03d namespace protection
GD uses the same variable, too.
2007-07-24 20:11:13 +00:00
Andrey Hristov
bb4b052c23 Don't use AC_CHECK_TYPES, as autoconf 2.13 is buggy, use an workaround. 2007-07-24 19:20:28 +00:00
Andrey Hristov
222174e23f Import of mysqlnd and ext/mysql + ext/mysqli patched to be built either
with libmysql or mysqld.

Use --with-mysql=mysqlnd --with-mysqli=mysqlnd to build with mysqlnd.
2007-07-24 16:13:26 +00:00
Andrey Hristov
cbba608856 MFB 2007-07-24 09:32:11 +00:00
Ulf Wendel
9b035b58f5 Damn, Pierre is clever.
[14:35] <_jani_> nixnutz_: why don't you just commit everything in one go..?
[14:35] <_jani_> this "spamming" is getting quite boring..
[14:36] <Pierre> 20€/commit :)
2007-07-23 12:38:41 +00:00
Ulf Wendel
512f62a5a9 Tests for mysqli_stmt_send_long_data() 2007-07-23 12:36:06 +00:00
Ulf Wendel
613947afc6 Tests which verify that you really cannot clone any of the mysqli
objects. Technically it might be possible to tweak ext/mysqli and make
the objects cloneable - tough, we haven't checked in depth.

So, if one is interested, raise a discussion.
2007-07-23 12:34:09 +00:00
Ulf Wendel
fe8c5d1243 Tests that check mysqli_fetch_field(), mysqli_fetch_field_direct() and
retrieve metadata
2007-07-23 12:28:56 +00:00
Ulf Wendel
a1c14bfffd Tests for mysqli_fetch_object() 2007-07-23 12:28:12 +00:00
Ulf Wendel
16008bc577 Another nice new function that comes with mysqlnd: return all rows of
a result set in one array. This is handy if want to fetch all results and
pass the data directly to a template engine, for example. In this case
you save a loop.

1) Currently:
  $all_rows = array();
  while ($row = mysqli_fetch_assoc($res))
   $all_rows[] = $row;

2) With mysqli_fetch_all:
  $all_rows = mysqli_fetch_all($res, MYSQL_ASSOC)

Note: if you need the loop for processing each row, try variant 1) for
performance reasons.
2007-07-23 12:27:39 +00:00
Ulf Wendel
ff87d3ec5b Adding tests for a few new functions that come with mysqlnd:
mysqli_stmt_get_result() - create mysqli_result set from stmt
  mysqli_get_cache_stats() - mysqlnd internal status/stats
  mysqli_get_client_stats() - mysqlnd internal status/stats/
2007-07-23 12:24:02 +00:00
Ulf Wendel
8e85715547 Playing with background processing: parent and child process fetching data
from the "same" result handle and checking with each other if the fetched
rows are the same or not. Inspired by a bug report. There seem to be really
people doing this...
2007-07-23 12:20:25 +00:00
Ulf Wendel
8d61b27811 Tests for mysqli_fetch_assoc(), mysqli_fetch_array(), mysqli_fetch_row() 2007-07-23 12:16:55 +00:00
Ulf Wendel
7432e6f873 Tests for mysqli_connect(), mysqli_real_connect(), mysqli_connect_errno(),
mysqli_connect_error()
2007-07-23 12:15:20 +00:00
Ulf Wendel
c41dc41f64 Tests that deal with mysqli_set_local_infile_handler() and mysqli_set_local_infile_default() 2007-07-23 12:13:15 +00:00
Ulf Wendel
937962ebe6 Adding new tests that check the interface of the classes exported by mysqli 2007-07-23 12:11:38 +00:00
Ulf Wendel
1884a16d01 Primarily whitespace/CS - synching with mysqlnd SVN repository 2007-07-23 12:04:19 +00:00
Ulf Wendel
a4cd950dc8 The last bunch of changes to the old 0*.phpt tests. Once final time a
verbose explanation of changes:

     - take connection parameter from connect.inc
     - use proper UEXPECTF
     - have 'print "done!"' or similar at the end to detect crashes
     - whitespace changes where needed
     - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0
     - understand return value checking as sometime that makes you type
       more when you write but makes you happy when you debug
2007-07-12 21:02:21 +00:00
Ulf Wendel
b6cc61737f Will this never end?
- connection parameter tweaking
   - a bit of whitespace here and there
   - use UEXPECTF if need be
2007-07-12 20:57:30 +00:00
Ulf Wendel
2a191bb06d As usual:
- connection parameter tweaking
 - a bit of whitespace here and there
 - use UEXPECTF if need be
2007-07-12 20:55:12 +00:00
Ulf Wendel
b0251ed6cc Connection parameter should be taken from connect.inc and used all in
mysqli_connect() and friends. Use UEXPECTF instead of crippled EXPECTF.
2007-07-12 20:53:05 +00:00
Ulf Wendel
1cef1c528d I forgot to mention: some will fail. In particular in unicode mode.
Next 10 in row to be tweaked:

     - take connection parameter from connect.inc
     - use proper UEXPECTF
     - have 'print "done!"' or similar at the end to detect crashes
     - whitespace changes where needed
     - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0
     - understand return value checking as sometime that makes you type
       more when you write but makes you happy when you debug
2007-07-12 20:49:29 +00:00
Ulf Wendel
202ba6c5fe Next 10 in row to be tweaked:
- take connection parameter from connect.inc
   - use proper UEXPECTF
   - have 'print "done!"' or similar at the end to detect crashes
   - whitespace changes where needed
   - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0
   - understand return value checking as sometime that makes you type
     more when you write but makes you happy when you debug
2007-07-12 20:42:48 +00:00
Ulf Wendel
472e0c78d1 The usual tweaking:
- take connection parameter from connect.inc
 - use proper UEXPECTF
 - have 'print "done!"' or similar at the end to detect crashes
 - whitespace changes where needed
 - take care of portability: PHP 5 vs. PHP 5, MySQL 4.1 - 6.0
2007-07-12 20:38:26 +00:00
Ulf Wendel
5ccab692dd Pretty much the same cosmetics and tweaking as before (proper UEXPECTF,
"done!" at the end to detect crashes, connection parameter tweaking, ...) -
plus: check return codes even if failures are unlikely.
2007-07-12 20:34:50 +00:00
Ulf Wendel
1d0b5d303b More typical changes:
1) Try to have portable SQL, don't create your own schema unless the test
   wants to test exactly this
2) Don't rely on default SQL sort orders
3) Use proper UEXPECTF. There have been a lot of tiny unicode issues when
   ext/mysqli has returned a binary string in unicode mode although a
   unicode string could be expected and vice versa
2007-07-12 20:31:18 +00:00
Ulf Wendel
984756c898 All the upcoming changes in the 0*.phpt files are pretty much the same. I'll
describe them only once in with a bit of detail.

1) Correct Whitespace (space vs. tab) if need be
2) Recall: you get the connection parameter from connect.inc, no DB name, no
   port no other connection parameter in any of the tests!
3) At the end of each test you find a "print 'done!'" or similar. This is
   most helpful to detect crashing/segfaulting tests with all run-tests.php
   versions.
2007-07-12 20:28:25 +00:00
Ulf Wendel
ed4021d857 Adding tests for mysqli_affected_rows() and mysqli_autocommit() 2007-07-12 20:20:57 +00:00
Ulf Wendel
b5595d57c5 Some of the upcoming new tests will use this little helper to create a
very simple MySQL table with some data in it to play with.
2007-07-12 20:10:23 +00:00
Ulf Wendel
e48a29bb4d Some tests intentionally fail connecting to the DB. Not being able to
connect is no reason to skip the test. Also, no test should have hard-wired
connection parameter in it. Connection parameters come from connect.inc
(see environment variables in connect.inc).
2007-07-12 20:07:05 +00:00
Ulf Wendel
6fff9f4534 Starting to merge the latest set of ext/mysqli tests from the mysqlnd
SVN repro into HEAD. Again, it might happen that I crash the set of tests
and don't mention one or the other change while merging. Blame me...

1) Note the new environment variables to control the test run
2) Variables $IS_MYSQLND and $MYSQLND_VERSION are for writing portable tests
3) sys_get_temp_dir function is for PHP5/PHP6 portability
2007-07-12 20:04:17 +00:00
foobar
f0f44a3652 - Fix some configure --help texts 2007-07-03 17:24:39 +00:00
Scott MacVicar
8842c24db7 MFB: Fixed bug #41350 (my_thread_global_end() error during request shutdown on Windows). 2007-06-25 20:19:30 +00:00
Stanislav Malyshev
7d0ad106b4 Fix INFILE LOCAL option handling with MySQL - now not allowed when open_basedir
is active
2007-06-18 21:59:05 +00:00
Antony Dovgal
814629c7d6 fix tests 2007-05-18 11:47:31 +00:00
Antony Dovgal
ccd97f3a21 fix test names 2007-05-07 17:23:53 +00:00
Antony Dovgal
8d9be0338b fix test names 2007-05-07 16:50:40 +00:00
Antony Dovgal
855446cd42 revert 2007-04-23 09:26:58 +00:00
Andrey Hristov
5af007daea The right place to edit 2007-04-19 09:50:10 +00:00
Antony Dovgal
3dd8663cb7 use default socket (removed by mistake?) 2007-04-14 10:42:41 +00:00