Lines Matching refs:link

9 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
12 if (!have_innodb($link))
13 die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
18 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
22 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
23 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
25 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB'))
26 … printf("[009] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
28 if (true !== ($tmp = mysqli_autocommit($link, true)))
32 if (true !== ($tmp = mysqli_begin_transaction($link)))
33 …printf("[011] Got %s - [%d] %s\n", var_dump($tmp, true), mysqli_errno($link), mysqli_error($link));
35 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
36 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
38 $tmp = mysqli_rollback($link);
43 $res = mysqli_query($link, "SELECT * FROM test");
49 if (mysqli_get_server_version($link) >= 50605) {
56 if (!mysqli_begin_transaction($link, $flag, sprintf("flag %d", $flag))) {
57 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
59 if (!mysqli_query($link, 'SELECT * FROM test') || !mysqli_rollback($link)) {
60 printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
65 if (mysqli_get_server_version($link) >= 50605) {
66 … if (!mysqli_begin_transaction($link, MYSQLI_TRANS_START_READ_ONLY, sprintf("flag %d", $flag))) {
67 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
69 if (mysqli_query($link, "INSERT INTO test(id) VALUES (2)")) {
70 printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
71 } else if (!mysqli_commit($link)) {
72 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
74 $res = mysqli_query($link, "SELECT id FROM test WHERE id = 2");
79 mysqli_begin_transaction($link, -1);
80 printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
85 if (mysqli_get_server_version($link) >= 50605) {
87 if (@!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "*/trick me?\n\0"))
88 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
91 if (@!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "az09"))
92 printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link));