Loading client/mysqldump.c +9 −3 Original line number Diff line number Diff line Loading @@ -1431,6 +1431,8 @@ static uint dump_events_for_db(char *db) strcpy(delimiter, ";"); if (mysql_num_rows(event_list_res) > 0) { fprintf(sql_file, "/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;\n"); while ((event_list_row= mysql_fetch_row(event_list_res)) != NULL) { event_name= quote_name(event_list_row[1], name_buff, 0); Loading @@ -1447,13 +1449,13 @@ static uint dump_events_for_db(char *db) if the user has EXECUTE privilege he can see event names, but not the event body! */ if (strlen(row[2]) != 0) if (strlen(row[3]) != 0) { if (opt_drop) fprintf(sql_file, "/*!50106 DROP EVENT IF EXISTS %s */%s\n", event_name, delimiter); delimit_test= create_delimiter(row[2], delimiter, sizeof(delimiter)); delimit_test= create_delimiter(row[3], delimiter, sizeof(delimiter)); if (delimit_test == NULL) { fprintf(stderr, "%s: Warning: Can't dump event '%s'\n", event_name, my_progname); Loading @@ -1461,11 +1463,15 @@ static uint dump_events_for_db(char *db) } fprintf(sql_file, "DELIMITER %s\n", delimiter); fprintf(sql_file, "/*!50106 %s */ %s\n", row[2], delimiter); fprintf(sql_file, "/*!50106 SET TIME_ZONE= '%s' */ %s\n", row[2], delimiter); fprintf(sql_file, "/*!50106 %s */ %s\n", row[3], delimiter); } } /* end of event printing */ } /* end of list of events */ fprintf(sql_file, "DELIMITER ;\n"); fprintf(sql_file, "/*!50106 SET TIME_ZONE= @save_time_zone */ ;\n"); mysql_free_result(event_res); } mysql_free_result(event_list_res); Loading include/my_global.h +6 −0 Original line number Diff line number Diff line Loading @@ -1496,4 +1496,10 @@ do { doubleget_union _tmp; \ #include <new> #endif /* Length of decimal number represented by INT32. */ #define MY_INT32_NUM_DECIMAL_DIGITS 11 /* Length of decimal number represented by INT64. */ #define MY_INT64_NUM_DECIMAL_DIGITS 21 #endif /* my_global_h */ libmysqld/lib_sql.cc +6 −6 Original line number Diff line number Diff line Loading @@ -822,7 +822,7 @@ int Protocol::begin_dataset() remove last row of current recordset SYNOPSIS Protocol_simple::remove_last_row() Protocol_text::remove_last_row() NOTES does the loop from the beginning of the current recordset to Loading @@ -830,12 +830,12 @@ int Protocol::begin_dataset() Not supposed to be frequently called. */ void Protocol_simple::remove_last_row() void Protocol_text::remove_last_row() { MYSQL_DATA *data= thd->cur_data; MYSQL_ROWS **last_row_hook= &data->data; uint count= data->rows; DBUG_ENTER("Protocol_simple::remove_last_row"); DBUG_ENTER("Protocol_text::remove_last_row"); while (--count) last_row_hook= &(*last_row_hook)->next; Loading Loading @@ -964,7 +964,7 @@ bool Protocol::write() return false; } bool Protocol_prep::write() bool Protocol_binary::write() { MYSQL_ROWS *cur; MYSQL_DATA *data= thd->cur_data; Loading Loading @@ -1031,7 +1031,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err) } void Protocol_simple::prepare_for_resend() void Protocol_text::prepare_for_resend() { MYSQL_ROWS *cur; MYSQL_DATA *data= thd->cur_data; Loading @@ -1056,7 +1056,7 @@ void Protocol_simple::prepare_for_resend() DBUG_VOID_RETURN; } bool Protocol_simple::store_null() bool Protocol_text::store_null() { *(next_field++)= NULL; ++next_mysql_field; Loading mysql-test/include/have_query_cache.inc +0 −3 Original line number Diff line number Diff line -- require r/have_query_cache.require # As PS are not cached we disable them to ensure the we get the right number # of query cache hits -- disable_ps_protocol disable_query_log; show variables like "have_query_cache"; enable_query_log; mysql-test/include/wait_condition.inc +16 −1 Original line number Diff line number Diff line Loading @@ -11,13 +11,28 @@ # SELECT c = 3 FROM t; # --source include/wait_condition.inc # # OR # # let $wait_timeout= 60; # Override default 30 seconds with 60. # let $wait_condition= # SELECT c = 3 FROM t; # --source include/wait_condition.inc # # EXAMPLE # events_bugs.test # events_bugs.test, events_time_zone.test # --disable_query_log let $wait_counter= 300; if ($wait_timeout) { let $wait_counter= `SELECT $wait_timeout * 10`; } # Reset $wait_timeout so that its value won't be used on subsequent # calls, and default will be used instead. let $wait_timeout= 0; while ($wait_counter) { let $success= `$wait_condition`; Loading Loading
client/mysqldump.c +9 −3 Original line number Diff line number Diff line Loading @@ -1431,6 +1431,8 @@ static uint dump_events_for_db(char *db) strcpy(delimiter, ";"); if (mysql_num_rows(event_list_res) > 0) { fprintf(sql_file, "/*!50106 SET @save_time_zone= @@TIME_ZONE */ ;\n"); while ((event_list_row= mysql_fetch_row(event_list_res)) != NULL) { event_name= quote_name(event_list_row[1], name_buff, 0); Loading @@ -1447,13 +1449,13 @@ static uint dump_events_for_db(char *db) if the user has EXECUTE privilege he can see event names, but not the event body! */ if (strlen(row[2]) != 0) if (strlen(row[3]) != 0) { if (opt_drop) fprintf(sql_file, "/*!50106 DROP EVENT IF EXISTS %s */%s\n", event_name, delimiter); delimit_test= create_delimiter(row[2], delimiter, sizeof(delimiter)); delimit_test= create_delimiter(row[3], delimiter, sizeof(delimiter)); if (delimit_test == NULL) { fprintf(stderr, "%s: Warning: Can't dump event '%s'\n", event_name, my_progname); Loading @@ -1461,11 +1463,15 @@ static uint dump_events_for_db(char *db) } fprintf(sql_file, "DELIMITER %s\n", delimiter); fprintf(sql_file, "/*!50106 %s */ %s\n", row[2], delimiter); fprintf(sql_file, "/*!50106 SET TIME_ZONE= '%s' */ %s\n", row[2], delimiter); fprintf(sql_file, "/*!50106 %s */ %s\n", row[3], delimiter); } } /* end of event printing */ } /* end of list of events */ fprintf(sql_file, "DELIMITER ;\n"); fprintf(sql_file, "/*!50106 SET TIME_ZONE= @save_time_zone */ ;\n"); mysql_free_result(event_res); } mysql_free_result(event_list_res); Loading
include/my_global.h +6 −0 Original line number Diff line number Diff line Loading @@ -1496,4 +1496,10 @@ do { doubleget_union _tmp; \ #include <new> #endif /* Length of decimal number represented by INT32. */ #define MY_INT32_NUM_DECIMAL_DIGITS 11 /* Length of decimal number represented by INT64. */ #define MY_INT64_NUM_DECIMAL_DIGITS 21 #endif /* my_global_h */
libmysqld/lib_sql.cc +6 −6 Original line number Diff line number Diff line Loading @@ -822,7 +822,7 @@ int Protocol::begin_dataset() remove last row of current recordset SYNOPSIS Protocol_simple::remove_last_row() Protocol_text::remove_last_row() NOTES does the loop from the beginning of the current recordset to Loading @@ -830,12 +830,12 @@ int Protocol::begin_dataset() Not supposed to be frequently called. */ void Protocol_simple::remove_last_row() void Protocol_text::remove_last_row() { MYSQL_DATA *data= thd->cur_data; MYSQL_ROWS **last_row_hook= &data->data; uint count= data->rows; DBUG_ENTER("Protocol_simple::remove_last_row"); DBUG_ENTER("Protocol_text::remove_last_row"); while (--count) last_row_hook= &(*last_row_hook)->next; Loading Loading @@ -964,7 +964,7 @@ bool Protocol::write() return false; } bool Protocol_prep::write() bool Protocol_binary::write() { MYSQL_ROWS *cur; MYSQL_DATA *data= thd->cur_data; Loading Loading @@ -1031,7 +1031,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err) } void Protocol_simple::prepare_for_resend() void Protocol_text::prepare_for_resend() { MYSQL_ROWS *cur; MYSQL_DATA *data= thd->cur_data; Loading @@ -1056,7 +1056,7 @@ void Protocol_simple::prepare_for_resend() DBUG_VOID_RETURN; } bool Protocol_simple::store_null() bool Protocol_text::store_null() { *(next_field++)= NULL; ++next_mysql_field; Loading
mysql-test/include/have_query_cache.inc +0 −3 Original line number Diff line number Diff line -- require r/have_query_cache.require # As PS are not cached we disable them to ensure the we get the right number # of query cache hits -- disable_ps_protocol disable_query_log; show variables like "have_query_cache"; enable_query_log;
mysql-test/include/wait_condition.inc +16 −1 Original line number Diff line number Diff line Loading @@ -11,13 +11,28 @@ # SELECT c = 3 FROM t; # --source include/wait_condition.inc # # OR # # let $wait_timeout= 60; # Override default 30 seconds with 60. # let $wait_condition= # SELECT c = 3 FROM t; # --source include/wait_condition.inc # # EXAMPLE # events_bugs.test # events_bugs.test, events_time_zone.test # --disable_query_log let $wait_counter= 300; if ($wait_timeout) { let $wait_counter= `SELECT $wait_timeout * 10`; } # Reset $wait_timeout so that its value won't be used on subsequent # calls, and default will be used instead. let $wait_timeout= 0; while ($wait_counter) { let $success= `$wait_condition`; Loading