Commit Graph

142 Commits

Author SHA1 Message Date
Jani Taskinen
f8314496a2 Fix bug headers 2007-10-30 12:06:28 +00:00
Jani Taskinen
ecdea3117a fix test 2007-10-29 09:03:39 +00:00
Ulf Wendel
572648d585 Now HEAD should be fine: skip test (by default), if DB connect fails. 2007-10-12 12:40:04 +00:00
Ulf Wendel
7db84d5bcf Fixing test. 2007-10-12 11:52:27 +00:00
Ulf Wendel
534f770ae2 Trying to make them not fail but skip if they cannot connect to the DB. 2007-10-12 11:51:22 +00:00
Ulf Wendel
2027c85be2 Fixing tests. 2007-10-12 11:46:41 +00:00
Ulf Wendel
63103cdbc6 Should be the last commit for HEAD. Now HEAD and 5_3 should have the latest
set of ext/mysqli tests. On Linux 32bit we've about 10 tests failing.
Before the commit we had about 20 tests failing with HEAD.
2007-10-10 10:54:02 +00:00
Ulf Wendel
fc13e57d0f More changes = synching HEAD with 5_3 2007-10-10 10:51:34 +00:00
Ulf Wendel
2dd1b35a85 Commiting changes into HEAD = synching with 5_3 2007-10-10 10:49:00 +00:00
Ulf Wendel
2df3cea685 More updates to the ext/mysqli tests in HEAD = synching with 5_3 2007-10-10 10:46:06 +00:00
Ulf Wendel
eefce01f8d Adding new tests = making sure we're in sync with the 5_3 branch 2007-10-10 10:43:39 +00:00
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
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
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
foobar
825ed60f90 - Fixed test to skip when mysqld is not running 2007-03-25 01:15:41 +00:00
Stanislav Malyshev
b9fd0c848a add testcase 2007-03-09 18:37:32 +00:00