Project

General

Profile

« Previous | Next » 

Revision 9694

lib/sh/db.sh: mysql_cmd(): use --quick to avoid buffering entire result (which is slow and memory-intensive for large result sets). this option applies to both mysql() and mysqldump().

View differences:

lib/sh/db.sh
90 90
	local var=ssh_dest; local_inv
91 91
	command ${ssh_dest:+ssh "$ssh_dest" }"$cmd" \
92 92
${server:+ --host="$server" }${user:+--user="$user" } --password\
93
${password+="$password"} "$@"
93
${password+="$password"} --quick "$@" # --quick: don't buffer entire result
94 94
}
95 95
alias mysql_cmd='mysql_cmd "$FUNCNAME"'
96 96

  
......
183 183
	echo_func; kw_params schema data
184 184
	
185 185
	mysql_cmd ${database:+--databases "$database" --tables } \
186
--quick --lock-tables=false --set-charset \
186
--lock-tables=false --set-charset \
187 187
${postgres_compat:+--compatible=postgresql --add-locks=false }\
188 188
${schema:+--no-data }${data:+--no-create-info }"$@"
189 189
}

Also available in: Unified diff