From 6a66f46d4b416ce3408f8d938032d8b95265b1bb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 6 Apr 2017 18:15:50 +0200 Subject: Map string keys to MySQL VARCHAR(128) instead of 255 to support 4-byte UTF-8 This is a backwards-incompatible change in that it may change your schema. To obtain the old behavior you will have to explicitly re-map std::string with the id_type pragma or explicitly specify the database type for each affected id member with the type pragma. --- odb/relational/mysql/context.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'odb/relational/mysql/context.cxx') diff --git a/odb/relational/mysql/context.cxx b/odb/relational/mysql/context.cxx index cf75b12..3893c16 100644 --- a/odb/relational/mysql/context.cxx +++ b/odb/relational/mysql/context.cxx @@ -50,7 +50,7 @@ namespace relational {"float", "FLOAT", 0, false}, {"double", "DOUBLE", 0, false}, - {"::std::string", "TEXT", "VARCHAR(255)", false}, + {"::std::string", "TEXT", "VARCHAR(128)", false}, {"::size_t", "BIGINT UNSIGNED", 0, false}, {"::std::size_t", "BIGINT UNSIGNED", 0, false} -- cgit v1.1