diff options
author | unknown <monty@mishka.local> | 2004-04-27 15:33:40 +0300 |
---|---|---|
committer | unknown <monty@mishka.local> | 2004-04-27 15:33:40 +0300 |
commit | a3828081cde644ab551c21a621b8e6ab69923e6a (patch) | |
tree | 4b29146428c84ab3e10e4007d26e3c0b4b2b1074 /client | |
parent | 1065f2bbd66ac4b1161f5c188171a54cbad5b422 (diff) | |
download | mariadb-git-a3828081cde644ab551c21a621b8e6ab69923e6a.tar.gz |
After merge fixes
Changed 'SHOW FIELD STATUS' to use 'Engine' instead of 'Type'
client/client_priv.h:
Added option 'create_options' for mysqldump
client/mysqldump.c:
Changed '--all' to '--create-options' as the old name was meaningless
innobase/buf/buf0buf.c:
After merge fixes
innobase/buf/buf0lru.c:
After merge fixes
innobase/buf/buf0rea.c:
After merge fixes
innobase/dict/dict0load.c:
After merge fixes
innobase/fil/fil0fil.c:
After merge fixes
innobase/ibuf/ibuf0ibuf.c:
After merge fixes
innobase/include/fil0fil.h:
After merge fixes
innobase/include/row0mysql.h:
After merge fixes
innobase/include/ut0mem.h:
After merge fixes
innobase/log/log0recv.c:
After merge fixes
innobase/row/row0mysql.c:
After merge fixes
innobase/row/row0sel.c:
After merge fixes
innobase/srv/srv0start.c:
After merge fixes
innobase/sync/sync0rw.c:
After merge fixes
innobase/sync/sync0sync.c:
After merge fixes
myisam/ft_boolean_search.c:
After merge fixes
myisam/ft_nlq_search.c:
After merge fixes
mysql-test/r/mysqldump.result:
After merge fixes
mysql-test/t/mysqldump.test:
Make result file smaller
Some new tests
sql/ha_innodb.cc:
After merge fixes
sql/set_var.cc:
Removed compiler warning
sql/slave.cc:
After merge fixes
sql/slave.h:
After merge fixes
sql/sql_show.cc:
Type -> Engine
Diffstat (limited to 'client')
-rw-r--r-- | client/client_priv.h | 2 | ||||
-rw-r--r-- | client/mysqldump.c | 26 |
2 files changed, 17 insertions, 11 deletions
diff --git a/client/client_priv.h b/client/client_priv.h index aa1de85f489..854d205e585 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -43,5 +43,5 @@ enum options_client OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION, OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH, - OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET + OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS }; diff --git a/client/mysqldump.c b/client/mysqldump.c index 60cf89b3af4..229da83f545 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -37,7 +37,7 @@ ** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov */ -#define DUMP_VERSION "10.6" +#define DUMP_VERSION "10.7" #include <my_global.h> #include <my_sys.h> @@ -132,9 +132,6 @@ static struct my_option my_long_options[] = "Dump all the databases. This will be same as --databases with all databases selected.", (gptr*) &opt_alldbs, (gptr*) &opt_alldbs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, - {"all", 'a', "Include all MySQL specific create options.", - (gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1, - 0, 0, 0, 0, 0}, {"add-drop-table", OPT_DROP, "Add a 'drop table' before each create.", (gptr*) &opt_drop, (gptr*) &opt_drop, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, @@ -148,7 +145,7 @@ static struct my_option my_long_options[] = "Directory where character sets are.", (gptr*) &charsets_dir, (gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"compatible", OPT_COMPATIBLE, - "Change the dump to be compatible with a given mode. By default tables are dumped without any restrictions. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option does a no operation on earlier server versions.", + "Change the dump to be compatible with a given mode. By default tables are dumped in a format optimized for MySQL. Legal modes are: ansi, mysql323, mysql40, postgresql, oracle, mssql, db2, maxdb, no_key_options, no_table_options, no_field_options. One can use several modes separated by commas. Note: Requires MySQL server version 4.1.0 or higher. This option is ignored with earlier server versions.", (gptr*) &opt_compatible_mode_str, (gptr*) &opt_compatible_mode_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"compact", OPT_COMPACT, @@ -160,6 +157,10 @@ static struct my_option my_long_options[] = {"compress", 'C', "Use compression in server/client protocol.", (gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"create-options", OPT_CREATE_OPTIONS, + "Include all MySQL specific create options.", + (gptr*) &create_options, (gptr*) &create_options, 0, GET_BOOL, NO_ARG, 1, + 0, 0, 0, 0, 0}, {"databases", 'B', "To dump several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames. 'USE db_name;' will be included in the output.", (gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG, 0, 0, @@ -483,7 +484,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case (int) OPT_SKIP_OPTIMIZATION: extended_insert= opt_drop= opt_lock= quick= create_options= - opt_disable_keys= lock_tables= 0; + opt_disable_keys= lock_tables= opt_set_charset= 0; break; case (int) OPT_COMPACT: if (opt_compact) @@ -863,7 +864,7 @@ static void print_xml_row(FILE *xml_file, const char *row_name, print_quoted_xml(xml_file, field->name, field->name_length); fputs("=\"", xml_file); print_quoted_xml(xml_file, (*row)[i], lengths[i]); - fputc('"', file); + fputc('"', xml_file); } } fputs(" />\n", xml_file); @@ -897,6 +898,9 @@ static uint getTableStructure(char *table, char* db) sprintf(insert_pat,"SET OPTION SQL_QUOTE_SHOW_CREATE=%d", (opt_quoted || opt_keywords)); + if (!create_options) + strmov(strend(insert_pat), "/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 'NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */"); + result_table= quote_name(table, table_buff, 1); opt_quoted_table= quote_name(table, table_buff2, 0); if (!opt_xml && !mysql_query(sock,insert_pat)) @@ -978,8 +982,10 @@ static uint getTableStructure(char *table, char* db) } else { - /* fprintf(stderr, "%s: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n", - my_progname, mysql_error(sock)); */ + if (verbose) + fprintf(stderr, + "%s: Warning: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n", + my_progname, mysql_error(sock)); sprintf(insert_pat,"show fields from %s", result_table); if (mysql_query(sock,insert_pat) || !(tableRes=mysql_store_result(sock))) @@ -1172,7 +1178,7 @@ static uint getTableStructure(char *table, char* db) else { fputs("/*!",sql_file); - print_value(sql_file,tableRes,row,"type=","Type",0); + print_value(sql_file,tableRes,row,"engine=","Engine",0); print_value(sql_file,tableRes,row,"","Create_options",0); print_value(sql_file,tableRes,row,"comment=","Comment",1); fputs(" */",sql_file); |