diff options
author | unknown <marko@hundin.mysql.fi> | 2005-07-28 12:30:52 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2005-07-28 12:30:52 +0300 |
commit | a6350b1d05cacde74f606fdcbdf51f7acca9e965 (patch) | |
tree | f4992f608d946f6cd3b8b1c5d5c95307488c912d /innobase | |
parent | 57c537c6afb7ff7a8987a6e2e47a008284e12fa5 (diff) | |
download | mariadb-git-a6350b1d05cacde74f606fdcbdf51f7acca9e965.tar.gz |
row_sel_store_mysql_rec(): Convert NULL true VARCHAR columns
correctly.
innobase/row/row0sel.c:
Initialize NULL true VARCHAR columns with NUL bytes, as that is
what the columns will contain in handler::write_row(). (Bug #12186)
mysql-test/r/innodb.result:
Update table checksums to reflect the new handling of
true VARCHAR columns that are NULL.
Diffstat (limited to 'innobase')
-rw-r--r-- | innobase/row/row0sel.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/innobase/row/row0sel.c b/innobase/row/row0sel.c index 602f5855171..9234c4aeb26 100644 --- a/innobase/row/row0sel.c +++ b/innobase/row/row0sel.c @@ -2524,11 +2524,19 @@ row_sel_store_mysql_rec( (byte) (templ->mysql_null_bit_mask); switch (templ->type) { case DATA_VARCHAR: - case DATA_CHAR: case DATA_BINARY: + case DATA_VARMYSQL: + if (templ->mysql_type + == DATA_MYSQL_TRUE_VARCHAR) { + /* This is a >= 5.0.3 type + true VARCHAR. Zero the field. */ + pad_char = 0x00; + break; + } + /* Fall through */ + case DATA_CHAR: case DATA_FIXBINARY: case DATA_MYSQL: - case DATA_VARMYSQL: /* MySQL pads all non-BLOB and non-TEXT string types with space ' ' */ if (UNIV_UNLIKELY(templ->mbminlen == 2)) { |