Project

General

Profile

« Previous | Next » 

Revision 10649

lib/sh/db.sh: mysqldump(): added create_db=1 flag to print the CREATE DATABASE statement

View differences:

lib/sh/db.sh
195 195
EOF
196 196
}
197 197

  
198
mysqldump() # usage: [schema=1 | data=1] mysqldump db [table...]
198
mysqldump() # usage: [schema=1 | data=1] [create_db=1] mysqldump db [table...]
199 199
{
200
	echo_func; kw_params schema data
200
	echo_func
201
	echo_vars schema data create_db
201 202
	
202
	mysql_cmd ${database:+--databases "$database" --tables } \
203
	local var=create_db; local_inv
204
	mysql_cmd ${database:+--databases "$database" ${no_create_db:+--tables }} \
203 205
--lock-tables=false --set-charset \
204 206
${postgres_compat:+${data:+--compatible=postgresql }--add-locks=false }\
205 207
${schema:+--no-data }${data:+--no-create-info }"$@"

Also available in: Unified diff