Lines Matching refs:link
20 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
22 return $link;
41 $link = get_connection();
43 mysqli_real_query($link, "DROP PROCEDURE IF EXISTS p");
44 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25), OUT ver_out VARCHAR(25)) B…
48 mysqli_close($link);
53 $link = get_connection();
55 if (true !== ($tmp = mysqli_query($link, $queries[$i], MYSQLI_ASYNC | MYSQLI_USE_RESULT)))
63 $links[mysqli_thread_id($link)] = array(
65 'link' => $link,
73 foreach ($links as $thread_id => $link) {
74 if (!$link['processed']) {
75 $poll_links[] = $link['link'];
76 $poll_errors[] = $link['link'];
77 $poll_reject[] = $link['link'];
94 foreach ($poll_links as $link) {
95 $thread_id = mysqli_thread_id($link);
98 if (is_object($res = mysqli_reap_async_query($link))) {
107 if (mysqli_errno($link) > 0) {
108 $saved_errors[$thread_id] = mysqli_errno($link);
109 printf("[003] '%s' caused %d\n", $links[$thread_id]['query'], mysqli_errno($link));
117 foreach ($links as $thread_id => $link) {
119 $saved_errors[$thread_id] != mysqli_errno($link['link'])) {
120 printf("[004] Error state not saved for query '%s', %d != %d\n", $link['query'],
121 $saved_errors[$thread_id], mysqli_errno($link['link']));
124 if (!$res = mysqli_query($link['link'], 'SELECT * FROM test WHERE id = 100'))
132 if ($res = mysqli_query($link['link'], "SELECT * FROM test WHERE id = 100")) {
138 if ($have_proc && ($res = mysqli_query($link['link'], "SELECT @version as _version"))) {
146 foreach ($links as $link)
147 mysqli_close($link['link']);
149 $link = get_connection();
150 if (!mysqli_query($link, 'SELECT 1', MYSQLI_ASYNC))
151 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
153 if (!mysqli_query($link, 'SELECT 1', MYSQLI_ASYNC))
154 printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
156 mysqli_close($link);
163 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
166 if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
167 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
169 if (!mysqli_query($link, "DROP TABLE IF EXISTS bogus"))
170 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
172 mysqli_query($link, "DROP PROCEDURE IF EXISTS p");
174 mysqli_close($link);