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 not skipped when loading the schema (fixes vitessio#12669)

Signed-off-by: Oleksiy Kovyrin <oleksiy.kovyrin@shopify.com>
  • Loading branch information
kovyrin committed Mar 20, 2023
1 parent 3658c14 commit 6c3a7ee
Showing 1 changed file with 1 addition and 1 deletion.
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

0 comments on commit 6c3a7ee

Please sign in to comment.