From 58226717f43e001f0bc70ab3ccc9224e89fda9e9 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 27 Dec 2023 17:52:26 +0100 Subject: [PATCH] Use clearTableCache() instead of $forceRead Signed-off-by: Kamil Tekiela --- src/Controllers/Table/StructureController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Controllers/Table/StructureController.php b/src/Controllers/Table/StructureController.php index 39f563b5d1..c8712bc7bb 100644 --- a/src/Controllers/Table/StructureController.php +++ b/src/Controllers/Table/StructureController.php @@ -297,7 +297,9 @@ class StructureController extends AbstractController bool $tableIsAView, string $tableStorageEngine, ): string { - $showTable = $this->dbi->getTable(Current::$database, Current::$table)->getStatusInfo(forceRead: true); + // Clear the cache as some table information might have gotten changed due to the user action. + $this->dbi->getCache()->clearTableCache(); + $showTable = $this->tableObj->getStatusInfo(); $tableInfoNunRows = $this->tableObj->getNumRows($showTable['Name']); if (is_string($showTable)) {