From 4403fb9f3e33ebfcf906ced3a9db9a9f1bc032e1 Mon Sep 17 00:00:00 2001 From: stephen waite Date: Tue, 6 Aug 2024 10:31:36 -0400 Subject: [PATCH 1/2] fix: use escape identifier instead of binds for sql upgrade migrate table engine --- src/Services/Utils/SQLUpgradeService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Services/Utils/SQLUpgradeService.php b/src/Services/Utils/SQLUpgradeService.php index d8a8ce1a0eb..c20c239f90c 100644 --- a/src/Services/Utils/SQLUpgradeService.php +++ b/src/Services/Utils/SQLUpgradeService.php @@ -1146,11 +1146,12 @@ private function getTablesList($arg = array()) * Convert table engine. * @param string $table * @param string $engine + * @param array $tables tables needing migration * ADODB will fail if there was an error during conversion */ private function MigrateTableEngine($table, $engine) { - $r = sqlStatement('ALTER TABLE `' . $table . '` ENGINE=?', [$engine]); + $r = sqlStatement('ALTER TABLE `' . $table . '` ENGINE=' . escape_identifier($engine, ['InnoDB'])); return true; } From c5e4faeb2c035c2bb2472ea7a7c45ec8a8e95abf Mon Sep 17 00:00:00 2001 From: stephen waite Date: Tue, 6 Aug 2024 10:33:03 -0400 Subject: [PATCH 2/2] remove testing --- src/Services/Utils/SQLUpgradeService.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Services/Utils/SQLUpgradeService.php b/src/Services/Utils/SQLUpgradeService.php index c20c239f90c..bcf21871319 100644 --- a/src/Services/Utils/SQLUpgradeService.php +++ b/src/Services/Utils/SQLUpgradeService.php @@ -1146,7 +1146,6 @@ private function getTablesList($arg = array()) * Convert table engine. * @param string $table * @param string $engine - * @param array $tables tables needing migration * ADODB will fail if there was an error during conversion */ private function MigrateTableEngine($table, $engine)