Lines Matching refs:link

9 if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
14 if ($link->server_version < 50500)
15 die(sprintf("SKIP Needs MySQL 5.5 or newer, found MySQL %s\n", $link->server_info));
17 if (!$res = $link->query("SHOW PLUGINS"))
18 die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
34 if (!$res = mysqli_query($link, 'SHOW GLOBAL VARIABLES LIKE "pam_use_cleartext_plugin"'))
36 mysqli_errno($link), mysqli_error($link)));
75 mysqli_query($link, 'DROP USER pamtest');
76 mysqli_query($link, 'DROP USER pamtest@localhost');
78 if (!mysqli_query($link, "CREATE USER pamtest@'%' IDENTIFIED WITH $have_pam") ||
79 !mysqli_query($link, "CREATE USER pamtest@'localhost' IDENTIFIED WITH $have_pam")) {
80 printf("skip Cannot create second DB user [%d] %s", mysqli_errno($link), mysqli_error($link));
81 mysqli_close($link);
85 if (!$link->query("CREATE TABLE test (id INT)") || !$link->query("INSERT INTO test(id) VALUES (1)"))
86 die(sprintf("SKIP [%d] %s\n", $link->errno, $link->error));
90 if (!mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pamtest@'%%'", $db)) ||
91 !mysqli_query($link, sprintf("GRANT SELECT ON TABLE %s.test TO pamtest@'localhost'", $db))) {
92 printf("skip Cannot grant SELECT to user [%d] %s", mysqli_errno($link), mysqli_error($link));
93 mysqli_close($link);
104 if (!$link = my_mysqli_connect($host, 'pamtest', 'pamtest', $db, $port, $socket)) {
109 if (!$res = $link->query("SELECT id FROM test WHERE id = 1"))
110 printf("[002] [%d] %s\n", $link->errno, $link->error);
113 printf("[003] [%d] %s\n", $link->errno, $link->error);
121 $link->close();
129 mysqli_query($link, 'DROP USER pamtest');
130 mysqli_query($link, 'DROP USER pamtest@localhost');