Skip to content

Commit

Permalink
Initialize zip_dict_ids table and avoid referencing array items
Browse files Browse the repository at this point in the history
as currently MariaDB does not support compressed columns.
  • Loading branch information
Jan Lindström committed Nov 1, 2016
1 parent 923a7f8 commit 9741e0e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions storage/xtradb/handler/handler0alter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2894,6 +2894,14 @@ prepare_inplace_alter_table_dict(
mem_heap_alloc(ctx->heap,
altered_table->s->fields * sizeof(ulint)));

/* This is currently required for valgrind because MariaDB does
not currently support compressed columns. */
for (size_t field_idx = 0;
field_idx < altered_table->s->fields;
++field_idx) {
zip_dict_ids[field_idx] = ULINT_UNDEFINED;
}

const char* err_zip_dict_name = 0;
if (!innobase_check_zip_dicts(altered_table, zip_dict_ids,
ctx->trx, &err_zip_dict_name)) {
Expand Down Expand Up @@ -3271,6 +3279,7 @@ prepare_inplace_alter_table_dict(

DBUG_ASSERT(error == DB_SUCCESS);

#ifdef HAVE_PERCONA_COMPRESSED_COLUMNS
/*
Adding compression dictionary <-> compressed table column links
to the SYS_ZIP_DICT_COLS table.
Expand All @@ -3279,6 +3288,7 @@ prepare_inplace_alter_table_dict(
innobase_create_zip_dict_references(altered_table,
ctx->trx->table_id, zip_dict_ids, ctx->trx);
}
#endif

/* Commit the data dictionary transaction in order to release
the table locks on the system tables. This means that if
Expand Down

0 comments on commit 9741e0e

Please sign in to comment.