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)));
20 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
21 printf("[001] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
23 …if (mysqli_query($link, 'CREATE PROCEDURE p() READS SQL DATA BEGIN SELECT id, label FROM test ORDE…
26 if (mysqli_multi_query($link, 'CALL p()')) {
28 if ($res = mysqli_use_result($link)) {
33 } while (mysqli_more_results($link) && mysqli_next_result($link));
36 printf("[003] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
39 if (mysqli_multi_query($link, 'CALL p()')) {
41 if ($res = mysqli_store_result($link)) {
46 } while (mysqli_more_results($link) && mysqli_next_result($link));
49 printf("[004] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
52 if (mysqli_multi_query($link, 'CALL p()')) {
54 if ($res = mysqli_store_result($link)) {
61 } while (mysqli_more_results($link) && mysqli_next_result($link));
64 printf("[005] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
68 printf("[002] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
71 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
72 printf("[006] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
74 …if (mysqli_query($link, 'CREATE PROCEDURE p() READS SQL DATA BEGIN SELECT id, label FROM test ORDE…
77 if (mysqli_multi_query($link, 'CALL p()')) {
79 if ($res = mysqli_store_result($link)) {
84 } while (mysqli_more_results($link) && mysqli_next_result($link));
87 printf("[008] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
91 printf("[007] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
94 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
95 printf("[009] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
97 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(OUT ver_param VARCHAR(25)) BEGIN SELECT VERSION()…
99 if (!mysqli_query($link, 'CALL p(@version)'))
100 printf("[011] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
102 if (!mysqli_query($link, "SET @version = 'unknown'"))
103 printf("[012] Cannot reset user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
105 if (!mysqli_query($link, 'CALL p(@version)'))
106 printf("[013] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
108 if (!$res = mysqli_query($link, 'SELECT @version as _vers'))
109 printf("[014] Cannot fetch user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
115 mysqli_errno($link), mysqli_error($link));
119 printf("[010] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
122 if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p'))
123 printf("[016] [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
125 …if (mysqli_real_query($link, 'CREATE PROCEDURE p(IN ver_in VARCHAR(25), OUT ver_out VARCHAR(25)) B…
127 if (!mysqli_query($link, "CALL p('myversion', @version)"))
128 printf("[018] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
130 if (!mysqli_query($link, "SET @version = 'unknown'"))
131 printf("[019] Cannot reset user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
133 if (!mysqli_query($link, "CALL p('myversion', @version)"))
134 printf("[020] Cannot call SP, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
136 if (!$res = mysqli_query($link, 'SELECT @version as _vers'))
137 printf("[021] Cannot fetch user variable, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
143 mysqli_errno($link), mysqli_error($link));
147 printf("[017] Cannot create SP, [%d] %s.\n", mysqli_errno($link), mysqli_error($link));
150 mysqli_close($link);
156 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
159 if (!mysqli_query($link, "DROP TABLE IF EXISTS test"))
160 printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
162 @mysqli_query($link, "DROP PROCEDURE IS EXISTS p");
164 mysqli_close($link);