From fc3fb39c90ab7fe5fccbe3f3bc0eb2645157bb96 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 13 Dec 2023 21:57:53 +0300 Subject: Switch to build2 --- mysql/Makefile.am | 5 - mysql/custom/buildfile | 37 +++ mysql/custom/driver.cxx | 14 +- mysql/custom/makefile | 110 -------- mysql/custom/query.hxx | 4 +- mysql/custom/test.hxx | 4 +- mysql/custom/test.std | 0 mysql/custom/testscript | 11 + mysql/custom/traits.hxx | 4 +- mysql/database/buildfile | 11 + mysql/database/driver.cxx | 3 + mysql/database/makefile | 83 ------ mysql/database/test.std | 0 mysql/database/testscript | 6 + mysql/index/buildfile | 34 +++ mysql/index/driver.cxx | 10 +- mysql/index/makefile | 107 -------- mysql/index/test.std | 0 mysql/index/testscript | 11 + mysql/makefile | 41 --- mysql/native/buildfile | 16 ++ mysql/native/driver.cxx | 10 +- mysql/native/makefile | 83 ------ mysql/native/test.std | 0 mysql/native/testscript | 9 + mysql/template/Makefile.am | 34 --- mysql/template/driver.cxx | 40 --- mysql/template/makefile | 107 -------- mysql/template/template-vc10.vcxproj | 180 ------------- mysql/template/template-vc10.vcxproj.filters | 25 -- mysql/template/template-vc11.vcxproj | 184 -------------- mysql/template/template-vc11.vcxproj.filters | 25 -- mysql/template/template-vc12.vcxproj | 188 -------------- mysql/template/template-vc12.vcxproj.filters | 25 -- mysql/template/template-vc8.vcproj | 354 -------------------------- mysql/template/template-vc9.vcproj | 361 --------------------------- mysql/template/test.hxx | 25 -- mysql/template/test.std | 0 mysql/test.bat | 68 ----- mysql/truncation/buildfile | 35 +++ mysql/truncation/driver.cxx | 20 +- mysql/truncation/makefile | 107 -------- mysql/truncation/test.std | 0 mysql/truncation/testscript | 11 + mysql/types/buildfile | 36 +++ mysql/types/driver.cxx | 18 +- mysql/types/makefile | 109 -------- mysql/types/test.hxx | 4 +- mysql/types/test.std | 0 mysql/types/testscript | 11 + 50 files changed, 280 insertions(+), 2300 deletions(-) delete mode 100644 mysql/Makefile.am create mode 100644 mysql/custom/buildfile delete mode 100644 mysql/custom/makefile delete mode 100644 mysql/custom/test.std create mode 100644 mysql/custom/testscript create mode 100644 mysql/database/buildfile delete mode 100644 mysql/database/makefile delete mode 100644 mysql/database/test.std create mode 100644 mysql/database/testscript create mode 100644 mysql/index/buildfile delete mode 100644 mysql/index/makefile delete mode 100644 mysql/index/test.std create mode 100644 mysql/index/testscript delete mode 100644 mysql/makefile create mode 100644 mysql/native/buildfile delete mode 100644 mysql/native/makefile delete mode 100644 mysql/native/test.std create mode 100644 mysql/native/testscript delete mode 100644 mysql/template/Makefile.am delete mode 100644 mysql/template/driver.cxx delete mode 100644 mysql/template/makefile delete mode 100644 mysql/template/template-vc10.vcxproj delete mode 100644 mysql/template/template-vc10.vcxproj.filters delete mode 100644 mysql/template/template-vc11.vcxproj delete mode 100644 mysql/template/template-vc11.vcxproj.filters delete mode 100644 mysql/template/template-vc12.vcxproj delete mode 100644 mysql/template/template-vc12.vcxproj.filters delete mode 100644 mysql/template/template-vc8.vcproj delete mode 100644 mysql/template/template-vc9.vcproj delete mode 100644 mysql/template/test.hxx delete mode 100644 mysql/template/test.std delete mode 100644 mysql/test.bat create mode 100644 mysql/truncation/buildfile delete mode 100644 mysql/truncation/makefile delete mode 100644 mysql/truncation/test.std create mode 100644 mysql/truncation/testscript create mode 100644 mysql/types/buildfile delete mode 100644 mysql/types/makefile delete mode 100644 mysql/types/test.std create mode 100644 mysql/types/testscript (limited to 'mysql') diff --git a/mysql/Makefile.am b/mysql/Makefile.am deleted file mode 100644 index 05ffc60..0000000 --- a/mysql/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -# file : mysql/Makefile.am -# license : GNU GPL v2; see accompanying LICENSE file - -SUBDIRS = __path__(dirs) -EXTRA_DIST = __file__(extra_dist) diff --git a/mysql/custom/buildfile b/mysql/custom/buildfile new file mode 100644 index 0000000..4934e7c --- /dev/null +++ b/mysql/custom/buildfile @@ -0,0 +1,37 @@ +# file : mysql/custom/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($mysql && !$multi || $build.meta_operation == 'dist') \ +"mysql should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-mysql%lib{odb-mysql} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix mysql_custom_ \ + --generate-schema \ + --default-database common \ + --generate-query \ + --hxx-prologue '#include "traits.hxx"' \ + --hxx-prologue '#include "query.hxx"' + +cxx.poptions =+ "-I$out_base" "-I$src_base" + +# Testscript's run-time prerequisites. +# +exe{driver}: ../../alias{mysql-client}: include = adhoc diff --git a/mysql/custom/driver.cxx b/mysql/custom/driver.cxx index e9cc7d9..526dbdc 100644 --- a/mysql/custom/driver.cxx +++ b/mysql/custom/driver.cxx @@ -4,18 +4,20 @@ // Test custom database type mapping in MySQL. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; namespace mysql = odb::mysql; using namespace mysql; @@ -25,7 +27,7 @@ main (int argc, char* argv[]) { try { - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); object o (1); o.p = point (1.1111, 2222222222.2); @@ -48,7 +50,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr o1 (db->load (1)); + unique_ptr o1 (db->load (1)); t.commit (); assert (o == *o1); @@ -101,7 +103,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr o1 (db->load (1)); + unique_ptr o1 (db->load (1)); t.commit (); assert (o == *o1); diff --git a/mysql/custom/makefile b/mysql/custom/makefile deleted file mode 100644 index 575cfa6..0000000 --- a/mysql/custom/makefile +++ /dev/null @@ -1,110 +0,0 @@ -# file : mysql/custom/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database mysql --default-database \ -common --generate-schema --generate-query --hxx-prologue \ -'\#include "traits.hxx"' --hxx-prologue '\#include "query.hxx"' \ ---table-prefix mysql_custom_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): export extra_headers := traits.hxx query.hxx -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/custom/query.hxx b/mysql/custom/query.hxx index aa0c9ed..2fa8f73 100644 --- a/mysql/custom/query.hxx +++ b/mysql/custom/query.hxx @@ -128,8 +128,8 @@ namespace odb public: query_column (const char* table, const char* column, const char* conv) : table_ (table), column_ (column), conversion_ (conv), - x_table_ ("X(" + std::string (table)), // @@ Not very clean. - y_table_ ("Y(" + std::string (table)), + x_table_ ("ST_X(" + std::string (table)), // @@ Not very clean. + y_table_ ("ST_Y(" + std::string (table)), s_column_ (std::string (column) + ")"), // X & Y column suffix. x (x_table_.c_str (), s_column_.c_str (), 0), y (y_table_.c_str (), s_column_.c_str (), 0) diff --git a/mysql/custom/test.hxx b/mysql/custom/test.hxx index b6c2c86..82cc59d 100644 --- a/mysql/custom/test.hxx +++ b/mysql/custom/test.hxx @@ -13,8 +13,8 @@ // #pragma db map type("GEOMETRY") \ as("VARCHAR(256)") \ - to("GeomFromText((?))") \ - from("AsText((?))") + to("ST_GeomFromText((?))") \ + from("ST_AsText((?))") #pragma db value type("GEOMETRY") struct point diff --git a/mysql/custom/test.std b/mysql/custom/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/custom/testscript b/mysql/custom/testscript new file mode 100644 index 0000000..9bc8839 --- /dev/null +++ b/mysql/custom/testscript @@ -0,0 +1,11 @@ +# file : mysql/custom/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../mysql.testscript + ++$create_schema + +: basics +: +$* diff --git a/mysql/custom/traits.hxx b/mysql/custom/traits.hxx index 9c9ec93..5386d86 100644 --- a/mysql/custom/traits.hxx +++ b/mysql/custom/traits.hxx @@ -16,7 +16,7 @@ namespace odb { namespace mysql { - template <> + template <> class value_traits { public: @@ -79,7 +79,7 @@ namespace odb struct conversion { - static const char* to () {return "GeomFromText((?))";} + static const char* to () {return "ST_GeomFromText((?))";} }; }; } diff --git a/mysql/database/buildfile b/mysql/database/buildfile new file mode 100644 index 0000000..304034e --- /dev/null +++ b/mysql/database/buildfile @@ -0,0 +1,11 @@ +# file : mysql/database/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($mysql && !$multi || $build.meta_operation == 'dist') \ +"mysql should be configured via config.odb_tests.database variable as a single database" + +import libs = libodb-mysql%lib{odb-mysql} + +exe{driver}: {hxx cxx}{*} $libs testscript + +cxx.poptions =+ "-I$out_base" "-I$src_base" diff --git a/mysql/database/driver.cxx b/mysql/database/driver.cxx index aebb251..525ee87 100644 --- a/mysql/database/driver.cxx +++ b/mysql/database/driver.cxx @@ -8,6 +8,9 @@ #include +#undef NDEBUG +#include + using std::string; namespace mysql = odb::mysql; using namespace mysql; diff --git a/mysql/database/makefile b/mysql/database/makefile deleted file mode 100644 index 746fc9e..0000000 --- a/mysql/database/makefile +++ /dev/null @@ -1,83 +0,0 @@ -# file : mysql/database/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/database/test.std b/mysql/database/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/database/testscript b/mysql/database/testscript new file mode 100644 index 0000000..c2ff256 --- /dev/null +++ b/mysql/database/testscript @@ -0,0 +1,6 @@ +# file : mysql/database/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +: basics +: +$* diff --git a/mysql/index/buildfile b/mysql/index/buildfile new file mode 100644 index 0000000..9cadce3 --- /dev/null +++ b/mysql/index/buildfile @@ -0,0 +1,34 @@ +# file : mysql/index/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($mysql && !$multi || $build.meta_operation == 'dist') \ +"mysql should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-mysql%lib{odb-mysql} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix mysql_index_ \ + --generate-schema \ + --default-database common + +cxx.poptions =+ "-I$out_base" "-I$src_base" + +# Testscript's run-time prerequisites. +# +exe{driver}: ../../alias{mysql-client}: include = adhoc diff --git a/mysql/index/driver.cxx b/mysql/index/driver.cxx index 99138d3..4d0b7ad 100644 --- a/mysql/index/driver.cxx +++ b/mysql/index/driver.cxx @@ -4,18 +4,20 @@ // Test MySQL index creation. See also the common test. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; namespace mysql = odb::mysql; using namespace mysql; @@ -27,7 +29,7 @@ main (int argc, char* argv[]) { // This is just a schema creation test. // - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); { transaction t (db->begin ()); diff --git a/mysql/index/makefile b/mysql/index/makefile deleted file mode 100644 index 4bca75c..0000000 --- a/mysql/index/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : mysql/index/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database mysql --default-database \ -common --generate-schema --table-prefix mysql_index_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/index/test.std b/mysql/index/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/index/testscript b/mysql/index/testscript new file mode 100644 index 0000000..26dfc4f --- /dev/null +++ b/mysql/index/testscript @@ -0,0 +1,11 @@ +# file : mysql/index/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../mysql.testscript + ++$create_schema + +: basics +: +$* diff --git a/mysql/makefile b/mysql/makefile deleted file mode 100644 index a4b86a0..0000000 --- a/mysql/makefile +++ /dev/null @@ -1,41 +0,0 @@ -# file : mysql/makefile -# license : GNU GPL; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make - -tests := \ -template \ -custom \ -database \ -index \ -native \ -truncation \ -types - -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) - -$(dist): name := mysql -$(dist): export dirs := $(tests) -$(dist): export extra_dist := $(name)-vc8.sln $(name)-vc9.sln \ -$(name)-vc10.sln $(name)-vc11.sln $(name)-vc12.sln test.bat -$(dist): $(addprefix $(out_base)/,$(addsuffix /.dist,$(tests))) - $(call meta-automake) - $(call meta-vc8sln1,$(name)) - $(call meta-vc9sln1,$(name)) - $(call meta-vc10sln1,$(name)) - $(call meta-vc11sln1,$(name)) - $(call meta-vc12sln1,$(name)) - $(call meta-vctest,$(name)-vc10.sln,test.bat) - -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) - -$(call include,$(bld_root)/meta/vc8sln.make) -$(call include,$(bld_root)/meta/vc9sln.make) -$(call include,$(bld_root)/meta/vc10sln.make) -$(call include,$(bld_root)/meta/vc11sln.make) -$(call include,$(bld_root)/meta/vc12sln.make) -$(call include,$(bld_root)/meta/vctest.make) -$(call include,$(bld_root)/meta/automake.make) - -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) diff --git a/mysql/native/buildfile b/mysql/native/buildfile new file mode 100644 index 0000000..57c3c30 --- /dev/null +++ b/mysql/native/buildfile @@ -0,0 +1,16 @@ +# file : mysql/native/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($mysql && !$multi || $build.meta_operation == 'dist') \ +"mysql should be configured via config.odb_tests.database variable as a single database" + +import libs = libodb-mysql%lib{odb-mysql} +import libs += lib{common} + +exe{driver}: {hxx cxx}{*} $libs testscript + +cxx.poptions =+ "-I$out_base" "-I$src_base" + +# Testscript's run-time prerequisites. +# +exe{driver}: ../../alias{mysql-client}: include = adhoc diff --git a/mysql/native/driver.cxx b/mysql/native/driver.cxx index 0a7dffb..9b34fd2 100644 --- a/mysql/native/driver.cxx +++ b/mysql/native/driver.cxx @@ -4,14 +4,16 @@ // Test native SQL execution. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include +#include + +#undef NDEBUG +#include using namespace std; namespace mysql = odb::mysql; @@ -22,7 +24,7 @@ main (int argc, char* argv[]) { try { - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); // Create the database schema. // diff --git a/mysql/native/makefile b/mysql/native/makefile deleted file mode 100644 index f3bf417..0000000 --- a/mysql/native/makefile +++ /dev/null @@ -1,83 +0,0 @@ -# file : mysql/native/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-schemaless-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/native/test.std b/mysql/native/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/native/testscript b/mysql/native/testscript new file mode 100644 index 0000000..21327ff --- /dev/null +++ b/mysql/native/testscript @@ -0,0 +1,9 @@ +# file : mysql/native/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../mysql.testscript + +: basics +: +$* diff --git a/mysql/template/Makefile.am b/mysql/template/Makefile.am deleted file mode 100644 index 2568e1e..0000000 --- a/mysql/template/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# file : mysql/template/Makefile.am -# license : GNU GPL v2; see accompanying LICENSE file - -EXTRA_DIST = __file__(extra_dist) - -noinst_PROGRAMS = driver -driver_SOURCES = driver.cxx __path__(extra_sources) __path__(extra_headers) -LDADD = $(top_builddir)/libcommon/common/libcommon.la -AM_CPPFLAGS = -I'$(top_builddir)/libcommon' -I'$(top_srcdir)/libcommon' -AM_CPPFLAGS += -I'$(builddir)' -I'$(srcdir)' - -TESTS=$(top_builddir)/tester -TESTS_ENVIRONMENT=top_builddir=$(top_builddir); export top_builddir; - -__ifelse__(__value__(odb_options),,, - -# ODB compilation. -# -driver_SOURCES += test.hxx -nodist_driver_SOURCES = test-odb.cxx -BUILT_SOURCES = test-odb.hxx -CLEANFILES = test-odb.hxx test-odb.ixx test-odb.cxx - -ODB = @ODB@ -ODBFLAGS = @ODBFLAGS@ -ODBCPPFLAGS = @ODBCPPFLAGS@ - -if HAVE_CXX11 -ODBFLAGS += --std c++11 -endif - -test-odb.hxx: test.hxx - $(ODB) $(AM_CPPFLAGS) $(ODBCPPFLAGS) $(CPPFLAGS) $(ODBFLAGS) __value__(odb_options) $< -) diff --git a/mysql/template/driver.cxx b/mysql/template/driver.cxx deleted file mode 100644 index 7034a95..0000000 --- a/mysql/template/driver.cxx +++ /dev/null @@ -1,40 +0,0 @@ -// file : mysql/template/driver.cxx -// license : GNU GPL v2; see accompanying LICENSE file - -// PLACE TEST DESCRIPTION HERE -// - -#include // std::auto_ptr -#include -#include - -#include -#include - -#include - -#include "test.hxx" -#include "test-odb.hxx" - -using namespace std; -namespace mysql = odb::mysql; -using namespace mysql; - -int -main (int argc, char* argv[]) -{ - try - { - auto_ptr db (create_specific_database (argc, argv)); - - { - transaction t (db->begin ()); - t.commit (); - } - } - catch (const odb::exception& e) - { - cerr << e.what () << endl; - return 1; - } -} diff --git a/mysql/template/makefile b/mysql/template/makefile deleted file mode 100644 index 9ed17ca..0000000 --- a/mysql/template/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : mysql/template/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database mysql --default-database \ -common --generate-schema --table-prefix mysql_template_ #@@ CHANGE THIS -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/template/template-vc10.vcxproj b/mysql/template/template-vc10.vcxproj deleted file mode 100644 index 0da2efe..0000000 --- a/mysql/template/template-vc10.vcxproj +++ /dev/null @@ -1,180 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {__uuid__()} - Win32Proj - __value__(name) - - - - Application - true - Unicode - - - Application - true - Unicode - - - Application - false - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - - - - true - $(Configuration)\ - driver - - - true - $(Platform)\$(Configuration)\ - driver - - - false - $(Configuration)\ - driver - - - false - $(Platform)\$(Configuration)\ - driver - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies) - Console - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies) - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies) - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib64\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies) - Console - true - true - true - - -__ifelse__(__value__(odb_options),,, -m4_dnl - -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1600 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - ) - -__ifelse__(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - - -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - - - - - diff --git a/mysql/template/template-vc10.vcxproj.filters b/mysql/template/template-vc10.vcxproj.filters deleted file mode 100644 index 8ac18a3..0000000 --- a/mysql/template/template-vc10.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {__uuid__()} - cxx - - - {__uuid__()} - h;hxx;ixx;txx - - - -__ifelse__(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - - -__source_filter_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - - \ No newline at end of file diff --git a/mysql/template/template-vc11.vcxproj b/mysql/template/template-vc11.vcxproj deleted file mode 100644 index 5fb45bb..0000000 --- a/mysql/template/template-vc11.vcxproj +++ /dev/null @@ -1,184 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {__uuid__()} - Win32Proj - __value__(name) - - - - Application - true - v110 - Unicode - - - Application - true - v110 - Unicode - - - Application - false - v110 - true - Unicode - - - Application - false - v110 - true - Unicode - - - - - - - - - - - - - - - - - - - true - $(Configuration)\ - driver - - - true - $(Platform)\$(Configuration)\ - driver - - - false - $(Configuration)\ - driver - - - false - $(Platform)\$(Configuration)\ - driver - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies) - Console - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies) - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies) - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - - - $(SolutionDir)\..\libcommon\lib64\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies) - Console - true - true - true - - -__ifelse__(__value__(odb_options),,, -m4_dnl - -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - ) - -__ifelse__(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - - -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - - - - - diff --git a/mysql/template/template-vc11.vcxproj.filters b/mysql/template/template-vc11.vcxproj.filters deleted file mode 100644 index 8ac18a3..0000000 --- a/mysql/template/template-vc11.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {__uuid__()} - cxx - - - {__uuid__()} - h;hxx;ixx;txx - - - -__ifelse__(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - - -__source_filter_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - - \ No newline at end of file diff --git a/mysql/template/template-vc12.vcxproj b/mysql/template/template-vc12.vcxproj deleted file mode 100644 index 32e2930..0000000 --- a/mysql/template/template-vc12.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {__uuid__()} - Win32Proj - __value__(name) - - - - Application - true - v120 - Unicode - - - Application - true - v120 - Unicode - - - Application - false - v120 - true - Unicode - - - Application - false - v120 - true - Unicode - - - - - - - - - - - - - - - - - - - true - $(Configuration)\ - driver - - - true - $(Platform)\$(Configuration)\ - driver - - - false - $(Configuration)\ - driver - - - false - $(Platform)\$(Configuration)\ - driver - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - true - - - $(SolutionDir)\..\libcommon\lib\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies) - Console - true - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - true - - - $(SolutionDir)\..\libcommon\lib64\common-d.lib;odb-mysql-d.lib;odb-d.lib;%(AdditionalDependencies) - Console - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - true - - - $(SolutionDir)\..\libcommon\lib\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies) - Console - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WIN32;_CONSOLE;HAVE_CONFIG_VC_H;%(PreprocessorDefinitions) - $(SolutionDir)\..\libcommon - 4068;4355;4800;4290;%(DisableSpecificWarnings) - true - - - $(SolutionDir)\..\libcommon\lib64\common.lib;odb-mysql.lib;odb.lib;%(AdditionalDependencies) - Console - true - true - true - - -__ifelse__(__value__(odb_options),,, -m4_dnl - -__custom_build_entry__( -test.hxx, -odb test.hxx, -odb.exe --std c++11 __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1700 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) - ) - -__ifelse__(__value__(odb_options),,, -__header_entry__(test-odb.hxx) -__header_entry__(test-odb.ixx)) -__header_entries__(extra_headers) - - -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - - - - - diff --git a/mysql/template/template-vc12.vcxproj.filters b/mysql/template/template-vc12.vcxproj.filters deleted file mode 100644 index 8ac18a3..0000000 --- a/mysql/template/template-vc12.vcxproj.filters +++ /dev/null @@ -1,25 +0,0 @@ - - - - - {__uuid__()} - cxx - - - {__uuid__()} - h;hxx;ixx;txx - - - -__ifelse__(__value__(odb_options),,, -__header_filter_entry__(test.hxx) -__header_filter_entry__(test-odb.hxx) -__header_filter_entry__(test-odb.ixx)) -__header_filter_entries__(extra_headers) - - -__source_filter_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_filter_entry__(test-odb.cxx)) -__source_filter_entries__(extra_sources) - - \ No newline at end of file diff --git a/mysql/template/template-vc8.vcproj b/mysql/template/template-vc8.vcproj deleted file mode 100644 index afe88c4..0000000 --- a/mysql/template/template-vc8.vcproj +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - - -__ifelse__(__value__(odb_options),,, -__file_entry_custom_build__( -test.hxx, -odb test.hxx, -odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1400 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) -__file_entry__(test-odb.hxx) -__file_entry__(test-odb.ixx)) -__file_entries__(extra_headers) - - - - - diff --git a/mysql/template/template-vc9.vcproj b/mysql/template/template-vc9.vcproj deleted file mode 100644 index 58e1a54..0000000 --- a/mysql/template/template-vc9.vcproj +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__source_entry__(driver.cxx) -__ifelse__(__value__(odb_options),,,__source_entry__(test-odb.cxx)) -__source_entries__(extra_sources) - - -__ifelse__(__value__(odb_options),,, -__file_entry_custom_build__( -test.hxx, -odb test.hxx, -odb.exe __xml__(__shell_quotes__(__value__(odb_options) -DHAVE_CONFIG_VC_H -DODB_MSC_VER=1500 -I$(SolutionDir)\..\libcommon)) test.hxx, -test-odb.hxx;test-odb.ixx;test-odb.cxx) -__file_entry__(test-odb.hxx) -__file_entry__(test-odb.ixx)) -__file_entries__(extra_headers) - - - - - diff --git a/mysql/template/test.hxx b/mysql/template/test.hxx deleted file mode 100644 index 5f16f63..0000000 --- a/mysql/template/test.hxx +++ /dev/null @@ -1,25 +0,0 @@ -// file : mysql/template/test.hxx -// license : GNU GPL v2; see accompanying LICENSE file - -#ifndef TEST_HXX -#define TEST_HXX - -#include - -#pragma db object -struct object -{ - object (unsigned long id) - : id_ (id) - { - } - - object () - { - } - - #pragma db id - unsigned long id_; -}; - -#endif // TEST_HXX diff --git a/mysql/template/test.std b/mysql/template/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/test.bat b/mysql/test.bat deleted file mode 100644 index f9d3af0..0000000 --- a/mysql/test.bat +++ /dev/null @@ -1,68 +0,0 @@ -@echo off -rem file : mysql/test.bat -rem license : GNU GPL v2; see accompanying LICENSE file - -setlocal - -set "tests=__path__(dirs)" -set "confs=__path__(configurations)" -set "plats=__path__(platforms)" -set "curdir=%CD%" -set "topdir=%curdir%\.." -set "failed=" - -goto start - -rem -rem %1 - test directory -rem %2 - configuration -rem %3 - platform -rem -:run_test - cd %1 - - if "_%3_" == "_Win32_" ( - set "dir=%2" - ) else ( - set "dir=%3\%2" - ) - - if exist %dir%\driver.exe ( - echo %1\%3\%2 - call %topdir%\tester.bat mysql %2 %3 - if errorlevel 1 ( - set "failed=%failed% %1\%3\%2" - ) - ) - - cd %curdir% -goto :eof - -:start - -for %%t in (%tests%) do ( - for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_test %%t %%c %%p - ) - ) -) - -if not "_%failed%_" == "__" goto error - -echo. -echo ALL TESTS PASSED -echo. -goto end - -:error -if not "_%failed%_" == "__" ( - echo. - for %%t in (%failed%) do echo FAILED: %%t - echo. -) -endlocal -exit /b 1 - -:end -endlocal diff --git a/mysql/truncation/buildfile b/mysql/truncation/buildfile new file mode 100644 index 0000000..fbd936b --- /dev/null +++ b/mysql/truncation/buildfile @@ -0,0 +1,35 @@ +# file : mysql/truncation/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($mysql && !$multi || $build.meta_operation == 'dist') \ +"mysql should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-mysql%lib{odb-mysql} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix mysql_truncation_ \ + --generate-schema \ + --default-database common \ + --generate-query + +cxx.poptions =+ "-I$out_base" "-I$src_base" + +# Testscript's run-time prerequisites. +# +exe{driver}: ../../alias{mysql-client}: include = adhoc diff --git a/mysql/truncation/driver.cxx b/mysql/truncation/driver.cxx index 9f044e6..21084f5 100644 --- a/mysql/truncation/driver.cxx +++ b/mysql/truncation/driver.cxx @@ -4,19 +4,21 @@ // Test insufficient buffer/truncation handling. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; namespace mysql = odb::mysql; using namespace mysql; @@ -34,7 +36,7 @@ main (int argc, char* argv[]) // Test basic operations. // { - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); // Run persist/load so that the initial bindings are established // (version == 0). @@ -72,7 +74,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr o (db->load (3)); + unique_ptr o (db->load (3)); assert (o->str_ == long_str); t.commit (); } @@ -90,7 +92,7 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr o (db->load (3)); + unique_ptr o (db->load (3)); assert (o->str_ == longer_str); t.commit (); } @@ -102,7 +104,7 @@ main (int argc, char* argv[]) typedef mysql::query query; typedef odb::result result; - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); // Run persist/query so that the initial bindings are established // (version == 0). @@ -157,7 +159,7 @@ main (int argc, char* argv[]) // Test containers. // { - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); // Use different connections to persist and load the object. // @@ -175,7 +177,7 @@ main (int argc, char* argv[]) { transaction t (c2->begin ()); - auto_ptr p (db->load (1)); + unique_ptr p (db->load (1)); t.commit (); assert (p->vec_ == o.vec_); diff --git a/mysql/truncation/makefile b/mysql/truncation/makefile deleted file mode 100644 index 358a136..0000000 --- a/mysql/truncation/makefile +++ /dev/null @@ -1,107 +0,0 @@ -# file : mysql/truncation/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database mysql --default-database \ -common --generate-schema --generate-query --table-prefix mysql_truncation_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/truncation/test.std b/mysql/truncation/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/truncation/testscript b/mysql/truncation/testscript new file mode 100644 index 0000000..b9b6792 --- /dev/null +++ b/mysql/truncation/testscript @@ -0,0 +1,11 @@ +# file : mysql/truncation/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../mysql.testscript + ++$create_schema + +: basics +: +$* diff --git a/mysql/types/buildfile b/mysql/types/buildfile new file mode 100644 index 0000000..112a81f --- /dev/null +++ b/mysql/types/buildfile @@ -0,0 +1,36 @@ +# file : mysql/types/buildfile +# license : GNU GPL v2; see accompanying LICENSE file + +assert ($mysql && !$multi || $build.meta_operation == 'dist') \ +"mysql should be configured via config.odb_tests.database variable as a single database" + +import libodb = libodb%lib{odb} + +import libs = libodb-mysql%lib{odb-mysql} +import libs += lib{common} + +exe{driver}: {hxx cxx}{* -*-odb} {hxx ixx cxx}{test-odb} testscript + +# Introduce the metadata library target to make sure the libodb library is +# resolved for the odb_compile ad hoc rule (see build/root.build for details). +# +libue{test-meta}: $libodb + +<{hxx ixx cxx}{test-odb}>: hxx{test} libue{test-meta} + +exe{driver}: libue{test-meta} $libs + +# Specify the ODB custom options to be used by the odb_compile ad hoc rule +# (see build/root.build for details). +# +odb_options = --table-prefix mysql_types_ \ + --generate-schema \ + --default-database common \ + --generate-query \ + --hxx-prologue '#include "traits.hxx"' + +cxx.poptions =+ "-I$out_base" "-I$src_base" + +# Testscript's run-time prerequisites. +# +exe{driver}: ../../alias{mysql-client}: include = adhoc diff --git a/mysql/types/driver.cxx b/mysql/types/driver.cxx index 04c8ebf..2354b04 100644 --- a/mysql/types/driver.cxx +++ b/mysql/types/driver.cxx @@ -4,18 +4,20 @@ // Test MySQL type conversion. // -#include // std::auto_ptr -#include +#include // std::unique_ptr #include #include #include -#include +#include #include "test.hxx" #include "test-odb.hxx" +#undef NDEBUG +#include + using namespace std; namespace mysql = odb::mysql; using namespace mysql; @@ -25,7 +27,7 @@ main (int argc, char* argv[]) { try { - auto_ptr db (create_specific_database (argc, argv)); + unique_ptr db (create_specific_database (argc, argv)); mysql_version v; { @@ -124,7 +126,7 @@ main (int argc, char* argv[]) // { transaction t (db->begin ()); - auto_ptr o1 (db->load (1)); + unique_ptr o1 (db->load (1)); t.commit (); assert (o == *o1); @@ -147,9 +149,9 @@ main (int argc, char* argv[]) { transaction t (db->begin ()); - auto_ptr p1 (db->load (1)); - auto_ptr p2 (db->load (2)); - auto_ptr p3 (db->load (3)); + unique_ptr p1 (db->load (1)); + unique_ptr p2 (db->load (2)); + unique_ptr p3 (db->load (3)); t.commit (); assert (o1 == *p1); diff --git a/mysql/types/makefile b/mysql/types/makefile deleted file mode 100644 index 779f9b1..0000000 --- a/mysql/types/makefile +++ /dev/null @@ -1,109 +0,0 @@ -# file : mysql/types/makefile -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := driver.cxx -odb_hdr := test.hxx -genf := $(call odb-gen,$(odb_hdr)) -gen := $(addprefix $(out_base)/,$(genf)) -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) $(filter %.o,$(gen:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -common.l := $(out_root)/libcommon/common/common.l -common.l.cpp-options := $(out_root)/libcommon/common/common.l.cpp-options - -# Import. -# -$(call import,\ - $(scf_root)/import/odb/stub.make,\ - odb: odb,odb-rules: odb_rules) - -# Build. -# -$(driver): $(cxx_obj) $(common.l) -$(cxx_obj) $(cxx_od): cpp_options := -I$(out_base) -I$(src_base) -$(cxx_obj) $(cxx_od): $(common.l.cpp-options) - -$(gen): $(odb) -$(gen): odb := $(odb) -$(gen) $(dist): export odb_options += --database mysql --default-database \ -common --generate-schema --generate-query --hxx-prologue \ -'\#include "traits.hxx"' --table-prefix mysql_types_ -$(gen): cpp_options := -I$(src_base) -$(gen): $(common.l.cpp-options) - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(driver) - -# Dist -# -$(dist): sources := $(cxx_tun) -$(dist): headers := $(odb_hdr) -$(dist): export extra_headers := traits.hxx -$(dist): data_dist := test.std -$(dist): export name := $(subst /,-,$(subst $(src_root)/mysql/,,$(src_base))) -$(dist): export extra_dist := $(data_dist) \ -$(name)-vc8.vcproj $(name)-vc9.vcproj \ -$(name)-vc10.vcxproj $(name)-vc10.vcxproj.filters \ -$(name)-vc11.vcxproj $(name)-vc11.vcxproj.filters \ -$(name)-vc12.vcxproj $(name)-vc12.vcxproj.filters -$(dist): - $(call dist-data,$(sources) $(headers) $(extra_headers) $(data_dist)) - $(call meta-automake,../template/Makefile.am) - $(call meta-vc8proj,../template/template-vc8.vcproj,$(name)-vc8.vcproj) - $(call meta-vc9proj,../template/template-vc9.vcproj,$(name)-vc9.vcproj) - $(call meta-vc10proj,../template/template-vc10.vcxproj,$(name)-vc10.vcxproj) - $(call meta-vc11proj,../template/template-vc11.vcxproj,$(name)-vc11.vcxproj) - $(call meta-vc12proj,../template/template-vc12.vcxproj,$(name)-vc12.vcxproj) - -# Test. -# -$(eval $(call test-rule)) - -# Clean. -# -$(clean): \ - $(driver).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) \ - $(addsuffix .hxx.clean,$(filter %.cxx,$(gen))) - $(call message,,rm -f $(out_base)/test.out) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(driver): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := driver $(genf) -$(clean): $(out_base)/.gitignore.clean - -$(call include,$(bld_root)/git/gitignore.make) -endif - -# How to. -# -$(call include,$(bld_root)/dist.make) -$(call include,$(bld_root)/meta/vc8proj.make) -$(call include,$(bld_root)/meta/vc9proj.make) -$(call include,$(bld_root)/meta/vc10proj.make) -$(call include,$(bld_root)/meta/vc11proj.make) -$(call include,$(bld_root)/meta/vc12proj.make) -$(call include,$(bld_root)/meta/automake.make) - -$(call include,$(bld_root)/cxx/standard.make) # cxx_standard -ifdef cxx_standard -$(gen): odb_options += --std $(cxx_standard) -$(call include,$(odb_rules)) -endif - -$(call include,$(bld_root)/cxx/cxx-d.make) -$(call include,$(bld_root)/cxx/cxx-o.make) -$(call include,$(bld_root)/cxx/o-e.make) - -# Dependencies. -# -$(call import,$(src_root)/libcommon/makefile) diff --git a/mysql/types/test.hxx b/mysql/types/test.hxx index 12eb4e0..82f7496 100644 --- a/mysql/types/test.hxx +++ b/mysql/types/test.hxx @@ -7,7 +7,7 @@ #include #include #include -#include // std::auto_ptr +#include // std::unique_ptr #include // std::memcpy, std::str[n]cmp, std::strlen #include @@ -84,7 +84,7 @@ operator== (bitfield x, bitfield y) #pragma db value(bitfield) type ("BIT(4)") typedef std::set set; -typedef std::auto_ptr string_ptr; +typedef std::unique_ptr string_ptr; enum color {red, green, blue}; diff --git a/mysql/types/test.std b/mysql/types/test.std deleted file mode 100644 index e69de29..0000000 diff --git a/mysql/types/testscript b/mysql/types/testscript new file mode 100644 index 0000000..2962d1c --- /dev/null +++ b/mysql/types/testscript @@ -0,0 +1,11 @@ +# file : mysql/types/testscript +# license : GNU GPL v2; see accompanying LICENSE file + +.include ../../database-options.testscript +.include ../../mysql.testscript + ++$create_schema + +: basics +: +$* -- cgit v1.1