After review fixes (Bug #5682)

innobase/include/data0type.ic:
  dtype_get_fixed_size(), dtype_get_min_size(): Do not check
  prtype, mbminlen and mbmaxlen for types other than DATA_MYSQL,
  as that is the only type that can hold fixed-length strings of
  variable-length objects (UTF-8 encoded characters).
innobase/row/row0sel.c:
  row_sel_field_store_in_mysql_format(): Document which fields of
  templ will be used.  Add 0x20 padding only to DATA_MYSQL fields.
  Change related debug assertions to real assertions for now, until
  5.0 becomes generally available.  Check with assertion that all
  data types handled in the catch-all branch are appropriate.
This commit is contained in:
unknown 2005-02-17 18:40:45 +02:00
commit d0dbd41a3b
2 changed files with 22 additions and 6 deletions

View file

@ -354,6 +354,7 @@ dtype_get_fixed_size(
case DATA_INT:
case DATA_FLOAT:
case DATA_DOUBLE:
return(dtype_get_len(type));
case DATA_MYSQL:
if (type->prtype & DATA_BINARY_TYPE) {
return(dtype_get_len(type));
@ -438,6 +439,7 @@ dtype_get_min_size(
case DATA_INT:
case DATA_FLOAT:
case DATA_DOUBLE:
return(type->len);
case DATA_MYSQL:
if ((type->prtype & DATA_BINARY_TYPE)
|| type->mbminlen == type->mbmaxlen) {
@ -446,6 +448,7 @@ dtype_get_min_size(
/* this is a variable-length character set */
ut_a(type->mbminlen > 0);
ut_a(type->mbmaxlen > type->mbminlen);
ut_a(type->len % type->mbmaxlen == 0);
return(type->len * type->mbminlen / type->mbmaxlen);
case DATA_VARCHAR:
case DATA_BINARY: