Commit 0fe5eb5c authored by Jan Lindström's avatar Jan Lindström

MDEV-9032: MariaDB 10.1.8 crashes at startup

Add diagnostics when externally stored field is freed but
rollback ctx is not what we expect.
parent 1108c1ca
......@@ -5152,7 +5152,21 @@ btr_free_externally_stored_field(
/* In the rollback, we may encounter a clustered index
record with some unwritten off-page columns. There is
nothing to free then. */
ut_a(rb_ctx != RB_NONE);
if (rb_ctx != RB_NONE) {
char buf[3 * 512];
char *bufend;
ulint ispace = dict_index_get_space(index);
bufend = innobase_convert_name(buf, sizeof buf,
index->name, strlen(index->name),
NULL,
FALSE);
buf[bufend - buf]='\0';
ib_logf(IB_LOG_LEVEL_ERROR, "Unwritten off-page columns in "
"rollback context %d. Table %s index %s space_id %lu "
"index space %lu.",
rb_ctx, index->table->name, buf, space_id, ispace);
}
return;
}
......
......@@ -5338,7 +5338,21 @@ btr_free_externally_stored_field(
/* In the rollback, we may encounter a clustered index
record with some unwritten off-page columns. There is
nothing to free then. */
ut_a(rb_ctx != RB_NONE);
if (rb_ctx != RB_NONE) {
char buf[3 * 512];
char *bufend;
ulint ispace = dict_index_get_space(index);
bufend = innobase_convert_name(buf, sizeof buf,
index->name, strlen(index->name),
NULL,
FALSE);
buf[bufend - buf]='\0';
ib_logf(IB_LOG_LEVEL_ERROR, "Unwritten off-page columns in "
"rollback context %d. Table %s index %s space_id %lu "
"index space %lu.",
rb_ctx, index->table->name, buf, space_id, ispace);
}
return;
}
......
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