Lines Matching refs:link
10 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
13 if (!have_innodb($link))
14 die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
19 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
23 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
24 printf("[008] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
26 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB'))
27 … printf("[009] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
29 if (true !== ($tmp = mysqli_autocommit($link, true)))
33 if (true !== ($tmp = mysqli_begin_transaction($link)))
34 …printf("[011] Got %s - [%d] %s\n", var_dump($tmp, true), mysqli_errno($link), mysqli_error($link));
36 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
37 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
39 $tmp = mysqli_rollback($link);
44 $res = mysqli_query($link, "SELECT * FROM test");
50 if (mysqli_get_server_version($link) >= 50605) {
57 if (!mysqli_begin_transaction($link, $flag, sprintf("flag %d", $flag))) {
58 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
60 if (!mysqli_query($link, 'SELECT * FROM test') || !mysqli_rollback($link)) {
61 printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
66 if (mysqli_get_server_version($link) >= 50605) {
67 … if (!mysqli_begin_transaction($link, MYSQLI_TRANS_START_READ_ONLY, sprintf("flag %d", $flag))) {
68 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
70 if (mysqli_query($link, "INSERT INTO test(id) VALUES (2)")) {
71 printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
72 } else if (!mysqli_commit($link)) {
73 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
75 $res = mysqli_query($link, "SELECT id FROM test WHERE id = 2");
80 mysqli_begin_transaction($link, -1);
81 printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
86 if (mysqli_get_server_version($link) >= 50605) {
88 if (@!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "*/trick me?\n\0"))
89 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
92 if (@!$link->begin_transaction(MYSQLI_TRANS_START_READ_WRITE, "az09"))
93 printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link));