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));
113 mysqli_errno($link), mysqli_error($link));
117 printf("[010] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
120 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
121 printf("[016] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
123 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25), OUT ver_out VARCHAR(25)) B…
125 if (!mysqli_query($link, "CALL p('myversion', @version)"))
126 printf("[018] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
128 if (!mysqli_query($link, "SET @version = 'unknown'"))
129 … printf("[019] Cannot reset user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
131 if (!mysqli_query($link, "CALL p('myversion', @version)"))
132 printf("[020] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
134 if (!$res = mysqli_query($link, 'SELECT @version as _vers'))
135 … printf("[021] Cannot fetch user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
140 mysqli_errno($link), mysqli_error($link));
144 printf("[017] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
147 mysqli_close($link);
153 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
156 if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
157 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
159 @mysqli_query($link, "DROP PROCEDURE IS EXISTS p");
161 mysqli_close($link);