From db2a41294c53ff761a022ae27641027c68508348 Mon Sep 17 00:00:00 2001 From: "hugh.li" Date: Mon, 4 Mar 2024 16:47:01 +0800 Subject: [PATCH] Remove use database The DSN information of pdo already contains the information of the default database, so there is no need to emphasize it again. --- src/Illuminate/Database/Connectors/MySqlConnector.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/Illuminate/Database/Connectors/MySqlConnector.php b/src/Illuminate/Database/Connectors/MySqlConnector.php index a7640859d77c..5d3d4da2d965 100755 --- a/src/Illuminate/Database/Connectors/MySqlConnector.php +++ b/src/Illuminate/Database/Connectors/MySqlConnector.php @@ -23,10 +23,6 @@ public function connect(array $config) // connection's behavior, and some might be specified by the developers. $connection = $this->createConnection($dsn, $config, $options); - if (! empty($config['database'])) { - $connection->exec("use `{$config['database']}`;"); - } - $this->configureIsolationLevel($connection, $config); $this->configureEncoding($connection, $config);