Skip to content

Commit 49fca21

Browse files
committed
fix: stats expiry in information schema
1 parent 2b61eb7 commit 49fca21

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Export/TableListService.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ public function __construct(private Configuration $configuration)
2020

2121
public function tablesToExport(): array
2222
{
23-
$result = $this->configuration->createPDOConnection()->prepare(
23+
$connection = $this->configuration->createPDOConnection();
24+
$connection->prepare('SET information_schema_stats_expiry=0')->execute();
25+
26+
$result = $connection->prepare(
2427
'SELECT TABLE_NAME, TABLE_ROWS FROM information_schema.tables'
2528
. ' WHERE TABLE_SCHEMA = SCHEMA() AND TABLE_TYPE = ?'
2629
);

0 commit comments

Comments
 (0)