Lines Matching refs:db
12 function exec_and_count($offset, &$db, $sql, $exp, $suppress_warning = false) {
15 $ret = @$db->exec($sql);
17 $ret = $db->exec($sql);
22 $db->errorCode(), implode(' ', $db->errorInfo()));
28 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo()));
36 $db = MySQLPDOTest::factory();
44 if (1 === @$db->exec("CREATE DATABASE {$db_name}")) {
46 exec_and_count(3, $db, "ALTER DATABASE {$db_name} CHARACTER SET latin1", 1);
49 if (0 === $db->exec("CREATE TABLE {$table} (id INT, col1 CHAR(2))")) {
50 exec_and_count(5, $db, "CREATE INDEX idx1 ON {$table} (id)", 0);
51 exec_and_count(6, $db, "DROP INDEX idx1 ON {$table}", 0);
52 exec_and_count(7, $db, "ALTER TABLE {$table} DROP id", 0);
53 exec_and_count(8, $db, "ALTER TABLE {$table} ADD id INT", 0);
54 exec_and_count(9, $db, "ALTER TABLE {$table} ALTER id SET DEFAULT 1", 0);
55 exec_and_count(10, $db, "RENAME TABLE {$table} TO {$table2}", 0);
73 $db->errorCode(), implode(' ', $db->errorInfo()));
81 $db = MySQLPDOTest::factory();
82 $db->exec('DROP TABLE IF EXISTS pdo_mysql_exec_ddl');
83 $db->exec('DROP TABLE IF EXISTS pdo_mysql_exec_ddl_2');
84 $db->exec('DROP DATABASE IF EXISTS pdo_mysql_exec_ddl_db');
85 $db->exec('DROP DATABASE IF EXISTS pdo_mysql_exec_ddl_db_2');