Skip to content

Commit

Permalink
Use a left join to make sure that tables with tablespace=innodb_syste…
Browse files Browse the repository at this point in the history
…m are included in the schema (#12672)

* 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 <[email protected]>

* Set tablespace on a test table to see if it breaks vstreamer

Signed-off-by: Oleksiy Kovyrin <[email protected]>

---------

Signed-off-by: Oleksiy Kovyrin <[email protected]>
  • Loading branch information
kovyrin authored Mar 27, 2023
1 parent 5a3ad0d commit 0de7e01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go/mysql/flavor_mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion go/test/endtoend/vreplication/vstream_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,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 = `
{
Expand Down

0 comments on commit 0de7e01

Please sign in to comment.