Commit a05f34d3 authored by marko's avatar marko

branches/zip: When writing an externally stored column to the undo log,

set the "external storage" flag.  When parsing the undo log, do not
misinterpret a SQL NULL column for externally stored.

These bugs were spotted by Heikki and Sunny.

trx_undo_page_report_modify(): Set the UNIV_EXTERN_STORAGE_FIELD flag
when needed.

trx_undo_rec_get_partial_row(): Check for len == UNIV_SQL_NULL.
parent 28383dde
......@@ -636,7 +636,17 @@ trx_undo_page_report_modify(
field = rec_get_nth_field(rec, offsets, pos,
&flen);
ptr += mach_write_compressed(ptr, flen);
if (rec_offs_nth_extern(offsets, pos)) {
/* If a field has external
storage, we add to flen the flag */
ptr += mach_write_compressed(
ptr, flen
+ UNIV_EXTERN_STORAGE_FIELD);
} else {
ptr += mach_write_compressed(
ptr, flen);
}
if (flen != UNIV_SQL_NULL) {
if (trx_undo_left(undo_page, ptr)
......@@ -914,7 +924,8 @@ trx_undo_rec_get_partial_row(
dfield_set_data(dfield, field, len);
if (len >= UNIV_EXTERN_STORAGE_FIELD) {
if (len != UNIV_SQL_NULL
&& len >= UNIV_EXTERN_STORAGE_FIELD) {
dfield_set_len(dfield,
len - UNIV_EXTERN_STORAGE_FIELD);
dfield_set_ext(dfield);
......
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