Lines Matching refs:link

10     if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
15 if (!have_innodb($link))
16 die(sprintf("skip Needs InnoDB support, [%d] %s", $link->errno, $link->error));
22 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
27 if (!is_bool($tmp = mysqli_autocommit($link, true)))
30 if (!mysqli_query($link, 'SET AUTOCOMMIT = 0'))
31 printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
33 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
34 printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
41 if (true !== ($tmp = mysqli_autocommit($link, true)))
44 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
45 printf("[010] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
51 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
52 printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
54 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB')) {
55 … printf("[013] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
58 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
59 printf("[014] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
61 if (!mysqli_query($link, 'ROLLBACK'))
62 printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
64 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
65 printf("[016] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
69 $tmp['num'], mysqli_errno($link), mysqli_error($link));
73 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
74 printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
76 if (!mysqli_query($link, 'SET AUTOCOMMIT = 1'))
77 printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
79 if (!$res = mysqli_query($link, 'SELECT @@autocommit as auto_commit'))
80 printf("[020] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
86 if (true !== ($tmp = mysqli_autocommit($link, false)))
89 if (!mysqli_query($link, 'CREATE TABLE test(id INT) ENGINE = InnoDB')) {
90 … printf("[023] Cannot create test table, [%d] %s\n", mysqli_errno($link), mysqli_error($link));
93 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
94 printf("[024] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
96 if (!mysqli_query($link, 'ROLLBACK'))
97 printf("[025] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
99 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
100 printf("[026] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
106 if (!mysqli_query($link, 'INSERT INTO test(id) VALUES (1)'))
107 printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
109 if (!mysqli_query($link, 'COMMIT'))
110 printf("[029] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
112 if (!$res = mysqli_query($link, 'SELECT COUNT(*) AS num FROM test'))
113 printf("[030] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
117 $tmp['num'], mysqli_errno($link), mysqli_error($link));
120 if (!mysqli_query($link, 'DROP TABLE IF EXISTS test'))
121 printf("[032] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
123 mysqli_close($link);
126 mysqli_autocommit($link, false);