Lines Matching refs:link
8 if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
12 if (!have_innodb($link)) {
13 die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
20 $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
21 if (!$link)
24 if (!mysqli_select_db($link, $db))
26 mysqli_errno($link), mysqli_error($link));
28 if (!mysqli_autocommit($link, TRUE))
30 mysqli_errno($link), mysqli_error($link));
32 if (!mysqli_query($link,"DROP TABLE IF EXISTS test") ||
33 !mysqli_query($link,"CREATE TABLE test(a int, b varchar(10)) Engine=InnoDB") ||
34 !mysqli_query($link, "INSERT INTO test VALUES (1, 'foobar')"))
36 mysqli_errno($link), mysqli_error($link));
38 if (!mysqli_autocommit($link, FALSE))
40 mysqli_errno($link), mysqli_error($link));
42 if (!mysqli_query($link, "DELETE FROM test") ||
43 !mysqli_query($link, "INSERT INTO test VALUES (2, 'egon')"))
45 mysqli_errno($link), mysqli_error($link));
47 if (!mysqli_rollback($link))
49 mysqli_errno($link), mysqli_error($link));
51 $result = mysqli_query($link, "SELECT SQL_NO_CACHE * FROM test");
53 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
59 if (!mysqli_query($link, "DELETE FROM test") ||
60 !mysqli_query($link, "INSERT INTO test VALUES (2, 'egon')"))
62 mysqli_errno($link), mysqli_error($link));
64 mysqli_commit($link);
66 $result = mysqli_query($link, "SELECT * FROM test");
68 printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
74 mysqli_query($link, "DROP TABLE IF EXISTS test");
75 mysqli_close($link);