File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -651,6 +651,8 @@ public function import( $args, $assoc_args ) {
651651 ? 'SOURCE %s; '
652652 : 'SET autocommit = 0; SET unique_checks = 0; SET foreign_key_checks = 0; SOURCE %s; COMMIT; ' ;
653653
654+ $ query = $ this ->get_sql_mode_query ( $ assoc_args ) . $ query ;
655+
654656 $ mysql_args ['execute ' ] = sprintf ( $ query , $ result_file );
655657 } else {
656658 $ result_file = 'STDIN ' ;
@@ -1834,16 +1836,12 @@ protected function get_current_sql_modes( $assoc_args ) {
18341836
18351837 // Make sure the provided arguments don't interfere with the expected
18361838 // output here.
1837- $ args = $ assoc_args ;
1838- unset(
1839- $ args ['column-names ' ],
1840- $ args ['result-format ' ],
1841- $ args ['json ' ],
1842- $ args ['html ' ],
1843- $ args ['table ' ],
1844- $ args ['tabbed ' ],
1845- $ args ['vertical ' ]
1846- );
1839+ $ args = [];
1840+ foreach ( [] as $ arg ) {
1841+ if ( isset ( $ assoc_args [ $ arg ] ) ) {
1842+ $ args [ $ arg ] = $ assoc_args [ $ arg ];
1843+ }
1844+ }
18471845
18481846 if ( null === $ modes ) {
18491847 $ modes = [];
You can’t perform that action at this time.
0 commit comments