1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 15:31:12 +01:00

Fix data_free

This commit is contained in:
Daniil Gentili 2024-01-25 18:34:25 +01:00
parent 29760e010f
commit 20a851d44a

View File

@ -135,7 +135,7 @@ final class MysqlArray extends SqlArray
->execute([$database, $this->table])
->fetchRow();
Assert::notNull($result);
$result = $result['data_free'];
$result = $result['data_free'] ?? $result['DATA_FREE'];
if (($result >> 20) > $this->dbSettings->getOptimizeIfWastedGtMb()) {
$this->db->query("OPTIMIZE TABLE `{$this->table}`");
}