Project

General

Profile

« Previous | Next » 

Revision 9101

lib/sh/db.sh: mysql(): added $output_data option that turns off --verbose and uses echo_stdin instead so that queries are not echoed to stdout along with data. in --verbose mode, use limit_stderr_cmd with stdout2stderr=1 to redirect echoed queries through the logging mechanism.

View differences:

lib/sh/db.sh
56 56
fi # load new aliases
57 57
if self_being_included; then
58 58

  
59
mysql()
59
mysql() # usage: [output_data=1] mysql ...
60 60
{
61 61
	echo_func
62 62
	set_database
63
	mysql_cmd ${database:+--database="$database" }--verbose "$@"
63
	
64
	set -- ${database:+--database="$database" }"$@"
65
	if test "$output_data"; then echo_stdin|mysql_cmd "$@"
66
	else stdout2stderr=1 limit_stderr_cmd mysql_cmd --verbose "$@"
67
	fi
64 68
}
65 69

  
66 70
mysql_ANSI()

Also available in: Unified diff