summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-08-12 18:54:05 +0200
committerSergei Golubchik <serg@mariadb.org>2017-08-14 19:45:59 +0200
commitd07daa3125b295b6b30f72e788c11c1b998b5225 (patch)
treef273cbb40fdb69f5323570e5cbf1ba136ca823f9 /sql/sql_yacc.yy
parent04b288ae47dec8bd1a41902889956c4b0d711cc5 (diff)
downloadmariadb-git-d07daa3125b295b6b30f72e788c11c1b998b5225.tar.gz
MDEV-13313 JSON type alias is insufficiently compatible
make JSON an alias for LONGTEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin (same collation that item_jsonfunc.cc is using internally)
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy7
1 files changed, 5 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 43d4cf1e629..5f956e02bcf 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -6478,8 +6478,11 @@ field_type:
{ $$.set(MYSQL_TYPE_SET); }
| LONG_SYM opt_binary
{ $$.set(MYSQL_TYPE_MEDIUM_BLOB); }
- | JSON_SYM opt_binary
- { $$.set(MYSQL_TYPE_BLOB); }
+ | JSON_SYM
+ {
+ Lex->charset= &my_charset_utf8mb4_bin;
+ $$.set(MYSQL_TYPE_LONG_BLOB);
+ }
;
spatial_type: