aboutsummaryrefslogtreecommitdiff
path: root/odb/relational/mysql/context.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-04-06 18:15:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-04-06 18:15:50 +0200
commit6a66f46d4b416ce3408f8d938032d8b95265b1bb (patch)
treedd65f790e2e07087df06ec374ecefc7bc33fd42e /odb/relational/mysql/context.cxx
parentfc65c4e978759fa10fc61341d98d4dccac42a53f (diff)
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.
Diffstat (limited to 'odb/relational/mysql/context.cxx')
-rw-r--r--odb/relational/mysql/context.cxx2
1 files changed, 1 insertions, 1 deletions
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}