Lines Matching refs:link
16 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
18 return $link;
37 $link = get_connection();
39 mysqli_real_query($link, "DROP PROCEDURE IF EXISTS p");
40 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25), OUT ver_out VARCHAR(25)) B…
44 mysqli_close($link);
49 $link = get_connection();
51 if (true !== ($tmp = mysqli_query($link, $queries[$i], MYSQLI_ASYNC | MYSQLI_USE_RESULT)))
59 $links[mysqli_thread_id($link)] = array(
61 'link' => $link,
69 foreach ($links as $thread_id => $link) {
70 if (!$link['processed']) {
71 $poll_links[] = $link['link'];
72 $poll_errors[] = $link['link'];
73 $poll_reject[] = $link['link'];
90 foreach ($poll_links as $link) {
91 $thread_id = mysqli_thread_id($link);
94 if (is_object($res = mysqli_reap_async_query($link))) {
103 if (mysqli_errno($link) > 0) {
104 $saved_errors[$thread_id] = mysqli_errno($link);
112 foreach ($links as $thread_id => $link) {
116 if ($saved_errors[$thread_id] != mysqli_errno($link['link'])) {
117 printf("[004] Error state not saved for query '%s', %d != %d\n", $link['query'],
118 $saved_errors[$thread_id], mysqli_errno($link['link']));
122 if (!$res = mysqli_query($link['link'], 'SELECT * FROM test WHERE id = 100'))
130 if ($res = mysqli_query($link['link'], "SELECT * FROM test WHERE id = 100")) {
136 if ($have_proc && ($res = mysqli_query($link['link'], "SELECT @version as _version"))) {
144 foreach ($links as $link)
145 mysqli_close($link['link']);
147 $link = get_connection();
148 if (!mysqli_query($link, 'SELECT 1', MYSQLI_ASYNC))
149 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
151 if (!mysqli_query($link, 'SELECT 1', MYSQLI_ASYNC))
152 printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
154 mysqli_close($link);
161 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
164 if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
165 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
167 if (!mysqli_query($link, "DROP TABLE IF EXISTS bogus"))
168 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
170 mysqli_query($link, "DROP PROCEDURE IF EXISTS p");
172 mysqli_close($link);