You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -57,6 +55,10 @@ protected function configure(): void
57
55
58
56
publicfunctionexecute(InputInterface$input, OutputInterface$output): int
59
57
{
58
+
if ($this->hasPipedInput()) {
59
+
thrownewRuntimeException('Instead of piping SQL to sql:cli, it is faster to use sql:connect. See the Examples at https://www.drush.org/latest/commands/sql_connect/#examples');
60
+
}
61
+
60
62
$sql = SqlBase::create($input->getOptions());
61
63
$program = $sql->command();
62
64
if (!self::programExists($program)) {
@@ -65,19 +67,25 @@ public function execute(InputInterface $input, OutputInterface $output): int
$this->logger->warning('It is slow to pass large amounts of data via stdin to the sql:cli command. See the Examples at https://www.drush.org/latest/commands/sql_cli/ for an alternative using sql:connect.');
70
-
// See https://github.com/symfony/symfony/issues/37835#issuecomment-674386588.
71
-
// If testing this will get input added by `CommandTester::setInputs` method.
0 commit comments