Commit d7ffd1a0 authored by Vasil Dimov's avatar Vasil Dimov

Merge c3400 from mysql-5.1-innodb:

  ------------------------------------------------------------
  revno: 3400
  revision-id: mmakela@bk-internal.mysql.com-20100415070122-1nxji8ym4mao13ao
  parent: vasil.dimov@oracle.com-20100414200413-ktulgshvdp0smxk0
  committer: Marko Makela <mmakela@bk-internal.mysql.com>
  branch nick: mysql-5.1-innodb
  timestamp: Thu 2010-04-15 09:01:22 +0200
  message:
    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.
  modified:
    storage/innodb_plugin/ChangeLog 2425@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2FChangeLog
    storage/innodb_plugin/trx/trx0rec.c 2@16c675df-0fcb-4bc9-8058-dcc011a37293:trunk%2Ftrx%2Ftrx0rec.c
parent a8afa783
......@@ -350,8 +350,13 @@ trx_undo_rec_get_col_val(
ut_ad(*orig_len >= BTR_EXTERN_FIELD_REF_SIZE);
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);
*/
*len += UNIV_EXTERN_STORAGE_FIELD;
break;
......@@ -1075,13 +1080,17 @@ trx_undo_rec_get_partial_row(
/* If the prefix of this column is indexed,
ensure that enough prefix is stored in the
undo log record. */
ut_a(ignore_prefix
|| !col->ord_part
if (!ignore_prefix && col->ord_part) {
ut_a(dfield_get_len(dfield)
>= 2 * BTR_EXTERN_FIELD_REF_SIZE);
ut_a(dict_table_get_format(index->table)
>= DICT_TF_FORMAT_ZIP
|| dfield_get_len(dfield)
>= REC_MAX_INDEX_COL_LEN
+ BTR_EXTERN_FIELD_REF_SIZE);
}
}
}
return(ptr);
}
......
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