Lines Matching refs:link

10 	if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
15 if (!have_innodb($link))
16 die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error));
23 $link = NULL;
28 if (!is_null($tmp = @mysqli_autocommit($link)))
31 if (!is_null($tmp = @mysqli_autocommit($link, $link, $link)))
34 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
39 if (!is_bool($tmp = mysqli_autocommit($link, true)))
42 if (!mysqli_query($link, 'SET AUTOCOMMIT = 0'))
43 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
45 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
46 printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
53 if (true !== ($tmp = mysqli_autocommit($link, true)))
56 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
57 printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
63 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
64 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
66 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB')) {
67 printf("[013] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
70 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
71 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
73 if (!mysqli_query($link, 'ROLLBACK'))
74 printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
76 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
77 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
81 $tmp['num'], mysqli_errno($link), mysqli_error($link));
85 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
86 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
88 if (!mysqli_query($link, 'SET AUTOCOMMIT = 1'))
89 printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
91 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
92 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
98 if (true !== ($tmp = mysqli_autocommit($link, false)))
101 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB')) {
102 printf("[023] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
105 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
106 printf("[024] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
108 if (!mysqli_query($link, 'ROLLBACK'))
109 printf("[025] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
111 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
112 printf("[026] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
118 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
119 printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
121 if (!mysqli_query($link, 'COMMIT'))
122 printf("[029] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
124 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
125 printf("[030] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
129 $tmp['num'], mysqli_errno($link), mysqli_error($link));
132 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
133 printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
135 mysqli_close($link);
137 if (NULL !== ($tmp = @mysqli_autocommit($link, false)))