mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-19 21:04:44 +02:00
Only chunk if rows exceeds sqlite variables limit (999) (#1270)
This commit is contained in:
parent
22a0a52f7b
commit
038504fbec
@ -184,7 +184,11 @@ class File extends Model
|
||||
];
|
||||
}, $contents);
|
||||
|
||||
$this->sushiInsertChunkSize = min((int) floor(999 / count($this->getSchema())), count($rows));
|
||||
$rowCount = count($rows);
|
||||
$limit = 999;
|
||||
if ($rowCount > $limit) {
|
||||
$this->sushiInsertChunkSize = min(floor($limit / count($this->getSchema())), $rowCount);
|
||||
}
|
||||
|
||||
return $rows;
|
||||
} catch (Exception $exception) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user