Project

General

Profile

« Previous | Next » 

Revision 10446

lib/sh/db.sh: mysqldump(): don't use --compatible=postgresql when the table structure is being exported, because this removes the table options (which include the COMMENT attribute). --compatible=postgresql remains on in data-only mode because embedded ` in data cannot easily be distinguished from ` around column names, so ANSI_QUOTES is needed to do the translation to " (and data sections do not contain table options). note that all --compatible modes that offer ANSI_QUOTES unfortunately exclude the table options, and there is no way to run a SQL query to set the SQL mode before beginning the dump, so ANSI_QUOTES translation must be handled by my2pg instead.

View differences:

db.sh
201 201
	
202 202
	mysql_cmd ${database:+--databases "$database" --tables } \
203 203
--lock-tables=false --set-charset \
204
${postgres_compat:+--compatible=postgresql --add-locks=false }\
204
${postgres_compat:+${data:+--compatible=postgresql }--add-locks=false }\
205 205
${schema:+--no-data }${data:+--no-create-info }"$@"
206 206
}
207 207

  

Also available in: Unified diff