~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/row/row0undo.c

Merge Revision revid:marko.makela@oracle.com-20100629130058-1ilqaj51u9sj9vqe from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100629130058-1ilqaj51u9sj9vqe

Original Authors: Marko Mäkelä <marko.makela@oracle.com>
Original commit message:
Bug#54408: txn rollback after recovery: row0umod.c:673
dict_table_get_format(index->table)

The REDUNDANT and COMPACT formats store a local 768-byte prefix of
each externally stored column. No row_ext cache is needed, but we
initialized one nevertheless. When the BLOB pointer was zero, we would
ignore the locally stored prefix as well. This triggered an assertion
failure in row_undo_mod_upd_exist_sec().

row_build(): Allow ext==NULL when a REDUNDANT or COMPACT table
contains externally stored columns.

row_undo_search_clust_to_pcur(), row_upd_store_row(): Invoke
row_build() with ext==NULL on REDUNDANT and COMPACT tables.

rb://382 approved by Jimmy Yang

Show diffs side-by-side

added added

removed removed

Lines of Context:
199
199
 
200
200
                ret = FALSE;
201
201
        } else {
 
202
                row_ext_t**     ext;
 
203
 
 
204
                if (dict_table_get_format(node->table) >= DICT_TF_FORMAT_ZIP) {
 
205
                        /* In DYNAMIC or COMPRESSED format, there is
 
206
                        no prefix of externally stored columns in the
 
207
                        clustered index record. Build a cache of
 
208
                        column prefixes. */
 
209
                        ext = &node->ext;
 
210
                } else {
 
211
                        /* REDUNDANT and COMPACT formats store a local
 
212
                        768-byte prefix of each externally stored
 
213
                        column. No cache is needed. */
 
214
                        ext = NULL;
 
215
                        node->ext = NULL;
 
216
                }
 
217
 
202
218
                node->row = row_build(ROW_COPY_DATA, clust_index, rec,
203
 
                                      offsets, NULL, &node->ext, node->heap);
 
219
                                      offsets, NULL, ext, node->heap);
204
220
                if (node->update) {
205
221
                        node->undo_row = dtuple_copy(node->row, node->heap);
206
222
                        row_upd_replace(node->undo_row, &node->undo_ext,