@@ -1196,12 +1196,12 @@ private function getTablePrivileges(DatabaseName $db, TableName $table): array
11961196 NOT (`Table_priv` = \'\' AND Column_priv = \'\')
11971197 ORDER BY `User` ASC, `Host` ASC, `Db` ASC, `Table_priv` ASC;
11981198 ' ;
1199- $ statement = $ this ->dbi ->prepare ($ query );
1200- if ($ statement === null || ! $ statement -> execute ([ $ db -> getName (), $ table -> getName ()]) ) {
1199+ $ result = $ this ->dbi ->executeQuery ($ query, [ $ db -> getName (), $ table -> getName ()] );
1200+ if ($ result === null ) {
12011201 return [];
12021202 }
12031203
1204- return $ statement -> getResult () ->fetchAllAssoc ();
1204+ return $ result ->fetchAllAssoc ();
12051205 }
12061206
12071207 /** @return array<int, array<string|null>> */
@@ -3171,12 +3171,11 @@ public function getFormForChangePassword(
31713171 private function getUserPrivileges (string $ user , string $ host , bool $ hasAccountLocking ): array |null
31723172 {
31733173 $ query = 'SELECT * FROM `mysql`.`user` WHERE `User` = ? AND `Host` = ?; ' ;
3174- $ statement = $ this ->dbi ->prepare ($ query );
3175- if ($ statement === null || ! $ statement -> execute ([ $ user , $ host ]) ) {
3174+ $ result = $ this ->dbi ->executeQuery ($ query, [ $ user , $ host ] );
3175+ if ($ result === null ) {
31763176 return null ;
31773177 }
31783178
3179- $ result = $ statement ->getResult ();
31803179 /** @var array<string, string|null>|null $userPrivileges */
31813180 $ userPrivileges = $ result ->fetchAssoc ();
31823181 if ($ userPrivileges === []) {
@@ -3190,12 +3189,11 @@ private function getUserPrivileges(string $user, string $host, bool $hasAccountL
31903189 $ userPrivileges ['account_locked ' ] = 'N ' ;
31913190
31923191 $ query = 'SELECT * FROM `mysql`.`global_priv` WHERE `User` = ? AND `Host` = ?; ' ;
3193- $ statement = $ this ->dbi ->prepare ($ query );
3194- if ($ statement === null || ! $ statement -> execute ([ $ user , $ host ]) ) {
3192+ $ result = $ this ->dbi ->executeQuery ($ query, [ $ user , $ host ] );
3193+ if ($ result === null ) {
31953194 return $ userPrivileges ;
31963195 }
31973196
3198- $ result = $ statement ->getResult ();
31993197 /** @var array<string, string|null>|null $globalPrivileges */
32003198 $ globalPrivileges = $ result ->fetchAssoc ();
32013199 if ($ globalPrivileges === []) {
0 commit comments