Revision 9095
Added by Aaron Marcuse-Kubitza over 11 years ago
lib/sh/db.sh | ||
---|---|---|
48 | 48 |
local var=ssh_dest; local_inv |
49 | 49 |
command ${ssh_dest:+ssh "$ssh_dest" }"${FUNCNAME[1]}" \ |
50 | 50 |
${server:+ --host="$server" }${user:+--user="$user" } --password\ |
51 |
${password+="$password"} ${database:+--databases "$database" --tables } "$@"
|
|
51 |
${password+="$password"} "$@" |
|
52 | 52 |
} |
53 | 53 |
|
54 |
mysql() { echo_func; mysql_cmd --verbose "$@"; } |
|
54 |
mysql() |
|
55 |
{ |
|
56 |
echo_func |
|
57 |
set_database |
|
58 |
mysql_cmd ${database:+--database="$database" }--verbose "$@" |
|
59 |
} |
|
55 | 60 |
|
56 | 61 |
mysql_ANSI() |
57 | 62 |
{ |
... | ... | |
62 | 67 |
mysqldump() # usage: [schema=1 | data=1] mysqldump db [table...] |
63 | 68 |
{ |
64 | 69 |
echo_func |
65 |
mysql_cmd --quick --lock-tables=false --set-charset \ |
|
70 |
mysql_cmd ${database:+--databases "$database" --tables } \ |
|
71 |
--quick --lock-tables=false --set-charset \ |
|
66 | 72 |
${postgres_compat:+--compatible=postgresql --add-locks=false }\ |
67 | 73 |
${schema:+--no-data }${data:+--no-create-info }"$@" |
68 | 74 |
} |
Also available in: Unified diff
lib/sh/db.sh: mysql_cmd(): moved setting of database to specific callers (mysql(), mysqldump()) because the syntax to set it differs between mysql* commands (e.g. mysql uses `--database=` while mysqldump uses `--databases ... --tables`)