Commit f57bb347 authored by unknown's avatar unknown
Browse files

Merge tkatchaounov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt

into  lamia.home:/home/tkatchaounov/autopush/5.0-bug-21007


client/mysql.cc:
  Auto merged
mysql-test/r/date_formats.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/t/date_formats.test:
  Auto merged
mysql-test/t/func_str.test:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/time.cc:
  Auto merged
parents f8dda7bf 4e59d30d
Loading
Loading
Loading
Loading
+38 −19
Original line number Diff line number Diff line
@@ -2970,6 +2970,7 @@ static int
com_use(String *buffer __attribute__((unused)), char *line)
{
  char *tmp, buff[FN_REFLEN + 1];
  int select_db;

  bzero(buff, sizeof(buff));
  strmov(buff, line);
@@ -2989,8 +2990,27 @@ com_use(String *buffer __attribute__((unused)), char *line)
  if (!current_db || cmp_database(charset_info, current_db,tmp))
  {
    if (one_database)
    {
      skip_updates= 1;
      select_db= 0;    // don't do mysql_select_db()
    }
    else
      select_db= 2;    // do mysql_select_db() and build_completion_hash()
  }
  else
  {
    /*
      USE to the current db specified.
      We do need to send mysql_select_db() to make server
      update database level privileges, which might
      change since last USE (see bug#10979).
      For performance purposes, we'll skip rebuilding of completion hash.
    */
    skip_updates= 0;
    select_db= 1;      // do only mysql_select_db(), without completion
  }

  if (select_db)
  {
    /*
      reconnect once if connection is down or if connection was found to
@@ -3011,12 +3031,11 @@ com_use(String *buffer __attribute__((unused)), char *line)
    my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
    current_db=my_strdup(tmp,MYF(MY_WME));
#ifdef HAVE_READLINE
    if (select_db > 1)
      build_completion_hash(rehash, 1);
#endif
  }
  }
  else
    skip_updates= 0;

  put_info("Database changed",INFO_INFO);
  return 0;
}
+22 −12
Original line number Diff line number Diff line
@@ -2239,15 +2239,16 @@ static void dump_table(char *table, char *db)
      goto err;
    }

    if (opt_disable_keys)
    if (opt_lock)
    {
      fprintf(md_result_file, "\n/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",
              opt_quoted_table);
      fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table);
      check_io(md_result_file);
    }
    if (opt_lock)
    /* Moved disable keys to after lock per bug 15977 */
    if (opt_disable_keys)
    {
      fprintf(md_result_file,"LOCK TABLES %s WRITE;\n", opt_quoted_table);
      fprintf(md_result_file, "/*!40000 ALTER TABLE %s DISABLE KEYS */;\n",
	      opt_quoted_table);
      check_io(md_result_file);
    }

@@ -2511,17 +2512,19 @@ static void dump_table(char *table, char *db)
      error= EX_CONSCHECK;
      goto err;
    }
    if (opt_lock)
    {
      fputs("UNLOCK TABLES;\n", md_result_file);
      check_io(md_result_file);
    }

    /* Moved enable keys to before unlock per bug 15977 */
    if (opt_disable_keys)
    {
      fprintf(md_result_file,"/*!40000 ALTER TABLE %s ENABLE KEYS */;\n",
              opt_quoted_table);
      check_io(md_result_file);
    }
    if (opt_lock)
    {
      fputs("UNLOCK TABLES;\n", md_result_file);
      check_io(md_result_file);
    }
    if (opt_autocommit)
    {
      fprintf(md_result_file, "commit;\n");
@@ -2781,6 +2784,12 @@ static my_bool dump_all_views_in_db(char *database)
  uint numrows;
  char table_buff[NAME_LEN*2+3];

  if (mysql_select_db(sock, database))
  {
    DB_error(sock, "when selecting the database");
    return 1;
  }

  if (opt_xml)
    print_xml_tag1(md_result_file, "", "database name=", database, "\n");
  if (lock_tables)
@@ -3436,12 +3445,13 @@ static my_bool get_view_structure(char *table, char* db)
    mysql_free_result(table_res);

    /* Get the result from "select ... information_schema" */
    if (!(table_res= mysql_store_result(sock)))
    if (!(table_res= mysql_store_result(sock)) ||
        !(row= mysql_fetch_row(table_res)))
    {
      safe_exit(EX_MYSQLERR);
      DBUG_RETURN(1);
    }
    row= mysql_fetch_row(table_res);

    lengths= mysql_fetch_lengths(table_res);

    /*
+1 −1
Original line number Diff line number Diff line
@@ -651,7 +651,7 @@ AC_ARG_ENABLE(assembler,

AC_MSG_CHECKING(if we should use assembler functions)
# For now we only support assembler on i386 and sparc systems
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386")
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
+4 −0
Original line number Diff line number Diff line
--require r/case_sensitive_file_system.require
--disable_query_log
show variables like "lower_case_file_system";
--enable_query_log
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ sub collect_test_cases ($) {
      while ( <DISABLED> )
      {
        chomp;
        if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
        if ( /^\s*([^\s:]+)\s*:\s*(.*?)\s*$/ )
        {
          $disabled{$1}= $2;
        }
Loading