diff --git a/bin/shard_prompt b/bin/shard_prompt index 4e93c55..ed2133f 100755 --- a/bin/shard_prompt +++ b/bin/shard_prompt @@ -26,7 +26,9 @@ die "config not found $config\n" unless ( -f $config ); if (-t STDIN) { MySQL::Sharding::Client::Prompt->new( yaml => $config )->run; } else { - MySQL::Sharding::Client::Output->new( yaml => $config )->execute(); + my $sql = ""; + $sql .= $_ while (<>); + MySQL::Sharding::Client::Output->new( yaml => $config )->execute($sql); }