Skip to content

Commit ec66406

Browse files
authored
Fixing BIGINT UNSIGNED value is out of range error
Making adjustments to the Fragmented tables query to allow large tables by casting the DATA_FREE from unsigned to signed.
1 parent b425acd commit ec66406

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mysqltuner.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,7 +2411,7 @@ sub check_storage_engines {
24112411
}
24122412
$result{'Tables'}{'Fragmented tables'} =
24132413
[ select_array
2414-
"SELECT CONCAT(CONCAT(TABLE_SCHEMA, '.'), TABLE_NAME),DATA_FREE FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','performance_schema', 'mysql') AND DATA_LENGTH/1024/1024>100 AND DATA_FREE*100/(DATA_LENGTH+INDEX_LENGTH+DATA_FREE) > 10 AND NOT ENGINE='MEMORY' $not_innodb"
2414+
"SELECT CONCAT(CONCAT(TABLE_SCHEMA, '.'), TABLE_NAME),cast(DATA_FREE as signed) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema','performance_schema', 'mysql') AND DATA_LENGTH/1024/1024>100 AND cast(DATA_FREE as signed)*100/(DATA_LENGTH+INDEX_LENGTH+cast(DATA_FREE as signed)) > 10 AND NOT ENGINE='MEMORY' $not_innodb"
24152415
];
24162416
$fragtables = scalar @{ $result{'Tables'}{'Fragmented tables'} };
24172417

0 commit comments

Comments
 (0)