Manual:$wgDebugDumpSqlLength

Details
If set, SQL queries will be truncated to the given length before logging.