Commit 5f2055af authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/data0/bk/mysql-5.1

into  bk-internal.mysql.com:/data0/bk/mysql-5.1-marvel


client/mysqldump.c:
  Auto merged
sql/mysqld.cc:
  Auto merged
parents cf4a266d 8ed9a540
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -1426,6 +1426,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);
@@ -1442,13 +1444,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);
@@ -1456,11 +1458,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);
+6 −0
Original line number Diff line number Diff line
@@ -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 */
+6 −6
Original line number Diff line number Diff line
@@ -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
@@ -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;

@@ -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;
@@ -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;
@@ -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;
+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;
+16 −1
Original line number Diff line number Diff line
@@ -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