@@ -367,7 +367,7 @@ public function cli( $_, $assoc_args ) {
367
367
}
368
368
369
369
WP_CLI ::debug ( 'Associative arguments: ' . json_encode ( $ assoc_args ), 'db ' );
370
- self ::run ( $ command , $ assoc_args );
370
+ self ::run ( $ command , $ assoc_args, null , true );
371
371
}
372
372
373
373
/**
@@ -1480,6 +1480,9 @@ protected function run_query( $query, $assoc_args = [] ) {
1480
1480
* use.
1481
1481
* @param bool $send_to_shell Optional. Whether to send STDOUT and STDERR
1482
1482
* immediately to the shell. Defaults to true.
1483
+ * @param bool $interactive Optional. Whether MySQL is meant to be
1484
+ * executed as an interactive process. Defaults
1485
+ * to false.
1483
1486
*
1484
1487
* @return array {
1485
1488
* Associative array containing STDOUT and STDERR output.
@@ -1489,7 +1492,7 @@ protected function run_query( $query, $assoc_args = [] ) {
1489
1492
* @type int $exit_code Exit code of the process.
1490
1493
* }
1491
1494
*/
1492
- private static function run ( $ cmd , $ assoc_args = [], $ send_to_shell = true ) {
1495
+ private static function run ( $ cmd , $ assoc_args = [], $ send_to_shell = true , $ interactive = false ) {
1493
1496
$ required = [
1494
1497
'host ' => DB_HOST ,
1495
1498
'user ' => DB_USER ,
@@ -1513,7 +1516,7 @@ private static function run( $cmd, $assoc_args = [], $send_to_shell = true ) {
1513
1516
1514
1517
$ final_args = array_merge ( $ assoc_args , $ required );
1515
1518
1516
- return Utils \run_mysql_command ( $ cmd , $ final_args , null , $ send_to_shell );
1519
+ return Utils \run_mysql_command ( $ cmd , $ final_args , null , $ send_to_shell, $ interactive );
1517
1520
}
1518
1521
1519
1522
/**
0 commit comments