Lines Matching refs:link
9 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
14 if (!have_innodb($link))
15 die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
21 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
26 if (!is_bool($tmp = mysqli_autocommit($link, true)))
29 if (!mysqli_query($link, 'SET AUTOCOMMIT = 0'))
30 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
32 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
33 printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
40 if (true !== ($tmp = mysqli_autocommit($link, true)))
43 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
44 printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
50 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
51 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
53 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB')) {
54 … printf("[013] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
57 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
58 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
60 if (!mysqli_query($link, 'ROLLBACK'))
61 printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
63 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
64 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
68 $tmp['num'], mysqli_errno($link), mysqli_error($link));
72 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
73 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
75 if (!mysqli_query($link, 'SET AUTOCOMMIT = 1'))
76 printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
78 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
79 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
85 if (true !== ($tmp = mysqli_autocommit($link, false)))
88 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB')) {
89 … printf("[023] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
92 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
93 printf("[024] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
95 if (!mysqli_query($link, 'ROLLBACK'))
96 printf("[025] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
98 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
99 printf("[026] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
105 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
106 printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
108 if (!mysqli_query($link, 'COMMIT'))
109 printf("[029] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
111 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
112 printf("[030] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
116 $tmp['num'], mysqli_errno($link), mysqli_error($link));
119 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
120 printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
122 mysqli_close($link);
125 mysqli_autocommit($link, false);