From fd8bc2518a3531980b4e80b5bd88a5d475aa82c6 Mon Sep 17 00:00:00 2001 From: Colin Kelley Date: Tue, 25 Apr 2023 09:32:37 -0700 Subject: [PATCH] issue-#725: use STRAIGHT_JOIN in infoSchemaAutoIncrementQuery Signed-off-by: Colin Kelley --- collector/info_schema_auto_increment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collector/info_schema_auto_increment.go b/collector/info_schema_auto_increment.go index d45dd783d..d52ebd27d 100644 --- a/collector/info_schema_auto_increment.go +++ b/collector/info_schema_auto_increment.go @@ -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 `