diff options
Diffstat (limited to 'mysql/native/driver.cxx')
-rw-r--r-- | mysql/native/driver.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mysql/native/driver.cxx b/mysql/native/driver.cxx index 437a160..9472cf3 100644 --- a/mysql/native/driver.cxx +++ b/mysql/native/driver.cxx @@ -30,8 +30,10 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - db->execute ("DROP TABLE IF EXISTS test"); - db->execute ("CREATE TABLE test (n INT PRIMARY KEY) ENGINE=InnoDB"); + db->execute ("DROP TABLE IF EXISTS mysql_native_test"); + + db->execute ("CREATE TABLE mysql_native_test (n INT PRIMARY KEY) " + "ENGINE=InnoDB"); t.commit (); } @@ -41,8 +43,11 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - assert (db->execute ("INSERT INTO test (n) VALUES (1)") == 1); - assert (db->execute ("INSERT INTO test (n) VALUES (2)") == 1); + assert ( + db->execute ("INSERT INTO mysql_native_test (n) VALUES (1)") == 1); + + assert ( + db->execute ("INSERT INTO mysql_native_test (n) VALUES (2)") == 1); t.commit (); } @@ -52,8 +57,11 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - assert (db->execute ("SELECT n FROM test WHERE n < 3") == 2); - assert (db->execute ("SELECT n FROM test WHERE n > 3") == 0); + assert ( + db->execute ("SELECT n FROM mysql_native_test WHERE n < 3") == 2); + + assert ( + db->execute ("SELECT n FROM mysql_native_test WHERE n > 3") == 0); t.commit (); } |