Commit 133118cd authored by marko's avatar marko

branches/5.1: dtype_get_sql_null_size(): return the correct storage

size of a SQL NULL column. (Bug #40369)

When MySQL Bug #20877 was fixed in r834, this function was
accidentally modified to return 0 or 1. Apparently, the only impact of
this bug is that fixed-length columns cannot be updated in-place from
or to SQL NULL, even in ROW_FORMAT=REDUNDANT.  After this fix,
fixed-length columns in ROW_FORMAT=REDUNDANT will have a constant
storage size as they should, no matter if NULL or non-NULL.  The bug
caused fixed-length NULL columns to occupy 1 byte.

rb://37 approved by Heikki over IM.
parent 279bbc9d
...@@ -558,5 +558,5 @@ dtype_get_sql_null_size( ...@@ -558,5 +558,5 @@ dtype_get_sql_null_size(
const dtype_t* type) /* in: type */ const dtype_t* type) /* in: type */
{ {
return(dtype_get_fixed_size_low(type->mtype, type->prtype, type->len, return(dtype_get_fixed_size_low(type->mtype, type->prtype, type->len,
type->mbminlen, type->mbmaxlen) > 0); type->mbminlen, type->mbmaxlen));
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment