summaryrefslogtreecommitdiff
path: root/innobase/data
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2005-02-08 16:41:34 +0200
committerunknown <marko@hundin.mysql.fi>2005-02-08 16:41:34 +0200
commitf9a394dbddb83d899dd661542490d1965400bdbe (patch)
tree1d41c43c651ff0ac97e4022bf7e9181709da34e2 /innobase/data
parent63bcbfc4339ae843dc367d08fff0760da4d484c3 (diff)
downloadmariadb-git-f9a394dbddb83d899dd661542490d1965400bdbe.tar.gz
InnoDB: Fix Bug #7350 without hard-coding charset-collation numbers.
innobase/data/data0type.c: Add mbminlen and mbmaxlen to dtype_t innobase/include/data0type.h: Add mbminlen and mbmaxlen to dtype_t Add dtype_get_mbminlen() and dtype_get_mbmaxlen() innobase/include/data0type.ic: Add dtype_set_mblen() Add dtype_get_mbminlen() and dtype_get_mbmaxlen() Replace innobase_is_mb_cset() with innobase_get_mb_cset() innobase/include/row0mysql.h: Add mbminlen and mbmaxlen innobase/include/row0mysql.ic: Detect UCS2 collations based on mbminlen innobase/row/row0sel.c: Detect UCS2 collations based on mbminlen sql/ha_innodb.cc: Replace innobase_is_mb_cset() with innobase_get_mb_cset() build_template(): Initialize templ->mbminlen and templ->mbmaxlen
Diffstat (limited to 'innobase/data')
-rw-r--r--innobase/data/data0type.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/innobase/data/data0type.c b/innobase/data/data0type.c
index b1297fe7a5b..b8e4dd9c7f2 100644
--- a/innobase/data/data0type.c
+++ b/innobase/data/data0type.c
@@ -41,7 +41,7 @@ charset-collation code for them. */
ulint data_mysql_default_charset_coll = 99999999;
ulint data_mysql_latin1_swedish_charset_coll = 99999999;
-dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0};
+dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0, 0, 0};
dtype_t* dtype_binary = &dtype_binary_val;
/*************************************************************************
@@ -216,6 +216,8 @@ dtype_validate(
ut_a((type->prtype & DATA_MYSQL_TYPE_MASK) < DATA_N_SYS_COLS);
}
+ ut_a(type->mbminlen <= type->mbmaxlen);
+
return(TRUE);
}