Commit 6c354ffc authored by Marko Makela's avatar Marko Makela

storage/innodb_plugin: Relax too strict assertions about prefix

indexed BLOBs for ROW_FORMAT=DYNAMIC and ROW_FORMAT_COMPRESSED tables
(Bug #52746). In these tables, the locally stored prefix of a BLOB can
be as small as 20 bytes (BTR_EXTERN_FIELD_REF_SIZE). ROW_FORMAT=REDUNDANT
and ROW_FORMAT=COMPACT store a prefix of 768 bytes (REC_MAX_INDEX_COL_LEN).

trx_undo_rec_get_col_val(): Relax the ut_ad() assertion and add a
reference to dtuple_convert_big_rec().

trx_undo_rec_get_partial_row(): Relax the ut_a() assertion that
prompted Bug #52746.
parent e61722f3
2010-04-15 The InnoDB Team
* trx/trx0rec.c:
Fix Bug#52746 InnoDB purge thread crashed with table containing
prefix indexed blobs
2010-03-31 The InnoDB Team 2010-03-31 The InnoDB Team
* mysql-test/innodb_bug51920.test, mysql-test/innodb_bug51920.result, * mysql-test/innodb_bug51920.test, mysql-test/innodb_bug51920.result,
......
...@@ -350,8 +350,13 @@ trx_undo_rec_get_col_val( ...@@ -350,8 +350,13 @@ trx_undo_rec_get_col_val(
ut_ad(*orig_len >= BTR_EXTERN_FIELD_REF_SIZE); ut_ad(*orig_len >= BTR_EXTERN_FIELD_REF_SIZE);
ut_ad(*len > *orig_len); ut_ad(*len > *orig_len);
ut_ad(*len >= REC_MAX_INDEX_COL_LEN /* @see dtuple_convert_big_rec() */
ut_ad(*len >= BTR_EXTERN_FIELD_REF_SIZE * 2);
/* we do not have access to index->table here
ut_ad(dict_table_get_format(index->table) >= DICT_TF_FORMAT_ZIP
|| *len >= REC_MAX_INDEX_COL_LEN
+ BTR_EXTERN_FIELD_REF_SIZE); + BTR_EXTERN_FIELD_REF_SIZE);
*/
*len += UNIV_EXTERN_STORAGE_FIELD; *len += UNIV_EXTERN_STORAGE_FIELD;
break; break;
...@@ -1075,11 +1080,15 @@ trx_undo_rec_get_partial_row( ...@@ -1075,11 +1080,15 @@ trx_undo_rec_get_partial_row(
/* If the prefix of this column is indexed, /* If the prefix of this column is indexed,
ensure that enough prefix is stored in the ensure that enough prefix is stored in the
undo log record. */ undo log record. */
ut_a(ignore_prefix if (!ignore_prefix && col->ord_part) {
|| !col->ord_part ut_a(dfield_get_len(dfield)
|| dfield_get_len(dfield) >= 2 * BTR_EXTERN_FIELD_REF_SIZE);
>= REC_MAX_INDEX_COL_LEN ut_a(dict_table_get_format(index->table)
+ BTR_EXTERN_FIELD_REF_SIZE); >= DICT_TF_FORMAT_ZIP
|| dfield_get_len(dfield)
>= REC_MAX_INDEX_COL_LEN
+ BTR_EXTERN_FIELD_REF_SIZE);
}
} }
} }
......
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