Loading client/mysqldump.c +36 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,8 @@ static my_bool verbose=0,tFlag=0,dFlag=0,quick= 1, extended_insert= 1, opt_delete_master_logs=0, tty_password=0, opt_single_transaction=0, opt_comments= 0, opt_compact= 0, opt_hex_blob=0, opt_order_by_primary=0, opt_ignore=0, opt_complete_insert= 0, opt_drop_database= 0; opt_complete_insert= 0, opt_drop_database= 0, opt_dump_triggers= 0; static ulong opt_max_allowed_packet, opt_net_buffer_length; static MYSQL mysql_connection,*sock=0; static my_bool insert_pat_inited=0; Loading Loading @@ -371,6 +372,9 @@ static struct my_option my_long_options[] = (gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"triggers", '/0', "Dump triggers for each dumped table", (gptr*) &opt_dump_triggers, (gptr*) &opt_dump_triggers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, #ifndef DONT_ALLOW_USER_CHANGE {"user", 'u', "User for login if not current user.", (gptr*) ¤t_user, (gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG, Loading Loading @@ -1315,6 +1319,37 @@ static uint get_table_structure(char *table, char *db) fprintf(sql_file, "%s;\n", row[1]); check_io(sql_file); mysql_free_result(tableRes); if (opt_dump_triggers && mysql_get_server_version(sock) >= 50009) { my_snprintf(query_buff, sizeof(query_buff), "SHOW TRIGGERS LIKE %s", quote_for_like(table, name_buff)); if (mysql_query_with_error_report(sock, &tableRes, query_buff)) { if (path) my_fclose(sql_file, MYF(MY_WME)); safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } if (mysql_num_rows(tableRes)) fprintf(sql_file, "\nDELIMITER //;\n"); while ((row=mysql_fetch_row(tableRes))) { fprintf(sql_file, "CREATE TRIGGER %s %s %s ON %s\n" "FOR EACH ROW%s//\n\n", quote_name(row[0], name_buff, 0), row[4], row[1], result_table, row[3]); } if (mysql_num_rows(tableRes)) fprintf(sql_file, "DELIMITER ;//"); mysql_free_result(tableRes); } } my_snprintf(query_buff, sizeof(query_buff), "show fields from %s", result_table); Loading innobase/include/sync0sync.h +3 −2 Original line number Diff line number Diff line Loading @@ -522,10 +522,11 @@ extern ibool sync_order_checks_on; extern ibool sync_initialized; /* Global list of database mutexes (not OS mutexes) created. */ UT_LIST_BASE_NODE_T(mutex_t) mutex_list; typedef UT_LIST_BASE_NODE_T(mutex_t) ut_list_base_node_t; extern ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; extern mutex_t mutex_list_mutex; #ifndef UNIV_NONINL Loading innobase/sync/sync0sync.c +6 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,12 @@ sync_thread_t* sync_thread_level_arrays; /* Mutex protecting sync_thread_level_arrays */ mutex_t sync_thread_mutex; /* Global list of database mutexes (not OS mutexes) created. */ ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; /* Latching order checks start when this is set TRUE */ ibool sync_order_checks_on = FALSE; Loading mysql-test/r/ctype_latin1.result +5 −5 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l 7E 7E 7E 1 7F 7F 7F 1 80 E282AC 80 1 81 3F 3F 0 81 C281 81 1 82 E2809A 82 1 83 C692 83 1 84 E2809E 84 1 Loading @@ -180,10 +180,10 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l 8A C5A0 8A 1 8B E280B9 8B 1 8C C592 8C 1 8D 3F 3F 0 8D C28D 8D 1 8E C5BD 8E 1 8F 3F 3F 0 90 3F 3F 0 8F C28F 8F 1 90 C290 90 1 91 E28098 91 1 92 E28099 92 1 93 E2809C 93 1 Loading @@ -196,7 +196,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l 9A C5A1 9A 1 9B E280BA 9B 1 9C C593 9C 1 9D 3F 3F 0 9D C29D 9D 1 9E C5BE 9E 1 9F C5B8 9F 1 A0 C2A0 A0 1 Loading mysql-test/r/information_schema.result +4 −4 Original line number Diff line number Diff line Loading @@ -182,13 +182,13 @@ drop database mysqltest; select * from information_schema.CHARACTER_SETS where CHARACTER_SET_NAME like 'latin1%'; CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN latin1 latin1_swedish_ci ISO 8859-1 West European 1 latin1 latin1_swedish_ci cp1252 West European 1 SHOW CHARACTER SET LIKE 'latin1%'; Charset Description Default collation Maxlen latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 cp1252 West European latin1_swedish_ci 1 SHOW CHARACTER SET WHERE charset like 'latin1%'; Charset Description Default collation Maxlen latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 cp1252 West European latin1_swedish_ci 1 select * from information_schema.COLLATIONS where COLLATION_NAME like 'latin1%'; COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN Loading Loading @@ -501,7 +501,7 @@ create table t1 select * from information_schema.CHARACTER_SETS where CHARACTER_SET_NAME like "latin1"; select * from t1; CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN latin1 latin1_swedish_ci ISO 8859-1 West European 1 latin1 latin1_swedish_ci cp1252 West European 1 alter table t1 default character set utf8; show create table t1; Table Create Table Loading Loading
client/mysqldump.c +36 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,8 @@ static my_bool verbose=0,tFlag=0,dFlag=0,quick= 1, extended_insert= 1, opt_delete_master_logs=0, tty_password=0, opt_single_transaction=0, opt_comments= 0, opt_compact= 0, opt_hex_blob=0, opt_order_by_primary=0, opt_ignore=0, opt_complete_insert= 0, opt_drop_database= 0; opt_complete_insert= 0, opt_drop_database= 0, opt_dump_triggers= 0; static ulong opt_max_allowed_packet, opt_net_buffer_length; static MYSQL mysql_connection,*sock=0; static my_bool insert_pat_inited=0; Loading Loading @@ -371,6 +372,9 @@ static struct my_option my_long_options[] = (gptr*) &path, (gptr*) &path, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"tables", OPT_TABLES, "Overrides option --databases (-B).", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"triggers", '/0', "Dump triggers for each dumped table", (gptr*) &opt_dump_triggers, (gptr*) &opt_dump_triggers, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, #ifndef DONT_ALLOW_USER_CHANGE {"user", 'u', "User for login if not current user.", (gptr*) ¤t_user, (gptr*) ¤t_user, 0, GET_STR, REQUIRED_ARG, Loading Loading @@ -1315,6 +1319,37 @@ static uint get_table_structure(char *table, char *db) fprintf(sql_file, "%s;\n", row[1]); check_io(sql_file); mysql_free_result(tableRes); if (opt_dump_triggers && mysql_get_server_version(sock) >= 50009) { my_snprintf(query_buff, sizeof(query_buff), "SHOW TRIGGERS LIKE %s", quote_for_like(table, name_buff)); if (mysql_query_with_error_report(sock, &tableRes, query_buff)) { if (path) my_fclose(sql_file, MYF(MY_WME)); safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } if (mysql_num_rows(tableRes)) fprintf(sql_file, "\nDELIMITER //;\n"); while ((row=mysql_fetch_row(tableRes))) { fprintf(sql_file, "CREATE TRIGGER %s %s %s ON %s\n" "FOR EACH ROW%s//\n\n", quote_name(row[0], name_buff, 0), row[4], row[1], result_table, row[3]); } if (mysql_num_rows(tableRes)) fprintf(sql_file, "DELIMITER ;//"); mysql_free_result(tableRes); } } my_snprintf(query_buff, sizeof(query_buff), "show fields from %s", result_table); Loading
innobase/include/sync0sync.h +3 −2 Original line number Diff line number Diff line Loading @@ -522,10 +522,11 @@ extern ibool sync_order_checks_on; extern ibool sync_initialized; /* Global list of database mutexes (not OS mutexes) created. */ UT_LIST_BASE_NODE_T(mutex_t) mutex_list; typedef UT_LIST_BASE_NODE_T(mutex_t) ut_list_base_node_t; extern ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; extern mutex_t mutex_list_mutex; #ifndef UNIV_NONINL Loading
innobase/sync/sync0sync.c +6 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,12 @@ sync_thread_t* sync_thread_level_arrays; /* Mutex protecting sync_thread_level_arrays */ mutex_t sync_thread_mutex; /* Global list of database mutexes (not OS mutexes) created. */ ut_list_base_node_t mutex_list; /* Mutex protecting the mutex_list variable */ mutex_t mutex_list_mutex; /* Latching order checks start when this is set TRUE */ ibool sync_order_checks_on = FALSE; Loading
mysql-test/r/ctype_latin1.result +5 −5 Original line number Diff line number Diff line Loading @@ -168,7 +168,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l 7E 7E 7E 1 7F 7F 7F 1 80 E282AC 80 1 81 3F 3F 0 81 C281 81 1 82 E2809A 82 1 83 C692 83 1 84 E2809E 84 1 Loading @@ -180,10 +180,10 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l 8A C5A0 8A 1 8B E280B9 8B 1 8C C592 8C 1 8D 3F 3F 0 8D C28D 8D 1 8E C5BD 8E 1 8F 3F 3F 0 90 3F 3F 0 8F C28F 8F 1 90 C290 90 1 91 E28098 91 1 92 E28099 92 1 93 E2809C 93 1 Loading @@ -196,7 +196,7 @@ hex(a) hex(@u:=convert(a using utf8)) hex(@l:=convert(@u using latin1)) a=@l 9A C5A1 9A 1 9B E280BA 9B 1 9C C593 9C 1 9D 3F 3F 0 9D C29D 9D 1 9E C5BE 9E 1 9F C5B8 9F 1 A0 C2A0 A0 1 Loading
mysql-test/r/information_schema.result +4 −4 Original line number Diff line number Diff line Loading @@ -182,13 +182,13 @@ drop database mysqltest; select * from information_schema.CHARACTER_SETS where CHARACTER_SET_NAME like 'latin1%'; CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN latin1 latin1_swedish_ci ISO 8859-1 West European 1 latin1 latin1_swedish_ci cp1252 West European 1 SHOW CHARACTER SET LIKE 'latin1%'; Charset Description Default collation Maxlen latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 cp1252 West European latin1_swedish_ci 1 SHOW CHARACTER SET WHERE charset like 'latin1%'; Charset Description Default collation Maxlen latin1 ISO 8859-1 West European latin1_swedish_ci 1 latin1 cp1252 West European latin1_swedish_ci 1 select * from information_schema.COLLATIONS where COLLATION_NAME like 'latin1%'; COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN Loading Loading @@ -501,7 +501,7 @@ create table t1 select * from information_schema.CHARACTER_SETS where CHARACTER_SET_NAME like "latin1"; select * from t1; CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN latin1 latin1_swedish_ci ISO 8859-1 West European 1 latin1 latin1_swedish_ci cp1252 West European 1 alter table t1 default character set utf8; show create table t1; Table Create Table Loading