Skip to content

Commit

Permalink
[release-16.0] Use a left join to make sure that tables with tablespa…
Browse files Browse the repository at this point in the history
…ce=innodb_system are included in the schema (#12672) (#12735)

* 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]>
Co-authored-by: Oleksiy Kovyrin <[email protected]>
  • Loading branch information
vitess-bot[bot] and kovyrin authored Mar 28, 2023
1 parent bb6e0da commit e979cec
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 @@ -189,7 +189,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 e979cec

Please sign in to comment.