diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
commit | 8f1428d29ef91d74b4d272af171675f2971eb15b (patch) | |
tree | a1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /ext/mysqli/tests/015.phpt | |
parent | c6e4182351e0173fe58de141e143aac2eacf5efe (diff) | |
download | php-8f1428d29ef91d74b4d272af171675f2971eb15b.tar.gz |
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'ext/mysqli/tests/015.phpt')
-rw-r--r-- | ext/mysqli/tests/015.phpt | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt index c4f693ff1..c671ad68f 100644 --- a/ext/mysqli/tests/015.phpt +++ b/ext/mysqli/tests/015.phpt @@ -4,17 +4,13 @@ mysqli autocommit/commit/rollback with innodb <?php require_once('skipif.inc'); require_once('skipifconnectfailure.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); - mysqli_free_result($result); - mysqli_close($link); - if ($row[1] == "DISABLED" || $row[1] == "NO") { - printf ("skip innodb support is not installed or enabled."); - exit; - } + require_once('connect.inc'); + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + + if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php |