Project

General

Profile

« Previous | Next » 

Revision 9706

lib/sh/db.sh: mysql: always use ANSI mode, to support "" identifiers. note that `` are still supported in this mode, so it also works with SHOW CREATE TABLE output and dumpfiles.

View differences:

db.sh
101 101
fi # load new aliases
102 102
if self_being_included; then
103 103

  
104
mysql() # usage: [output_data=1] [data_only=1] [log_queries=] mysql ...
104
function mysql() # usage: [output_data=1] [data_only=1] [log_queries=] mysql ...
105 105
{
106 106
	echo_func; kw_params output_data data_only query_verbosity
107 107
	if test "$data_only"; then local output_data="${output_data-1}"; fi
......
124 124
	(echo "SET sql_mode = 'ANSI';"; cat)|mysql "$@"
125 125
}
126 126

  
127
# always use ANSI mode, to support "" identifiers. `` are *still* supported in
128
# this mode, so it also works with SHOW CREATE TABLE output and dumpfiles.
129
alias mysql='mysql_ANSI'
130

  
127 131
mysql_truncate() { echo_func; mk_truncate|mysql_ANSI; }
128 132

  
129 133
mysql_import() # usage: table=... [cols=...] [append=1] mysql_import <file

Also available in: Unified diff