Skip to content

Commit d654e9f

Browse files
swissspidyCopilot
andauthored
Update src/DB_Command.php
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c020721 commit d654e9f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/DB_Command.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2176,7 +2176,10 @@ protected function get_current_sql_modes( $assoc_args ) {
21762176
static $modes = null;
21772177

21782178
// Make sure the provided arguments don't interfere with the expected
2179-
// output here. We need to preserve all valid MySQL arguments for connection.
2179+
// output here, while preserving all valid MySQL connection arguments
2180+
// (including --defaults, --host, --port, --ssl-* options) so that SQL
2181+
// mode discovery connects to the database with the same configuration
2182+
// as the main query.
21802183
$args = self::get_mysql_args( $assoc_args );
21812184

21822185
if ( null === $modes ) {

0 commit comments

Comments
 (0)