aboutsummaryrefslogtreecommitdiff
path: root/mysql
diff options
context:
space:
mode:
Diffstat (limited to 'mysql')
-rw-r--r--mysql/native/driver.cxx20
-rw-r--r--mysql/template/makefile3
-rw-r--r--mysql/truncation/makefile2
-rw-r--r--mysql/types/makefile4
4 files changed, 19 insertions, 10 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 ();
}
diff --git a/mysql/template/makefile b/mysql/template/makefile
index 5964b0a..e51c862 100644
--- a/mysql/template/makefile
+++ b/mysql/template/makefile
@@ -35,7 +35,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
-$(gen) $(dist): export odb_options += --database mysql --generate-schema
+$(gen) $(dist): export odb_options += --database mysql --generate-schema \
+--table-prefix mysql_template_ #@@ CHANGE THIS
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/mysql/truncation/makefile b/mysql/truncation/makefile
index 9a4f9b1..def31ba 100644
--- a/mysql/truncation/makefile
+++ b/mysql/truncation/makefile
@@ -36,7 +36,7 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --generate-query \
---generate-schema
+--generate-schema --table-prefix mysql_truncation_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)
diff --git a/mysql/types/makefile b/mysql/types/makefile
index 2b17653..dab5489 100644
--- a/mysql/types/makefile
+++ b/mysql/types/makefile
@@ -36,8 +36,8 @@ gen := $(addprefix $(out_base)/,$(genf))
$(gen): $(odb)
$(gen): odb := $(odb)
$(gen) $(dist): export odb_options += --database mysql --generate-schema \
---generate-query --hxx-prologue '\#include "traits.hxx"'
-
+--generate-query --hxx-prologue '\#include "traits.hxx"' \
+--table-prefix mysql_types_
$(gen): cpp_options := -I$(src_base)
$(gen): $(common.l.cpp-options)