From 6c3a7eeee045688c34817527ec75f9f97a5bba55 Mon Sep 17 00:00:00 2001 From: Oleksiy Kovyrin Date: Mon, 20 Mar 2023 13:40:59 -0400 Subject: [PATCH] Use a left join to make sure that tables with tablespace=innodb_system are not skipped when loading the schema (fixes #12669) Signed-off-by: Oleksiy Kovyrin --- go/mysql/flavor_mysql.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/mysql/flavor_mysql.go b/go/mysql/flavor_mysql.go index ad23854d374..407c14e34b0 100644 --- a/go/mysql/flavor_mysql.go +++ b/go/mysql/flavor_mysql.go @@ -363,7 +363,7 @@ const TablesWithSize80 = `SELECT t.table_name, SUM(i.file_size), SUM(i.allocated_size) FROM information_schema.tables t -INNER JOIN information_schema.innodb_tablespaces i +LEFT JOIN information_schema.innodb_tablespaces i ON i.name LIKE CONCAT(database(), '/%') AND (i.name = CONCAT(t.table_schema, '/', t.table_name) OR i.name LIKE CONCAT(t.table_schema, '/', t.table_name, '#p#%')) WHERE t.table_schema = database() GROUP BY t.table_name, t.table_type, t.create_time, t.table_comment`