diff options
author | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-10-29 08:21:28 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2015-10-29 08:21:28 +0200 |
commit | 0fe5eb5cae7cf7da90c8f46997bb331ce2253ac6 (patch) | |
tree | 4dfc47dab89cc1b2dcb4eb6161a7a27119498c88 | |
parent | 1108c1ca5c1d71bb9ca39a463a4f0465b23350b6 (diff) | |
download | mariadb-git-0fe5eb5cae7cf7da90c8f46997bb331ce2253ac6.tar.gz |
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.
-rw-r--r-- | storage/innobase/btr/btr0cur.cc | 16 | ||||
-rw-r--r-- | storage/xtradb/btr/btr0cur.cc | 16 |
2 files changed, 30 insertions, 2 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index b56b4cac392..a8ce43741ef 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -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; } diff --git a/storage/xtradb/btr/btr0cur.cc b/storage/xtradb/btr/btr0cur.cc index e2592b5dbd8..e84aaf1a54f 100644 --- a/storage/xtradb/btr/btr0cur.cc +++ b/storage/xtradb/btr/btr0cur.cc @@ -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; } |