Oracle/23.4.0-Free in Vagrant: for GNU SQL testing.

This commit is contained in:
Ole Tange 2024-07-17 11:12:08 +02:00
parent eedb8b61b5
commit e5281f89c9
16 changed files with 349 additions and 266 deletions

25
src/sql
View file

@ -548,7 +548,7 @@ parse_options();
my $pass_through_options = (defined $::opt_p) ? join(" ",@{$::opt_p}) : ""; my $pass_through_options = (defined $::opt_p) ? join(" ",@{$::opt_p}) : "";
my $dburl_or_alias = shift; my $dburl_or_alias = shift;
if (not defined $dburl_or_alias) { Usage("No DBURL given"); exit -1; } if (not defined $dburl_or_alias) { usage("No DBURL given"); exit -1; }
my %dburl = parse_dburl(get_alias($dburl_or_alias)); my %dburl = parse_dburl(get_alias($dburl_or_alias));
my $interactive_command; my $interactive_command;
@ -716,7 +716,7 @@ sub parse_options {
"verbose|v" => \$::opt_verbose, "verbose|v" => \$::opt_verbose,
) || die_usage(); ) || die_usage();
if(defined $::opt_help) { die_usage(); } if(defined $::opt_help) { usage(); exit(0); }
if(defined $::opt_version) { version(); exit(0); } if(defined $::opt_version) { version(); exit(0); }
$Global::debug = $::opt_debug; $Global::debug = $::opt_debug;
} }
@ -1073,15 +1073,6 @@ sub find_command_in_path {
return $path; return $path;
} }
sub Usage {
if(@_) {
print "Error:\n";
print map{ "$_\n" } @_;
print "\n";
}
print "sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command]\n";
}
sub get_alias { sub get_alias {
my $alias = shift; my $alias = shift;
$alias =~ s/^(sql:)*//; # Accept aliases prepended with sql: $alias =~ s/^(sql:)*//; # Accept aliases prepended with sql:
@ -1134,7 +1125,7 @@ sub get_alias {
if($dburl) { if($dburl) {
return get_alias($dburl.$rest); return get_alias($dburl.$rest);
} else { } else {
Usage("$alias is not defined in @search"); usage("$alias is not defined in @search");
exit(-1); exit(-1);
} }
} }
@ -1199,7 +1190,7 @@ sub parse_dburl {
" port ", $options{port}, " database ", $options{database}, " port ", $options{port}, " database ", $options{database},
" query ",$options{query}, "\n"); " query ",$options{query}, "\n");
} else { } else {
Usage("$url is not a valid DBURL"); usage("$url is not a valid DBURL");
exit -1; exit -1;
} }
return %options; return %options;
@ -1262,9 +1253,13 @@ sub die_usage {
sub usage { sub usage {
# Returns: N/A # Returns: N/A
if(@_) {
print map{ "$Global::progname: Error: $_\n" } @_;
print "\n";
}
print "Usage:\n"; print "Usage:\n";
print "$Global::progname [options] dburl [sqlcommand]\n"; print "$Global::progname [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]\n";
print "$Global::progname [options] dburl < sql_command_file\n"; print "$Global::progname [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file\n";
print "\n"; print "\n";
print "See 'man $Global::progname' for the options\n"; print "See 'man $Global::progname' for the options\n";
} }

View file

@ -133,13 +133,12 @@ startvm:
stopvm: stopvm:
parallel -j0 --tag -k '${stop}' ::: ${namedservers} || true parallel -j0 --tag -k '${stop}' ::: ${namedservers} || true
stopdb:
cd vagrant-projects/OracleDatabase/23.4.0-Free; vagrant suspend
startdb: startdb:
true TODO should start Oracle in vagrant cd vagrant-projects/OracleDatabase/23.4.0-Free; vagrant up
startdb-old: sql oracle://SYSTEM:$$VM_ORACLE_PWD@/FREE "select 'Oracle is running' from dual;"
#echo shutdown abort | sudo su - oracle -c "sqlplus / as sysdba"
sudo parallel /etc/init.d/{} status '||' /etc/init.d/{} restart ::: postgresql mysql # oracle-xe
VBoxManage startvm OracleXE || true
parallel 'ping {} | read' ::: oracle11.tange.dk
### Distribution ### Distribution
installparallel: ../src/parallel installparallel: ../src/parallel

View file

@ -137,15 +137,13 @@ install_oracle_client() {
# TODO set up vagrant oracle server # TODO set up vagrant oracle server
git clone https://github.com/oracle/vagrant-projects.git git clone https://github.com/oracle/vagrant-projects.git
( (
cd vagrant-projects/OracleDatabase/21.3.0-XE cd vagrant-projects/OracleDatabase/23.4.0-Free
export VM_ORACLE_PWD=`goodpasswd` echo export VM_ORACLE_PWD=`goodpasswd` >> ~/.passwords
echo export VM_ORACLE_PWD="$VM_ORACLE_PWD" >> ~/.passwords . ~/.passwords
vagrant up vagrant up
) )
# TODO set up default passwd # test it works:
echo sudo su - oracle -c "'/home/oracle/setPassword.sh $oracle_password'" | sql --showtables oracle://SYSTEM:$VM_ORACLE_PWD@/FREE
vagrant ssh
# test it works: sql oracle://
} }
setup_databases() { setup_databases() {

View file

@ -514,24 +514,6 @@ par_race_condition1() {
rm /tmp/parallel_race_cond rm /tmp/parallel_race_cond
} }
par__memory_leak() {
a_run() {
seq $1 |time -v parallel true 2>&1 |
grep 'Maximum resident' |
field 6;
}
export -f a_run
echo "### Test for memory leaks"
echo "Of 300 runs of 1 job at least one should be bigger than a 3000 job run"
. env_parallel.bash
parset small_max,big ::: 'seq 300 | parallel a_run 1 | jq -s max' 'a_run 3000'
if [ $small_max -lt $big ] ; then
echo "Bad: Memleak likely."
else
echo "Good: No memleak detected."
fi
}
par_slow_total_jobs() { par_slow_total_jobs() {
echo 'bug #51006: Slow total_jobs() eats job' echo 'bug #51006: Slow total_jobs() eats job'
(echo a; sleep 15; echo b; sleep 15; seq 2) | (echo a; sleep 15; echo b; sleep 15; seq 2) |

View file

@ -1541,7 +1541,7 @@ line2"' 'echo "command2"'
) | replace_tmpdir ) | replace_tmpdir
} }
par_parset2() { par__parset2() {
echo '### parset into array' echo '### parset into array'
( (
. `which env_parallel.bash` . `which env_parallel.bash`

View file

@ -0,0 +1,33 @@
#!/bin/bash
# SPDX-FileCopyrightText: 2021-2024 Ole Tange, http://ole.tange.dk and Free Software and Foundation, Inc.
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Simple jobs that never fails
# Each should be taking 30-100s and be possible to run in parallel
# I.e.: No race conditions, no logins
par__memory_leak() {
a_run() {
seq $1 |time -v parallel true 2>&1 |
grep 'Maximum resident' |
field 6;
}
export -f a_run
echo "### Test for memory leaks"
echo "Of 300 runs of 1 job at least one should be bigger than a 3000 job run"
. env_parallel.bash
parset small_max,big ::: 'seq 300 | parallel a_run 1 | jq -s max' 'a_run 3000'
# Perl 5.38.2 has a small leak (~300KB) - not present in 5.2X.X
# TODO find out which perl version introduces this
echo "`date` [ $small_max < $big ]" >> /tmp/parallel-mem-leak.log
if [ $(($small_max+500)) -lt $big ] ; then
echo "Bad: Memleak likely. [ $small_max < $big ]"
else
echo "Good: No memleak detected."
fi
}
export -f $(compgen -A function | grep par_)
compgen -A function | G par_ "$@" | sort |
parallel --delay 0.3 --timeout 300% -j6 --lb --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1'

View file

@ -63,7 +63,6 @@ EOF
sql $MYSQL_TEST_DBURL/sqlunittest <"$unittest" sql $MYSQL_TEST_DBURL/sqlunittest <"$unittest"
} }
testtable() { testtable() {
tbl=$1 tbl=$1
cat <<EOF cat <<EOF
@ -97,7 +96,7 @@ par_sql_aliases() {
sql sql:sql::sqlunittest "SELECT 'Yes it works' as 'Test sql:sql::alias';" sql sql:sql::sqlunittest "SELECT 'Yes it works' as 'Test sql:sql::alias';"
} }
par_noheaders() { par__noheaders() {
echo "### Test --noheaders --no-headers -n" echo "### Test --noheaders --no-headers -n"
testtable noheader | sql "$DBURL" testtable noheader | sql "$DBURL"
sql -n "$DBURL" 'select * from noheader order by id' | sql -n "$DBURL" 'select * from noheader order by id' |
@ -108,7 +107,7 @@ par_noheaders() {
parallel -k --colsep '\t' echo {2} {1} parallel -k --colsep '\t' echo {2} {1}
} }
par_--sep() { par_sep() {
echo "### Test --sep -s"; echo "### Test --sep -s";
sql --no-headers -s : pg:/// 'select 1,2' | sql --no-headers -s : pg:/// 'select 1,2' |
parallel --colsep ':' echo {2} {1} parallel --colsep ':' echo {2} {1}
@ -116,7 +115,7 @@ par_--sep() {
parallel --colsep ':' echo {2} {1} parallel --colsep ':' echo {2} {1}
} }
par_--passthrough() { par_passthrough() {
echo "### Test --passthrough -p"; echo "### Test --passthrough -p";
testtable passthrough | sql "$DBURL" testtable passthrough | sql "$DBURL"
sql -p -H "$DBURL" 'select * from passthrough' sql -p -H "$DBURL" 'select * from passthrough'
@ -125,14 +124,14 @@ par_--passthrough() {
echo echo
} }
par_--html() { par_html() {
echo "### Test --html"; echo "### Test --html";
testtable html | sql "$DBURL" testtable html | sql "$DBURL"
sql --html "$DBURL" 'select * from html' sql --html "$DBURL" 'select * from html'
echo echo
} }
par_listproc() { par__listproc() {
echo "### Test --show-processlist|proclist|listproc"; echo "### Test --show-processlist|proclist|listproc";
# Take the minimum of 3 runs to avoid error counting # Take the minimum of 3 runs to avoid error counting
# if one of the other jobs happens to be running # if one of the other jobs happens to be running
@ -153,43 +152,40 @@ par_listproc() {
) | sort | head -n1 ) | sort | head -n1
} }
par_dbsize() { par__dbsize() {
echo "### Test --db-size --dbsize"; echo "### Test --db-size --dbsize";
sql --dbsize "$DBURL" | wc -w sql --dbsize "$DBURL" | wc -w
sql --db-size "$DBURL" | wc -w sql --db-size "$DBURL" | wc -w
} }
par_tablesize() { par__tablesize() {
echo "### Test --table-size --tablesize" echo "### Test --table-size --tablesize"
sql --showtables "$DBURL" | grep TBL | parallel sql "$DBURL" drop table sql --showtables "$DBURL" | grep TBL | parallel sql "$DBURL" drop table
sql --tablesize "$DBURL" | wc -l sql --tablesize "$DBURL" | wc -l
sql --table-size "$DBURL" | wc -l sql --table-size "$DBURL" | wc -l
} }
par_--debug() { par_debug() {
echo "### Test --debug" echo "### Test --debug"
stdout sql --debug "$DBURL" "SELECT 'Yes it does' as 'Test if --debug works';" | stdout sql --debug "$DBURL" "SELECT 'Yes it does' as 'Test if --debug works';" |
replace_tmpdir | replace_tmpdir |
perl -pe 's:/...........sql:/tmpfile:g' perl -pe 's:/...........sql:/tmpfile:g'
} }
par_-_version() { par_version() {
echo "### Test --version -V" echo "### Test --version -V"
sql --version | wc sql --version | wc
sql -V | wc sql -V | wc
} }
par_-r() { par_retry() {
echo "### Test -r - retry 3 times" echo "### Test -r - retry 3 times"
stdout sql -r --debug pg://nongood@127.0.0.3:2227/ "SELECT 'This should fail 3 times';" stdout sql -r --debug pg://nongood@127.0.0.3:2227/ "SELECT 'This should fail 3 times';"
}
par_--retries() {
echo "### Test --retries=s" echo "### Test --retries=s"
stdout sql --retries=4 --debug pg://nongood@127.0.0.3:2227/ "SELECT 'This should fail 4 times';" stdout sql --retries=4 --debug pg://nongood@127.0.0.3:2227/ "SELECT 'This should fail 4 times';"
} }
par_--help() { par_help() {
echo "### Test --help -h" echo "### Test --help -h"
sql --help sql --help
sql -h sql -h
@ -198,4 +194,4 @@ par_--help() {
export -f $(compgen -A function | grep par_) export -f $(compgen -A function | grep par_)
compgen -A function | G par_ "$@" | LC_ALL=C sort | compgen -A function | G par_ "$@" | LC_ALL=C sort |
parallel --timeout 10 -j0 --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1' parallel --timeout 1000% -j0 --tag -k --joblog /tmp/jl-`basename $0` '{} 2>&1'

View file

@ -84,7 +84,7 @@ par_test_dburl_colon() {
par_multiarg_on_command_line() { par_multiarg_on_command_line() {
echo "### Test oracle with multiple arguments on the command line" echo "### Test oracle with multiple arguments on the command line"
echo ":oraunittest oracle://hr:hr@oracle11.tange.dk/xe" >> ~/.sql/aliases echo ":oraunittest oracle://SYSTEM:$VM_ORACLE_PWD@/FREE" >> ~/.sql/aliases
uniqify ~/.sql/aliases uniqify ~/.sql/aliases
sql :oraunittest "WHENEVER SQLERROR EXIT FAILURE" "SELECT 'arg2' FROM DUAL;" "SELECT 'arg3' FROM DUAL;" sql :oraunittest "WHENEVER SQLERROR EXIT FAILURE" "SELECT 'arg2' FROM DUAL;" "SELECT 'arg3' FROM DUAL;"
} }
@ -106,7 +106,11 @@ par_showdatabases() {
par_listproc() { par_listproc() {
echo "### Test --listproc" echo "### Test --listproc"
sql --listproc :oraunittest sql --listproc :oraunittest |
perl -ne '/select 1 from dual|user_objects|user_tablespaces|connect_by_filtering/ and next;
s/[21]\.\d+/1.99999/;
s/ +/ /g;
print'
sql --listproc $MYSQL_TEST_DBURL | sql --listproc $MYSQL_TEST_DBURL |
perl -pe 's/^\d+/XXX/' perl -pe 's/^\d+/XXX/'
} }

View file

@ -1527,9 +1527,6 @@ par__groupby_pipepart csv , s/^(\d+[\t ,]+){2}(\d+).*/$2/ NewRec
par__groupby_pipepart csv , s/^(\d+[\t ,]+){2}(\d+).*/$2/ 90001 90001 1170031 par__groupby_pipepart csv , s/^(\d+[\t ,]+){2}(\d+).*/$2/ 90001 90001 1170031
par__keeporder_roundrobin bug #50081: --keep-order --round-robin should give predictable results par__keeporder_roundrobin bug #50081: --keep-order --round-robin should give predictable results
par__keeporder_roundrobin OK par__keeporder_roundrobin OK
par__memory_leak ### Test for memory leaks
par__memory_leak Of 300 runs of 1 job at least one should be bigger than a 3000 job run
par__memory_leak Good: No memleak detected.
par__plus_dyn_repl Dynamic replacement strings defined by --plus par__plus_dyn_repl Dynamic replacement strings defined by --plus
par__plus_dyn_repl myval par__plus_dyn_repl myval
par__plus_dyn_repl myval par__plus_dyn_repl myval

View file

@ -254,6 +254,57 @@ par__argfile_plus 2 11 6
par__argfile_plus 3 12 4 par__argfile_plus 3 12 4
par__argfile_plus 3 12 5 par__argfile_plus 3 12 5
par__argfile_plus 3 12 6 par__argfile_plus 3 12 6
par__parset2 ### parset into array
par__parset2 foo bar baz
par__parset2 foo bar baz
par__parset2 ### parset into vars with comma
par__parset2 foo bar baz
par__parset2 foo bar baz
par__parset2 ### parset into vars with space
par__parset2 foo bar baz
par__parset2 foo bar baz
par__parset2 ### parset with newlines
par__parset2 1 1 2 1 2 3
par__parset2 1
par__parset2 1
par__parset2 2
par__parset2 1
par__parset2 2
par__parset2 3
par__parset2 ### parset into indexed array vars
par__parset2 foo bar baz
par__parset2 foo bar baz
par__parset2 foo bar bar
par__parset2 foo bar bar
par__parset2 ### env_parset
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 newline1 newline2 1 newline1 newline2 1 2 newline1 newline2 1 2 3
par__parset2 newline1
par__parset2 newline2
par__parset2 1
par__parset2 newline1
par__parset2 newline2
par__parset2 1
par__parset2 2
par__parset2 newline1
par__parset2 newline2
par__parset2 1
par__parset2 2
par__parset2 3
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 bar
par__parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 bar
par__parset2 bug #52507: parset arr1 -v echo ::: fails
par__parset2 seq 3
par__parset2 1
par__parset2 2
par__parset2 3
par__parset_assoc_arr bash@lo parset into an assoc array par__parset_assoc_arr bash@lo parset into an assoc array
par__parset_assoc_arr bash@lo val 1 val 2 val 3 par__parset_assoc_arr bash@lo val 1 val 2 val 3
par__parset_assoc_arr bash@lo val 1 val 2 val 3 par__parset_assoc_arr bash@lo val 1 val 2 val 3
@ -630,7 +681,7 @@ par__test_cpu_detection_topology 1 4 8 4
par__test_cpu_detection_topology 1-2-4-2 ThinkPad A475 AMD PRO A12-8830B R7 (64g) par__test_cpu_detection_topology 1-2-4-2 ThinkPad A475 AMD PRO A12-8830B R7 (64g)
par__test_cpu_detection_topology 1 2 4 2 par__test_cpu_detection_topology 1 2 4 2
par__test_cpu_detection_topology 1-16-24-16 8*2 thr + 8*1 thr Intel Core i7-13700HX (user submit) par__test_cpu_detection_topology 1-16-24-16 8*2 thr + 8*1 thr Intel Core i7-13700HX (user submit)
par__test_cpu_detection_topology 1 4 8 4 par__test_cpu_detection_topology 1 2 4 2
par_children_receive_sig ### Do children receive --termseq signals par_children_receive_sig ### Do children receive --termseq signals
par_children_receive_sig parallel: Warning: This job was killed because it timed out: par_children_receive_sig parallel: Warning: This job was killed because it timed out:
par_children_receive_sig parallel: Warning: show_signals '' par_children_receive_sig parallel: Warning: show_signals ''
@ -851,57 +902,6 @@ par_parset 9
par_parset Commands with newline require -0 par_parset Commands with newline require -0
par_parset line1 par_parset line1
par_parset line2 par_parset line2
par_parset2 ### parset into array
par_parset2 foo bar baz
par_parset2 foo bar baz
par_parset2 ### parset into vars with comma
par_parset2 foo bar baz
par_parset2 foo bar baz
par_parset2 ### parset into vars with space
par_parset2 foo bar baz
par_parset2 foo bar baz
par_parset2 ### parset with newlines
par_parset2 1 1 2 1 2 3
par_parset2 1
par_parset2 1
par_parset2 2
par_parset2 1
par_parset2 2
par_parset2 3
par_parset2 ### parset into indexed array vars
par_parset2 foo bar baz
par_parset2 foo bar baz
par_parset2 foo bar bar
par_parset2 foo bar bar
par_parset2 ### env_parset
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 newline1 newline2 1 newline1 newline2 1 2 newline1 newline2 1 2 3
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 2
par_parset2 newline1
par_parset2 newline2
par_parset2 1
par_parset2 2
par_parset2 3
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 baz
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 bar
par_parset2 myecho myvar myarr 1 foo myecho myvar myarr 1 bar myecho myvar myarr 1 bar
par_parset2 bug #52507: parset arr1 -v echo ::: fails
par_parset2 seq 3
par_parset2 1
par_parset2 2
par_parset2 3
par_pipe_regexp ### --pipe --regexp par_pipe_regexp ### --pipe --regexp
par_pipe_regexp Record par_pipe_regexp Record
par_pipe_regexp A2, Start, 5 par_pipe_regexp A2, Start, 5

View file

@ -0,0 +1,3 @@
par__memory_leak ### Test for memory leaks
par__memory_leak Of 300 runs of 1 job at least one should be bigger than a 3000 job run
par__memory_leak Good: No memleak detected.

View file

@ -2,18 +2,24 @@ CSV do_dburl CSV
CSV par_append p_wrapper par_append $CSV CSV par_append p_wrapper par_append $CSV
CSV par_append Exit=0 CSV par_append Exit=0
CSV par_append Exit=0 CSV par_append Exit=0
CSV par_append Error: CSV par_append sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_append csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_append CSV par_append
CSV par_append sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_append Usage:
CSV par_append sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_append sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_append
CSV par_append See 'man sql' for the options
CSV par_empty p_wrapper par_empty $CSV CSV par_empty p_wrapper par_empty $CSV
CSV par_empty Do nothing: TBL99999 does not exist because it is not created CSV par_empty Do nothing: TBL99999 does not exist because it is not created
CSV par_empty Exit=0 CSV par_empty Exit=0
CSV par_empty Exit=0 CSV par_empty Exit=0
CSV par_empty Error: CSV par_empty sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_empty csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_empty CSV par_empty
CSV par_empty sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_empty Usage:
CSV par_empty sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_empty sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_empty
CSV par_empty See 'man sql' for the options
CSV par_no_table p_wrapper par_no_table $CSV CSV par_no_table p_wrapper par_no_table $CSV
CSV par_no_table bug #50018: --dburl without table dies CSV par_no_table bug #50018: --dburl without table dies
CSV par_no_table 255 CSV par_no_table 255
@ -21,10 +27,13 @@ CSV par_no_table 255
CSV par_no_table 255 CSV par_no_table 255
CSV par_no_table Exit=0 CSV par_no_table Exit=0
CSV par_no_table Exit=0 CSV par_no_table Exit=0
CSV par_no_table Error: CSV par_no_table sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_no_table csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_no_table CSV par_no_table
CSV par_no_table sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_no_table Usage:
CSV par_no_table sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_no_table sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_no_table
CSV par_no_table See 'man sql' for the options
CSV par_no_table parallel: Error: The DBURL (csv:///%2Frun%2Fshm) must contain a table. CSV par_no_table parallel: Error: The DBURL (csv:///%2Frun%2Fshm) must contain a table.
CSV par_no_table parallel: Error: The DBURL (csv:///%2Frun%2Fshm) must contain a table. CSV par_no_table parallel: Error: The DBURL (csv:///%2Frun%2Fshm) must contain a table.
CSV par_no_table parallel: Error: The DBURL (csv:///%2Frun%2Fshm) must contain a table. CSV par_no_table parallel: Error: The DBURL (csv:///%2Frun%2Fshm) must contain a table.
@ -56,10 +65,13 @@ CSV par_shuf 5 d
CSV par_shuf 5 e CSV par_shuf 5 e
CSV par_shuf Exit=0 CSV par_shuf Exit=0
CSV par_shuf Exit=0 CSV par_shuf Exit=0
CSV par_shuf Error: CSV par_shuf sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_shuf csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_shuf CSV par_shuf
CSV par_shuf sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_shuf Usage:
CSV par_shuf sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_shuf sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_shuf
CSV par_shuf See 'man sql' for the options
CSV par_sql_joblog p_wrapper par_sql_joblog $CSV CSV par_sql_joblog p_wrapper par_sql_joblog $CSV
CSV par_sql_joblog ### should only give a single --joblog heading CSV par_sql_joblog ### should only give a single --joblog heading
CSV par_sql_joblog ### --sqlmaster/--sqlworker CSV par_sql_joblog ### --sqlmaster/--sqlworker
@ -168,73 +180,103 @@ CSV par_sql_joblog 24 : 999.999 999.999 0 0 0 0 sleep .3;echo 5 d
CSV par_sql_joblog 25 : 999.999 999.999 0 0 0 0 sleep .3;echo 5 e CSV par_sql_joblog 25 : 999.999 999.999 0 0 0 0 sleep .3;echo 5 e
CSV par_sql_joblog Exit=0 CSV par_sql_joblog Exit=0
CSV par_sql_joblog Exit=0 CSV par_sql_joblog Exit=0
CSV par_sql_joblog Error: CSV par_sql_joblog sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sql_joblog csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sql_joblog CSV par_sql_joblog
CSV par_sql_joblog sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sql_joblog Usage:
CSV par_sql_joblog sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sql_joblog sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sql_joblog
CSV par_sql_joblog See 'man sql' for the options
CSV par_sqlandworker p_wrapper par_sqlandworker $CSV CSV par_sqlandworker p_wrapper par_sqlandworker $CSV
CSV par_sqlandworker Exit=0 CSV par_sqlandworker Exit=0
CSV par_sqlandworker Exit=0 CSV par_sqlandworker Exit=0
CSV par_sqlandworker Error: CSV par_sqlandworker sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker CSV par_sqlandworker
CSV par_sqlandworker sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker Usage:
CSV par_sqlandworker sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker
CSV par_sqlandworker See 'man sql' for the options
CSV par_sqlandworker_compress_linebuffer_tag p_wrapper par_sqlandworker_compress_linebuffer_tag $CSV CSV par_sqlandworker_compress_linebuffer_tag p_wrapper par_sqlandworker_compress_linebuffer_tag $CSV
CSV par_sqlandworker_compress_linebuffer_tag Exit=0 CSV par_sqlandworker_compress_linebuffer_tag Exit=0
CSV par_sqlandworker_compress_linebuffer_tag Exit=0 CSV par_sqlandworker_compress_linebuffer_tag Exit=0
CSV par_sqlandworker_compress_linebuffer_tag Error: CSV par_sqlandworker_compress_linebuffer_tag sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_compress_linebuffer_tag csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_compress_linebuffer_tag CSV par_sqlandworker_compress_linebuffer_tag
CSV par_sqlandworker_compress_linebuffer_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_compress_linebuffer_tag Usage:
CSV par_sqlandworker_compress_linebuffer_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_compress_linebuffer_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_compress_linebuffer_tag
CSV par_sqlandworker_compress_linebuffer_tag See 'man sql' for the options
CSV par_sqlandworker_linebuffer p_wrapper par_sqlandworker_linebuffer $CSV CSV par_sqlandworker_linebuffer p_wrapper par_sqlandworker_linebuffer $CSV
CSV par_sqlandworker_linebuffer Exit=0 CSV par_sqlandworker_linebuffer Exit=0
CSV par_sqlandworker_linebuffer Exit=0 CSV par_sqlandworker_linebuffer Exit=0
CSV par_sqlandworker_linebuffer Error: CSV par_sqlandworker_linebuffer sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_linebuffer csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_linebuffer CSV par_sqlandworker_linebuffer
CSV par_sqlandworker_linebuffer sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_linebuffer Usage:
CSV par_sqlandworker_linebuffer sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_linebuffer sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_linebuffer
CSV par_sqlandworker_linebuffer See 'man sql' for the options
CSV par_sqlandworker_linebuffer_tag p_wrapper par_sqlandworker_linebuffer_tag $CSV CSV par_sqlandworker_linebuffer_tag p_wrapper par_sqlandworker_linebuffer_tag $CSV
CSV par_sqlandworker_linebuffer_tag Exit=0 CSV par_sqlandworker_linebuffer_tag Exit=0
CSV par_sqlandworker_linebuffer_tag Exit=0 CSV par_sqlandworker_linebuffer_tag Exit=0
CSV par_sqlandworker_linebuffer_tag Error: CSV par_sqlandworker_linebuffer_tag sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_linebuffer_tag csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_linebuffer_tag CSV par_sqlandworker_linebuffer_tag
CSV par_sqlandworker_linebuffer_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_linebuffer_tag Usage:
CSV par_sqlandworker_linebuffer_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_linebuffer_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_linebuffer_tag
CSV par_sqlandworker_linebuffer_tag See 'man sql' for the options
CSV par_sqlandworker_lo p_wrapper par_sqlandworker_lo $CSV CSV par_sqlandworker_lo p_wrapper par_sqlandworker_lo $CSV
CSV par_sqlandworker_lo Exit=0 CSV par_sqlandworker_lo Exit=0
CSV par_sqlandworker_lo Exit=0 CSV par_sqlandworker_lo Exit=0
CSV par_sqlandworker_lo Error: CSV par_sqlandworker_lo sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_lo csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_lo CSV par_sqlandworker_lo
CSV par_sqlandworker_lo sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_lo Usage:
CSV par_sqlandworker_lo sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_lo sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_lo
CSV par_sqlandworker_lo See 'man sql' for the options
CSV par_sqlandworker_results p_wrapper par_sqlandworker_results $CSV CSV par_sqlandworker_results p_wrapper par_sqlandworker_results $CSV
CSV par_sqlandworker_results Exit=0 CSV par_sqlandworker_results Exit=0
CSV par_sqlandworker_results Exit=0 CSV par_sqlandworker_results Exit=0
CSV par_sqlandworker_results Error: CSV par_sqlandworker_results sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_results csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_results CSV par_sqlandworker_results
CSV par_sqlandworker_results sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_results Usage:
CSV par_sqlandworker_results sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_results sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_results
CSV par_sqlandworker_results See 'man sql' for the options
CSV par_sqlandworker_tag p_wrapper par_sqlandworker_tag $CSV CSV par_sqlandworker_tag p_wrapper par_sqlandworker_tag $CSV
CSV par_sqlandworker_tag Exit=0 CSV par_sqlandworker_tag Exit=0
CSV par_sqlandworker_tag Exit=0 CSV par_sqlandworker_tag Exit=0
CSV par_sqlandworker_tag Error: CSV par_sqlandworker_tag sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_tag csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_tag CSV par_sqlandworker_tag
CSV par_sqlandworker_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_tag Usage:
CSV par_sqlandworker_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_tag sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_tag
CSV par_sqlandworker_tag See 'man sql' for the options
CSV par_sqlandworker_total_jobs p_wrapper par_sqlandworker_total_jobs $CSV CSV par_sqlandworker_total_jobs p_wrapper par_sqlandworker_total_jobs $CSV
CSV par_sqlandworker_total_jobs Exit=0 CSV par_sqlandworker_total_jobs Exit=0
CSV par_sqlandworker_total_jobs Exit=0 CSV par_sqlandworker_total_jobs Exit=0
CSV par_sqlandworker_total_jobs Error: CSV par_sqlandworker_total_jobs sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_total_jobs csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_total_jobs CSV par_sqlandworker_total_jobs
CSV par_sqlandworker_total_jobs sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_total_jobs Usage:
CSV par_sqlandworker_total_jobs sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_total_jobs sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_total_jobs
CSV par_sqlandworker_total_jobs See 'man sql' for the options
CSV par_sqlandworker_unbuffer p_wrapper par_sqlandworker_unbuffer $CSV CSV par_sqlandworker_unbuffer p_wrapper par_sqlandworker_unbuffer $CSV
CSV par_sqlandworker_unbuffer Exit=0 CSV par_sqlandworker_unbuffer Exit=0
CSV par_sqlandworker_unbuffer Exit=0 CSV par_sqlandworker_unbuffer Exit=0
CSV par_sqlandworker_unbuffer Error: CSV par_sqlandworker_unbuffer sql: Error: csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_unbuffer csv:///%2Frun%2Fshm is not a valid DBURL
CSV par_sqlandworker_unbuffer CSV par_sqlandworker_unbuffer
CSV par_sqlandworker_unbuffer sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] CSV par_sqlandworker_unbuffer Usage:
CSV par_sqlandworker_unbuffer sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
CSV par_sqlandworker_unbuffer sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
CSV par_sqlandworker_unbuffer
CSV par_sqlandworker_unbuffer See 'man sql' for the options
INFLUX do_dburl INFLUX INFLUX do_dburl INFLUX
INFLUX par_append p_wrapper par_append $INFLUX INFLUX par_append p_wrapper par_append $INFLUX
INFLUX par_append Exit=255 INFLUX par_append Exit=255

View file

@ -1,9 +1,12 @@
par_few_duplicate_run $CSV par_few_duplicate_run $CSV par_few_duplicate_run $CSV par_few_duplicate_run $CSV
par_few_duplicate_run $CSV ### With many workers there will be some duplicates par_few_duplicate_run $CSV ### With many workers there will be some duplicates
par_few_duplicate_run $CSV Error: par_few_duplicate_run $CSV sql: Error: csv:///%2Frun%2Fshm%2Fcsv is not a valid DBURL
par_few_duplicate_run $CSV csv:///%2Frun%2Fshm%2Fcsv is not a valid DBURL
par_few_duplicate_run $CSV par_few_duplicate_run $CSV
par_few_duplicate_run $CSV sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] par_few_duplicate_run $CSV Usage:
par_few_duplicate_run $CSV sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
par_few_duplicate_run $CSV sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
par_few_duplicate_run $CSV
par_few_duplicate_run $CSV See 'man sql' for the options
par_few_duplicate_run $CSV OK par_few_duplicate_run $CSV OK
par_few_duplicate_run $MYSQL par_few_duplicate_run $MYSQL par_few_duplicate_run $MYSQL par_few_duplicate_run $MYSQL
par_few_duplicate_run $MYSQL ### With many workers there will be some duplicates par_few_duplicate_run $MYSQL ### With many workers there will be some duplicates

View file

@ -976,9 +976,11 @@ foo quuz
bar baz bar baz
bar quuz bar quuz
sql $DBURL 'SELECT * FROM mytable ORDER BY Seq;' sql $DBURL 'SELECT * FROM mytable ORDER BY Seq;'
Error: sql: Error: SELECT * FROM mytable ORDER BY Seq; is not a valid DBURL
SELECT * FROM mytable ORDER BY Seq; is not a valid DBURL Usage:
sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
See 'man sql' for the options
parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlmaster $DBURLTABLE echo ::: foo bar ::: baz quuz
parallel: Error: echo is not a valid DBURL parallel: Error: echo is not a valid DBURL
parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz parallel --sqlworker $DBURLTABLE echo ::: foo bar ::: baz quuz

View file

@ -1,78 +1,78 @@
par_--debug ### Test --debug par__dbsize ### Test --db-size --dbsize
par_--debug dburl mysql://tange:tange@/ par__dbsize 6
par_--debug databasedriver mysql user tange password tange host port database tange query par__dbsize 6
par_--debug [ | ((sleep 1; rm /TMP/tmpfile') & mysql --defaults-extra-file=/TMP/tmpfile' --user=tange tange)] par__listproc ### Test --show-processlist|proclist|listproc
par_--debug Test if --debug works par__listproc 2 17
par_--debug Yes it does par__listproc 2 17
par_--help ### Test --help -h par__listproc 2 17
par_--help Usage: par__noheaders ### Test --noheaders --no-headers -n
par_--help sql [options] dburl [sqlcommand] par__noheaders abc 1
par_--help sql [options] dburl < sql_command_file par__noheaders def 3
par_--help par__noheaders abc 1
par_--help See 'man sql' for the options par__noheaders def 3
par_--help Usage: par__noheaders abc 1
par_--help sql [options] dburl [sqlcommand] par__noheaders def 3
par_--help sql [options] dburl < sql_command_file par__tablesize ### Test --table-size --tablesize
par_--help par__tablesize 93
par_--help See 'man sql' for the options par__tablesize 93
par_--html ### Test --html
par_--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>
par_--passthrough ### Test --passthrough -p
par_--passthrough <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>
par_--passthrough <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>
par_--retries ### Test --retries=s
par_--retries dburl pg://nongood@127.0.0.3:2227/
par_--retries databasedriver pg user nongood password host 127.0.0.3 port 2227 database nongood query
par_--retries [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_--retries psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_--retries Is the server running on that host and accepting TCP/IP connections?
par_--retries [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_--retries psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_--retries Is the server running on that host and accepting TCP/IP connections?
par_--retries [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_--retries psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_--retries Is the server running on that host and accepting TCP/IP connections?
par_--retries [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_--retries psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_--retries Is the server running on that host and accepting TCP/IP connections?
par_--sep ### Test --sep -s
par_--sep 2 1
par_--sep 2 1
par_-_version ### Test --version -V
par_-_version 13 74 535
par_-_version 13 74 535
par_-r ### Test -r - retry 3 times
par_-r dburl pg://nongood@127.0.0.3:2227/
par_-r databasedriver pg user nongood password host 127.0.0.3 port 2227 database nongood query
par_-r [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_-r psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_-r Is the server running on that host and accepting TCP/IP connections?
par_-r [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_-r psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_-r Is the server running on that host and accepting TCP/IP connections?
par_-r [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_-r psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_-r Is the server running on that host and accepting TCP/IP connections?
par_dbsize ### Test --db-size --dbsize
par_dbsize 6
par_dbsize 6
par_dburl_user_password_host_port ### Test dburl with username password host port par_dburl_user_password_host_port ### Test dburl with username password host port
par_dburl_user_password_host_port Test dburl with username password host port par_dburl_user_password_host_port Test dburl with username password host port
par_dburl_user_password_host_port OK par_dburl_user_password_host_port OK
par_listproc ### Test --show-processlist|proclist|listproc par_debug ### Test --debug
par_listproc 2 17 par_debug dburl mysql://tange:tange@/
par_listproc 2 17 par_debug databasedriver mysql user tange password tange host port database tange query
par_listproc 2 17 par_debug [ | ((sleep 1; rm /TMP/tmpfile') & mysql --defaults-extra-file=/TMP/tmpfile' --user=tange tange)]
par_noheaders ### Test --noheaders --no-headers -n par_debug Test if --debug works
par_noheaders abc 1 par_debug Yes it does
par_noheaders def 3 par_help ### Test --help -h
par_noheaders abc 1 par_help Usage:
par_noheaders def 3 par_help sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
par_noheaders abc 1 par_help sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
par_noheaders def 3 par_help
par_help See 'man sql' for the options
par_help Usage:
par_help sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
par_help sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
par_help
par_help See 'man sql' for the options
par_html ### Test --html
par_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>
par_passthrough ### Test --passthrough -p
par_passthrough <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>
par_passthrough <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>
par_read_sql_from_file ### Test reading sql from file par_read_sql_from_file ### Test reading sql from file
par_read_sql_from_file Test reading SQL from file works par_read_sql_from_file Test reading SQL from file works
par_read_sql_from_file Yes it does par_read_sql_from_file Yes it does
par_retry ### Test -r - retry 3 times
par_retry dburl pg://nongood@127.0.0.3:2227/
par_retry databasedriver pg user nongood password host 127.0.0.3 port 2227 database nongood query
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_retry ### Test --retries=s
par_retry dburl pg://nongood@127.0.0.3:2227/
par_retry databasedriver pg user nongood password host 127.0.0.3 port 2227 database nongood query
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_retry [ | psql -h 127.0.0.3 -U nongood -p 2227 -d nongood]
par_retry psql: error: connection to server at "127.0.0.3", port 2227 failed: Connection refused
par_retry Is the server running on that host and accepting TCP/IP connections?
par_sep ### Test --sep -s
par_sep 2 1
par_sep 2 1
par_shebang-Y ### Test of #! -Y with file as input par_shebang-Y ### Test of #! -Y with file as input
par_shebang-Y Testing if -Y works par_shebang-Y Testing if -Y works
par_shebang-Y Yes it does par_shebang-Y Yes it does
@ -88,6 +88,6 @@ par_sql_aliases Yes it works
par_sql_on_cmdline ### Test reading sql on command line par_sql_on_cmdline ### Test reading sql on command line
par_sql_on_cmdline Test reading SQL from command line par_sql_on_cmdline Test reading SQL from command line
par_sql_on_cmdline Yes it does par_sql_on_cmdline Yes it does
par_tablesize ### Test --table-size --tablesize par_version ### Test --version -V
par_tablesize 93 par_version 13 74 535
par_tablesize 93 par_version 13 74 535

View file

@ -1,12 +1,11 @@
par_listproc ### Test --listproc par_listproc ### Test --listproc
par_listproc SELECT CPU_TIME/100000, SYS.V_$SQL.SQL_TEXT, USERNAME FROM SYS.V_$SQL, SYS.V_$SESSION WHERE SYS.V_$SQL.SQL_ID = SYS.V_$SESSION.SQL_ID(+) AND username IS NOT NULL ORDER BY CPU_TIME DESC
par_listproc *
par_listproc ERROR at line 1:
par_listproc ORA-00942: table or view does not exist
par_listproc par_listproc
par_listproc CPU_TIME/100000 SQL_TEXT USERNAME
par_listproc --------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
par_listproc 1.99999 SELECT CPU_TIME/100000, SYS.V_$SQL.SQL_TEXT, USERNAME FROM SYS.V_$SQL, SYS.V_$SESSION WHERE SYS.V_$SQL.SQL_ID = SYS.V_$SESSION.SQL_ID(+) AND username IS NOT NULL ORDER BY CPU_TIME DESC SYSTEM
par_listproc par_listproc
par_listproc Id User Host db Command Time State Info par_listproc Id User Host db Command Time State Info
par_listproc XXX sqlunittest localhost sqlunittest Query 0 starting show processlist par_listproc XXX sqlunittest localhost sqlunittest Query 0 init show processlist
par_multiarg_on_command_line ### Test oracle with multiple arguments on the command line par_multiarg_on_command_line ### Test oracle with multiple arguments on the command line
par_multiarg_on_command_line par_multiarg_on_command_line
par_multiarg_on_command_line 'ARG par_multiarg_on_command_line 'ARG
@ -36,28 +35,52 @@ par_newline_on_commandline 3
par_newline_on_commandline par_newline_on_commandline
par_showdatabases ### Test --show-databases par_showdatabases ### Test --show-databases
par_showdatabases par_showdatabases
par_showdatabases TABLESPACE_NAME BLOCK_SIZE INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS MAX_SIZE PCT_INCREASE MIN_EXTLEN STATUS CONTENTS LOGGING FOR EXTENT_MAN ALLOCATIO SEGMEN DEF_TAB_ RETENTION BIG PREDICA ENC COMPRESS_FOR par_showdatabases TABLESPACE_NAME BLOCK_SIZE INITIAL_EXTENT NEXT_EXTENT MIN_EXTENTS MAX_EXTENTS MAX_SIZE PCT_INCREASE MIN_EXTLEN STATUS CONTENTS LOGGING FOR EXTENT_MAN ALLOCATIO SEGMEN DEF_TAB_ RETENTION BIG PREDICA ENC COMPRESS_FOR DEF_INME DEF_INME DEF_INMEMORY_DI DEF_INMEMORY_COMP DEF_INMEMORY_ SHARED DEF_INDE INDEX_COMPRES DEF_CELLMEMORY DEF_INMEMORY DEF_INMEMORY_SERVICE_NAME LOST_WR C
par_showdatabases ------------------------------ ---------- -------------- ----------- ----------- ----------- ---------- ------------ ---------- --------- --------- --------- --- ---------- --------- ------ -------- ----------- --- ------- --- ------------ par_showdatabases ------------------------------ ---------- -------------- ----------- ----------- ----------- ---------- ------------ ---------- --------- --------------------- --------- --- ---------- --------- ------ -------- ----------- --- ------- --- ------------------------------ -------- -------- --------------- ----------------- ------------- ------------- -------- ------------- ---------------- ------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ------- -
par_showdatabases SYSTEM 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING NO LOCAL SYSTEM MANUAL DISABLED NOT APPLY NO HOST NO par_showdatabases SYSTEM 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING YES LOCAL SYSTEM MANUAL DISABLED NOT APPLY YES HOST NO DISABLED SHARED DISABLED OFF N
par_showdatabases SYSAUX 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING NO LOCAL SYSTEM AUTO DISABLED NOT APPLY NO HOST NO par_showdatabases SYSAUX 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING YES LOCAL SYSTEM AUTO DISABLED NOT APPLY YES HOST NO DISABLED SHARED DISABLED OFF N
par_showdatabases UNDOTBS1 8192 65536 1 2147483645 2147483645 65536 ONLINE UNDO LOGGING NO LOCAL SYSTEM MANUAL DISABLED NOGUARANTEE NO HOST NO par_showdatabases UNDOTBS1 8192 65536 1 2147483645 2147483645 65536 ONLINE UNDO LOGGING NO LOCAL SYSTEM MANUAL DISABLED NOGUARANTEE YES HOST NO DISABLED SHARED DISABLED OFF N
par_showdatabases TEMP 8192 1048576 1048576 1 2147483645 0 1048576 ONLINE TEMPORARY NOLOGGING NO LOCAL UNIFORM MANUAL DISABLED NOT APPLY NO HOST NO par_showdatabases TEMP 8192 1048576 1048576 1 2147483645 0 1048576 ONLINE TEMPORARY NOLOGGING NO LOCAL UNIFORM MANUAL DISABLED NOT APPLY NO HOST NO DISABLED SHARED DISABLED OFF N
par_showdatabases USERS 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING NO LOCAL SYSTEM AUTO DISABLED NOT APPLY NO HOST NO par_showdatabases USERS 8192 65536 1 2147483645 2147483645 65536 ONLINE PERMANENT LOGGING NO LOCAL SYSTEM AUTO DISABLED NOT APPLY YES HOST NO DISABLED SHARED DISABLED OFF N
par_showdatabases par_showdatabases
par_showtables ### Test --show-tables par_showtables ### Test --show-tables
par_showtables par_showtables
par_showtables par_showtables
par_showtables par_showtables
par_showtables -------------------------------------------------------------------------------------------------------------------------------- par_showtables --------------------------------------------------------------------------------------------------------------------------------
par_showtables 7 rows selected. par_showtables 31 rows selected.
par_showtables COUNTRIES par_showtables AQ$_SCHEDULES
par_showtables DEPARTMENTS par_showtables HELP
par_showtables EMPLOYEES par_showtables MVIEW$_ADV_AJG
par_showtables JOBS par_showtables MVIEW$_ADV_BASETABLE
par_showtables JOB_HISTORY par_showtables MVIEW$_ADV_CLIQUE
par_showtables LOCATIONS par_showtables MVIEW$_ADV_ELIGIBLE
par_showtables MVIEW$_ADV_EXCEPTIONS
par_showtables MVIEW$_ADV_FILTER
par_showtables MVIEW$_ADV_FILTERINSTANCE
par_showtables MVIEW$_ADV_FJG
par_showtables MVIEW$_ADV_GC
par_showtables MVIEW$_ADV_INFO
par_showtables MVIEW$_ADV_JOURNAL
par_showtables MVIEW$_ADV_LEVEL
par_showtables MVIEW$_ADV_LOG
par_showtables MVIEW$_ADV_OUTPUT
par_showtables MVIEW$_ADV_PARAMETERS
par_showtables MVIEW$_ADV_PLAN
par_showtables MVIEW$_ADV_PRETTY
par_showtables MVIEW$_ADV_ROLLUP
par_showtables MVIEW$_ADV_SQLDEPEND
par_showtables MVIEW$_ADV_TEMP
par_showtables MVIEW$_ADV_WORKLOAD
par_showtables OBJECT_NAME par_showtables OBJECT_NAME
par_showtables REGIONS par_showtables OL$
par_showtables OL$HINTS
par_showtables OL$NODES
par_showtables REDO_DB
par_showtables REDO_LOG
par_showtables SCHEDULER_JOB_ARGS_TBL
par_showtables SCHEDULER_PROGRAM_ARGS_TBL
par_showtables SQLPLUS_PRODUCT_PROFILE
par_sql_from_url ### Test reading sql from url command line par_sql_from_url ### Test reading sql from url command line
par_sql_from_url Test reading SQL from command line par_sql_from_url Test reading SQL from command line
par_sql_from_url Yes it works par_sql_from_url Yes it works
@ -100,12 +123,18 @@ par_test_alias_with_statement Query from stdin
par_test_cyclic ### Test cyclic alias .sql/aliases par_test_cyclic ### Test cyclic alias .sql/aliases
par_test_cyclic :cyclic3 is a cyclic alias par_test_cyclic :cyclic3 is a cyclic alias
par_test_dburl_colon ### Test dburl : par_test_dburl_colon ### Test dburl :
par_test_dburl_colon Error: par_test_dburl_colon sql: Error: : is not defined in ~/.sql/aliases ~/.dburl.aliases /etc/sql/aliases /usr/local/bin/dburl.aliases /usr/local/bin/dburl.aliases.dist
par_test_dburl_colon : is not defined in ~/.sql/aliases ~/.dburl.aliases /etc/sql/aliases /usr/local/bin/dburl.aliases /usr/local/bin/dburl.aliases.dist
par_test_dburl_colon par_test_dburl_colon
par_test_dburl_colon sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] par_test_dburl_colon Usage:
par_test_dburl_colon sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
par_test_dburl_colon sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
par_test_dburl_colon
par_test_dburl_colon See 'man sql' for the options
par_test_empty_dburl ### Test empty dburl par_test_empty_dburl ### Test empty dburl
par_test_empty_dburl Error: par_test_empty_dburl sql: Error: is not a valid DBURL
par_test_empty_dburl is not a valid DBURL
par_test_empty_dburl par_test_empty_dburl
par_test_empty_dburl sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [command] par_test_empty_dburl Usage:
par_test_empty_dburl sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl [sqlcommand]
par_test_empty_dburl sql [-hnr] [--table-size] [--db-size] [-p pass-through] [-s string] dburl < sql_command_file
par_test_empty_dburl
par_test_empty_dburl See 'man sql' for the options