File tree 1 file changed +8
-10
lines changed
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 ) {
651
651
? 'SOURCE %s; '
652
652
: 'SET autocommit = 0; SET unique_checks = 0; SET foreign_key_checks = 0; SOURCE %s; COMMIT; ' ;
653
653
654
+ $ query = $ this ->get_sql_mode_query ( $ assoc_args ) . $ query ;
655
+
654
656
$ mysql_args ['execute ' ] = sprintf ( $ query , $ result_file );
655
657
} else {
656
658
$ result_file = 'STDIN ' ;
@@ -1834,16 +1836,12 @@ protected function get_current_sql_modes( $assoc_args ) {
1834
1836
1835
1837
// Make sure the provided arguments don't interfere with the expected
1836
1838
// 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
+ }
1847
1845
1848
1846
if ( null === $ modes ) {
1849
1847
$ modes = [];
You can’t perform that action at this time.
0 commit comments