Skip to content

Commit

Permalink
issue-#725: use STRAIGHT_JOIN in infoSchemaAutoIncrementQuery
Browse files Browse the repository at this point in the history
Signed-off-by: Colin Kelley <colindkelley@gmail.com>
  • Loading branch information
ColinDKelley committed Apr 25, 2023
1 parent bdb0fed commit fd8bc25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions collector/info_schema_auto_increment.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ const infoSchemaAutoIncrementQuery = `
when 'int' then 31
when 'bigint' then 63
end+(column_type like '% unsigned'))-1 as max_int
FROM information_schema.tables t
JOIN information_schema.columns c USING (table_schema,table_name)
FROM information_schema.columns c
STRAIGHT_JOIN information_schema.tables t USING (table_schema,table_name)
WHERE c.extra = 'auto_increment' AND t.auto_increment IS NOT NULL
`

Expand Down

0 comments on commit fd8bc25

Please sign in to comment.