Skip to content

Commit

Permalink
Using require[_once] instead of include. Adding logic to connect.inc …
Browse files Browse the repository at this point in the history
…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...
  • Loading branch information
Ulf Wendel committed Oct 19, 2009
1 parent 3766730 commit eb0e09f
Show file tree
Hide file tree
Showing 258 changed files with 366 additions and 394 deletions.
2 changes: 1 addition & 1 deletion ext/mysqli/tests/001.phpt
Expand Up @@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

$test = "";

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/002.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
Expand Down Expand Up @@ -48,7 +48,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/003.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);

Expand Down Expand Up @@ -74,7 +74,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/tests/004.phpt
Expand Up @@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/005.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -42,7 +42,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/006.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/007.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/008.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/009.phpt
Expand Up @@ -11,7 +11,7 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -80,7 +80,7 @@ mysqli fetch bigint values (ok to fail with 4.1.x)
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/010.phpt
Expand Up @@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -50,7 +50,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/011.phpt
Expand Up @@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -47,7 +47,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/012.phpt
Expand Up @@ -9,7 +9,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -46,7 +46,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/013.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -58,7 +58,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/014.phpt
Expand Up @@ -4,7 +4,7 @@ mysqli autocommit/commit/rollback
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
include "connect.inc";
require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) {
die("skip Cannot check for required InnoDB suppot");
Expand All @@ -21,7 +21,7 @@ mysqli autocommit/commit/rollback
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);

if (!mysqli_autocommit($link, TRUE))
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/015.phpt
Expand Up @@ -4,7 +4,7 @@ mysqli autocommit/commit/rollback with innodb
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
include "connect.inc";
require_once("connect.inc");
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'");
$row = mysqli_fetch_row($result);
Expand All @@ -17,7 +17,7 @@ mysqli autocommit/commit/rollback with innodb
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
if (!$link)
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/tests/016.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/tests/017.phpt
Expand Up @@ -8,7 +8,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqli/tests/018.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/019.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -57,7 +57,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/020.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -69,7 +69,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/021.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -40,7 +40,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/022.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -45,7 +45,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/023.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqli/tests/024.phpt
Expand Up @@ -7,7 +7,7 @@ require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
require_once("connect.inc");

/*** test mysqli_connect 127.0.0.1 ***/
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
Expand Down Expand Up @@ -54,7 +54,7 @@ require_once('skipifconnectfailure.inc');
?>
--CLEAN--
<?php
include "connect.inc";
require_once("connect.inc");
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());

Expand Down

0 comments on commit eb0e09f

Please sign in to comment.