tiup client does not accept input on STDIN
Open
Nobody has claimed this yet.
type/feature-request
- Dominant language
- Go
- Stars
- 466
- Forks
- 338
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 8
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
tiup client does not accept input on STDIN. This makes it hard to use as a replacement for mysql with any scripting.
- What did you expect to see?
$ echo "show databases" | mysql
Database
INFORMATION_SCHEMA
METRICS_SCHEMA
PERFORMANCE_SCHEMA
mysql
test
- What did you see instead?
$ echo "show databases" | tiup client
Starting component `client`:
Connected with driver mysql (5.7.25-TiDB-v4.0.12)
- What version of TiUP are you using (
tiup --version)?
$ tiup --version
1.4.0 tiup
Go Version: go1.16.2
Git Ref: v1.4.0
GitHash: eb335e6ad9d0dc19d1c43db422cd409d62bc3cea
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the tiup client command entry point and trace how it reads input when invoked through STDIN. Verify the behavior with a piped show databases command; done means tiup client accepts piped SQL and produces query output like the reported mysql example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100