summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2023-03-17 17:17:35 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2023-03-17 17:17:35 +0530
commite8e0559ed213db0fffcfd9e2108eedaeb451f7f4 (patch)
tree5f903e744292d2256fc07b42565fd51373b4c051 /storage
parent18e4978edc13991e5c424084ef7e1a5c717b86a6 (diff)
downloadmariadb-git-e8e0559ed213db0fffcfd9e2108eedaeb451f7f4.tar.gz
MDEV-30870 Undo tablespace name displays wrongly for I_S queries
- INNODB_SYS_TABLESPACES in information schema should display innodb_undo001, innodb_undo002 etc as tablespace name for undo tablespaces
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/handler/i_s.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
index 063462a12b9..366ef38cc07 100644
--- a/storage/innobase/handler/i_s.cc
+++ b/storage/innobase/handler/i_s.cc
@@ -6436,8 +6436,13 @@ static int i_s_sys_tablespaces_fill(THD *thd, const fil_space_t &s, TABLE *t)
OK(f->store(name.data(), name.size(), system_charset_info));
f->set_notnull();
}
- else
- f->set_notnull();
+ else if (srv_is_undo_tablespace(s.id))
+ {
+ char name[15];
+ snprintf(name, sizeof name, "innodb_undo%03zu",
+ (s.id - srv_undo_space_id_start + 1));
+ OK(f->store(name, strlen(name), system_charset_info));
+ } else f->set_notnull();
}
fields[SYS_TABLESPACES_NAME]->set_null();