Fix tests

This commit is contained in:
Hannes Magnusson 2006-12-12 08:09:40 +00:00
parent a74c36a335
commit 0028eccadd
3 changed files with 8 additions and 3 deletions

View File

@ -12,8 +12,10 @@ local infile handler
return(strlen($buffer));
}
/*** test mysqli_connect 127.0.0.1 ***/
$link = mysqli_connect($host, $user, $passwd, "test");
/*** test mysqli_real_connect 127.0.0.1 ***/
$link = mysqli_init();
mysqli_options($link, MYSQLI_OPT_LOCAL_INFILE, 1);
mysqli_real_connect($link, $host, $user, $passwd, "test");
/* create temporary file */
$filename = dirname(__FILE__) . "061.csv";

View File

@ -6,6 +6,9 @@ require_once('skipif.inc');
if (!function_exists('mysqli_set_charset')) {
die('skip mysqli_set_charset() not available');
}
if (!mysqli_set_charset($con, "gbh") && mysqli_errno($con) == 2019) {
die('skip mysql compiled without gbh charset support');
}
?>
--FILE--
<?php

View File

@ -4,7 +4,7 @@ if (!extension_loaded('mysqli')){
}
include "connect.inc";
$driver = new mysqli_driver();
if (!$driver->embedded && !@mysqli_connect($host, $user, $passwd, "", 3306)) {
if (!$driver->embedded && !($con = @mysqli_connect($host, $user, $passwd, "", 3306))) {
die('skip could not connect to MySQL');
}
?>