Lines Matching refs:db
11 function exec_and_count($offset, &$db, $sql, $exp, $suppress_warning = false) {
16 $ret = @$db->exec($sql);
18 $ret = $db->exec($sql);
23 $db->errorCode(), implode(' ', $db->errorInfo()));
29 $offset, $sql, $db->errorCode(), implode(' ', $db->errorInfo()));
37 $db = MySQLPDOTest::factory();
38 MySQLPDOTest::createTestTable($db, MySQLPDOTest::detect_transactional_mysql_engine($db));
43 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl');
44 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl2');
45 if (1 === @$db->exec('CREATE DATABASE pdo_exec_ddl')) {
47 exec_and_count(3, $db, 'ALTER DATABASE pdo_exec_ddl CHARACTER SET latin1', 1);
50 exec_and_count(4, $db, 'DROP TABLE IF EXISTS pdo_exec_ddl', 0);
51 exec_and_count(5, $db, 'DROP TABLE IF EXISTS pdo_exec_ddl2', 0);
52 if (0 === $db->exec('CREATE TABLE pdo_exec_ddl(id INT, col1 CHAR(2))')) {
53 exec_and_count(5, $db, 'CREATE INDEX idx1 ON pdo_exec_ddl(id)', 0);
54 exec_and_count(6, $db, 'DROP INDEX idx1 ON pdo_exec_ddl', 0);
55 exec_and_count(7, $db, 'ALTER TABLE pdo_exec_ddl DROP id', 0);
56 exec_and_count(8, $db, 'ALTER TABLE pdo_exec_ddl ADD id INT', 0);
57 exec_and_count(9, $db, 'ALTER TABLE pdo_exec_ddl ALTER id SET DEFAULT 1', 0);
58 exec_and_count(10, $db, 'RENAME TABLE pdo_exec_ddl TO pdo_exec_ddl2', 0);
76 $db->errorCode(), implode(' ', $db->errorInfo()));
83 $db = MySQLPDOTest::factory();
84 MySQLPDOTest::dropTestTable($db);
86 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl');
87 @$db->exec('DROP TABLE IF EXISTS pdo_exec_ddl2');
88 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl');
89 @$db->exec('DROP DATABASE IF EXISTS pdo_exec_ddl2');