Lines Matching refs:link
8 if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
11 if (mysqli_get_server_version($link) <= 50000) {
12 die(sprintf('skip Needs MySQL 5.0+, found version %d.', mysqli_get_server_version($link)));
19 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
20 printf("[001] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
22 …if (mysqli_query($link, 'CREATE PROCEDURE p() READS SQL DATA BEGIN SELECT id, label FROM test ORDE…
25 if (mysqli_multi_query($link, 'CALL p()')) {
27 if ($res = mysqli_use_result($link)) {
32 } while (mysqli_more_results($link) && mysqli_next_result($link));
35 printf("[003] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
38 if (mysqli_multi_query($link, 'CALL p()')) {
40 if ($res = mysqli_store_result($link)) {
45 } while (mysqli_more_results($link) && mysqli_next_result($link));
48 printf("[004] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
51 if (mysqli_multi_query($link, 'CALL p()')) {
53 if ($res = mysqli_store_result($link)) {
60 } while (mysqli_more_results($link) && mysqli_next_result($link));
63 printf("[005] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
67 printf("[002] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
70 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
71 printf("[006] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
73 …if (mysqli_query($link, 'CREATE PROCEDURE p() READS SQL DATA BEGIN SELECT id, label FROM test ORDE…
76 if (mysqli_multi_query($link, 'CALL p()')) {
78 if ($res = mysqli_store_result($link)) {
83 } while (mysqli_more_results($link) && mysqli_next_result($link));
86 printf("[008] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
90 printf("[007] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
93 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
94 printf("[009] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
96 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION()…
98 if (!mysqli_query($link, 'CALL p(@version)'))
99 printf("[011] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
101 if (!mysqli_query($link, "SET @version = 'unknown'"))
102 … printf("[012] Cannot reset user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
104 if (!mysqli_query($link, 'CALL p(@version)'))
105 printf("[013] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
107 if (!$res = mysqli_query($link, 'SELECT @version as _vers'))
108 … printf("[014] Cannot fetch user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
114 mysqli_errno($link), mysqli_error($link));
118 printf("[010] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
121 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
122 printf("[016] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
124 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25), OUT ver_out VARCHAR(25)) B…
126 if (!mysqli_query($link, "CALL p('myversion', @version)"))
127 printf("[018] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
129 if (!mysqli_query($link, "SET @version = 'unknown'"))
130 … printf("[019] Cannot reset user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
132 if (!mysqli_query($link, "CALL p('myversion', @version)"))
133 printf("[020] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
135 if (!$res = mysqli_query($link, 'SELECT @version as _vers'))
136 … printf("[021] Cannot fetch user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
142 mysqli_errno($link), mysqli_error($link));
146 printf("[017] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
149 mysqli_close($link);
155 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
158 if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
159 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
161 @mysqli_query($link, "DROP PROCEDURE IS EXISTS p");
163 mysqli_close($link);