xref: /PHP-7.3/ext/mysqli/tests/074.phpt (revision b746e698)
1--TEST--
2mysqli_autocommit() tests
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10
11	require_once("connect.inc");
12
13	$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
14
15	var_dump($mysqli->autocommit(false));
16	$result = $mysqli->query("SELECT @@autocommit");
17	var_dump($result->fetch_row());
18
19	var_dump($mysqli->autocommit(true));
20	$result = $mysqli->query("SELECT @@autocommit");
21	var_dump($result->fetch_row());
22
23?>
24--EXPECT--
25bool(true)
26array(1) {
27  [0]=>
28  string(1) "0"
29}
30bool(true)
31array(1) {
32  [0]=>
33  string(1) "1"
34}
35