2010-09-01 13:26:45 +00:00
|
|
|
### Test of #! -Y with file as input
|
|
|
|
Testing if -Y works
|
|
|
|
Yes it does
|
|
|
|
### Test of #! --shebang with file as input
|
|
|
|
Testing if --shebang works
|
|
|
|
Yes it does
|
|
|
|
### Test reading sql on command line
|
|
|
|
Test reading SQL from command line
|
|
|
|
Yes it does
|
|
|
|
### Test reading sql from file
|
|
|
|
Test reading SQL from file works
|
|
|
|
Yes it does
|
|
|
|
### Test dburl with username password host port
|
|
|
|
Test reading SQL from file works
|
|
|
|
Yes it does
|
2010-09-07 23:43:11 +00:00
|
|
|
### Test .sql/aliases
|
|
|
|
Test if .sql/aliases works
|
2010-09-01 13:26:45 +00:00
|
|
|
Yes it does
|
2011-03-09 15:23:53 +00:00
|
|
|
### Test sql:sql::alias
|
|
|
|
Test sql:sql::alias
|
|
|
|
Yes it works
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test --noheaders --no-headers -n
|
|
|
|
abc 1
|
|
|
|
def 3
|
|
|
|
abc 1
|
|
|
|
def 3
|
|
|
|
abc 1
|
|
|
|
def 3
|
|
|
|
### Test --sep -s
|
|
|
|
2 1
|
|
|
|
2 1
|
|
|
|
### Test --passthrough -p
|
|
|
|
<TABLE BORDER=1><TR><TH>id</TH><TH>data</TH></TR><TR><TD>1</TD><TD>abc</TD></TR><TR><TD>3</TD><TD>def</TD></TR></TABLE>
|
|
|
|
<TABLE BORDER=1><TR><TH>id</TH><TH>data</TH></TR><TR><TD>1</TD><TD>abc</TD></TR><TR><TD>3</TD><TD>def</TD></TR></TABLE>
|
|
|
|
### Test --html
|
|
|
|
<TABLE BORDER=1><TR><TH>id</TH><TH>data</TH></TR><TR><TD>1</TD><TD>abc</TD></TR><TR><TD>3</TD><TD>def</TD></TR></TABLE>
|
|
|
|
### Test --show-processlist|proclist|listproc
|
2010-09-07 23:43:11 +00:00
|
|
|
2 17
|
|
|
|
2 17
|
|
|
|
2 17
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test --db-size --dbsize
|
2020-10-22 19:47:01 +00:00
|
|
|
6
|
|
|
|
6
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test --table-size --tablesize
|
2022-08-19 21:42:55 +00:00
|
|
|
90
|
|
|
|
90
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test --debug
|
2020-08-29 20:12:46 +00:00
|
|
|
dburl mysql://tange:tange@localhost:3306/tange
|
|
|
|
databasedriver mysql user tange password tange host localhost port 3306 database tange query
|
2023-01-30 21:51:56 +00:00
|
|
|
[ | ((sleep 1; rm '/tmp/sql01-tmp/
|
2023-02-03 15:37:25 +00:00
|
|
|
`touch /tmp/tripwire` <"'"'"'tmpfile') & mysql --defaults-extra-file='/tmp/sql01-tmp/
|
|
|
|
`touch /tmp/tripwire` <"'"'"'tmpfile' --host=localhost --user=tange --port=3306 tange)]
|
2010-09-01 13:26:45 +00:00
|
|
|
Test if --debug works
|
|
|
|
Yes it does
|
|
|
|
### Test --version -V
|
2017-01-06 18:10:20 +00:00
|
|
|
13 74 535
|
|
|
|
13 74 535
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test -r
|
2010-09-10 00:26:01 +00:00
|
|
|
dburl pg://nongood@127.0.0.3:2227/
|
2016-07-22 16:10:28 +00:00
|
|
|
databasedriver pg user nongood password host 127.0.0.3 port 2227 database nongood query
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test --retries=s
|
2010-09-10 00:26:01 +00:00
|
|
|
dburl pg://nongood@127.0.0.3:2227/
|
2016-07-22 16:10:28 +00:00
|
|
|
databasedriver pg user nongood password host 127.0.0.3 port 2227 database nongood query
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2022-07-24 07:13:30 +00:00
|
|
|
[ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
|
2022-05-22 08:36:45 +00:00
|
|
|
psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
|
|
|
|
Is the server running on that host and accepting TCP/IP connections?
|
2010-09-01 13:26:45 +00:00
|
|
|
### Test --help -h
|
|
|
|
Usage:
|
|
|
|
sql [options] dburl [sqlcommand]
|
|
|
|
sql [options] dburl < sql_command_file
|
|
|
|
|
|
|
|
See 'man sql' for the options
|
|
|
|
Usage:
|
|
|
|
sql [options] dburl [sqlcommand]
|
|
|
|
sql [options] dburl < sql_command_file
|
|
|
|
|
|
|
|
See 'man sql' for the options
|