diff --git a/collector/info_schema_auto_increment.go b/collector/info_schema_auto_increment.go index d52ebd27..d3724347 100644 --- a/collector/info_schema_auto_increment.go +++ b/collector/info_schema_auto_increment.go @@ -24,7 +24,7 @@ import ( ) const infoSchemaAutoIncrementQuery = ` - SELECT table_schema, table_name, column_name, auto_increment, + SELECT c.table_schema, c.table_name, column_name, auto_increment, pow(2, case data_type when 'tinyint' then 7 when 'smallint' then 15 @@ -33,7 +33,7 @@ const infoSchemaAutoIncrementQuery = ` when 'bigint' then 63 end+(column_type like '% unsigned'))-1 as max_int FROM information_schema.columns c - STRAIGHT_JOIN information_schema.tables t USING (table_schema,table_name) + STRAIGHT_JOIN information_schema.tables t ON (BINARY c.table_schema=t.table_schema AND BINARY c.table_name=t.table_name) WHERE c.extra = 'auto_increment' AND t.auto_increment IS NOT NULL `