Fix #20275 - TOON export should use the normal user

Pull-request: #20175

Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes 2026-04-09 17:06:06 +02:00
parent 2c03905eea
commit 43fd19b79e
No known key found for this signature in database
GPG Key ID: 70684F4717D49A31

View File

@ -8,6 +8,7 @@ declare(strict_types=1);
namespace PhpMyAdmin\Plugins\Export;
use PhpMyAdmin\Config\Settings\Export;
use PhpMyAdmin\Dbal\ConnectionType;
use PhpMyAdmin\Export\StructureOrData;
use PhpMyAdmin\Http\ServerRequest;
use PhpMyAdmin\Plugins\ExportPlugin;
@ -95,7 +96,7 @@ class ExportToon extends ExportPlugin
$dbAlias = $this->getDbAlias($aliases, $db);
$tableAlias = $this->getTableAlias($aliases, $db, $table);
// use buffered query to get $rowsCnt
$result = $this->dbi->queryAsControlUser($sqlQuery);
$result = $this->dbi->query($sqlQuery, ConnectionType::User, unbuffered: false);
$columnsCnt = $result->numFields();
$rowsCnt = $result->numRows();