From dedd763d9de3f5aed2b192479bb96d7fc9833175 Mon Sep 17 00:00:00 2001 From: Damien Regad Date: Mon, 2 Mar 2026 18:41:33 +0100 Subject: Fix metaColummns() throwing exception Calling metaColumns() on a non-existing table triggers an unexpected Exception when using adodb-exceptions.inc.php. The method should just return false in this case. The problem was due to an incorrect evaluation of the table existence check's return value, resulting in unwanted execution of a SHOW COLUMNS statement which returned MySQL error 1146 (42S02): Table doesn't exist. Regression introduced by 5f589f64cea42c792929832cffe26825831f8c94 (see Issue #1016). Fixes #1212 --- drivers/adodb-mysqli.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/adodb-mysqli.inc.php b/drivers/adodb-mysqli.inc.php index a79467a3..9c681f17 100644 --- a/drivers/adodb-mysqli.inc.php +++ b/drivers/adodb-mysqli.inc.php @@ -1014,9 +1014,11 @@ class ADODB_mysqli extends ADOConnection { AND table_name='$table'"; $schemaArray = $this->getAssoc($SQL); - if (is_array($schemaArray)) { + if ($schemaArray) { $schemaArray = array_change_key_case($schemaArray,CASE_LOWER); $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table)); + } else { + $rs = false; } if (isset($savem)) $this->SetFetchMode($savem); -- cgit v1.3