From 99b88e8ff46a10015e392dabe76f84b16a30a3e7 Mon Sep 17 00:00:00 2001 From: "vitess-bot[bot]" <108069721+vitess-bot[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 09:55:33 +0200 Subject: [PATCH] [release-15.0] Use a left join to make sure that tables with tablespace=innodb_system are included in the schema (#12672) (#12734) * 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 * Set tablespace on a test table to see if it breaks vstreamer Signed-off-by: Oleksiy Kovyrin --------- Signed-off-by: Oleksiy Kovyrin Co-authored-by: Oleksiy Kovyrin --- go/mysql/flavor_mysql.go | 2 +- go/test/endtoend/vreplication/vstream_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/go/mysql/flavor_mysql.go b/go/mysql/flavor_mysql.go index ba4982db4d..62d07ba796 100644 --- a/go/mysql/flavor_mysql.go +++ b/go/mysql/flavor_mysql.go @@ -348,7 +348,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` diff --git a/go/test/endtoend/vreplication/vstream_test.go b/go/test/endtoend/vreplication/vstream_test.go index c596ed084f..e9d7189832 100644 --- a/go/test/endtoend/vreplication/vstream_test.go +++ b/go/test/endtoend/vreplication/vstream_test.go @@ -188,7 +188,7 @@ const vschemaUnsharded = ` } ` const schemaSharded = ` -create table customer(cid int, name varbinary(128), primary key(cid)) CHARSET=utf8mb4; +create table customer(cid int, name varbinary(128), primary key(cid)) TABLESPACE innodb_system CHARSET=utf8mb4; ` const vschemaSharded = ` {