Commit f3c2cc13 authored by unknown's avatar unknown
Browse files

Merge msvensson.mysql.internal:mysql/mysql-5.1-maint

into  shellback.(none):/home/msvensson/mysql/mysql-5.1-maint

parents cf6b5738 549c922b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -8,6 +8,12 @@ LIMIT=10000
VERSION="5.1"
BKROOT=`bk root`

if [ -x /usr/sbin/sendmail ]; then
  SENDMAIL=/usr/sbin/sendmail
else
  SENDMAIL=sendmail
fi

if [ "$REAL_EMAIL" = "" ]
then
 echo "Warning: you must set REAL_EMAIL in your profile"
@@ -61,7 +67,7 @@ EOF
  bk cset -r+ -d
 ) > $BKROOT/BitKeeper/tmp/dev_public.txt

bk sendmail -t < $BKROOT/BitKeeper/tmp/dev_public.txt
$SENDMAIL -t < $BKROOT/BitKeeper/tmp/dev_public.txt

#++
# commits@ mail
@@ -87,7 +93,7 @@ EOF
  bk cset -r+ -d
 ) | bk sed -e ${LIMIT}q > $BKROOT/BitKeeper/tmp/commits.txt

bk sendmail -t < $BKROOT/BitKeeper/tmp/commits.txt
$SENDMAIL -t < $BKROOT/BitKeeper/tmp/commits.txt

#++
# docs-commit@ mail
@@ -108,7 +114,7 @@ EOF
  bk changes -v -r+
  bk cset -r+ -d
 ) > $BKROOT/BitKeeper/tmp/docs.txt
 bk sendmail -t < $BKROOT/BitKeeper/tmp/docs.txt
 $SENDMAIL -t < $BKROOT/BitKeeper/tmp/docs.txt
 fi

else
+1 −5
Original line number Diff line number Diff line
@@ -2301,10 +2301,8 @@ print_table_data(MYSQL_RES *result)
  MYSQL_ROW	cur;
  MYSQL_FIELD	*field;
  bool		*num_flag;
  bool		*not_null_flag;

  num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
  not_null_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
  if (info_flag)
  {
    print_field_types(result);
@@ -2343,7 +2341,6 @@ print_table_data(MYSQL_RES *result)
                                            MAX_COLUMN_LENGTH),
                  field->name);
      num_flag[off]= IS_NUM(field->type);
      not_null_flag[off]= IS_NOT_NULL(field->flags);
    }
    (void) tee_fputs("\n", PAGER);
    tee_puts((char*) separator.ptr(), PAGER);
@@ -2364,7 +2361,7 @@ print_table_data(MYSQL_RES *result)
      uint visible_length;
      uint extra_padding;

      if (! not_null_flag[off] && (cur[off] == NULL))
      if (cur[off] == NULL)
      {
        buffer= "NULL";
        data_length= 4;
@@ -2404,7 +2401,6 @@ print_table_data(MYSQL_RES *result)
  }
  tee_puts((char*) separator.ptr(), PAGER);
  my_afree((gptr) num_flag);
  my_afree((gptr) not_null_flag);
}


+1 −1
Original line number Diff line number Diff line
@@ -200,7 +200,7 @@ static int create_defaults_file(const char *path, const char *our_defaults_path)
  }
  buffer_end= strnmov(buffer, "\n[client]", sizeof(buffer));
  if (opt_password)
    buffer_end= strxnmov(buffer, sizeof(buffer),
    buffer_end= strxnmov(buffer_end, sizeof(buffer),
                         "\npassword=", opt_password, NullS);
  error= my_write(defaults_file, buffer, (int) (buffer_end - buffer),
                  MYF(MY_WME | MY_FNABP));
+13 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ static char *alloc_query_str(ulong size);
static char *field_escape(char *to,const char *from,uint length);
static my_bool  verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
                quick= 1, extended_insert= 1,
                lock_tables=1,ignore_errors=0,flush_logs=0,
                lock_tables=1,ignore_errors=0,flush_logs=0,flush_privileges=0,
                opt_drop=1,opt_keywords=0,opt_lock=1,opt_compress=0,
                opt_delayed=0,create_options=1,opt_quoted=0,opt_databases=0,
                opt_alldbs=0,opt_create_db=0,opt_lock_all_tables=0,
@@ -266,6 +266,12 @@ static struct my_option my_long_options[] =
   "--lock-all-tables or --master-data with --flush-logs",
   (gptr*) &flush_logs, (gptr*) &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
   0, 0},
  {"flush-privileges", OPT_ESC, "Emit a FLUSH PRIVILEGES statement "
   "after dumping the mysql database.  This option should be used any "
   "time the dump contains the mysql database and any other database "
   "that depends on the data in the mysql database for proper restore. ",
   (gptr*) &flush_privileges, (gptr*) &flush_privileges, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
   0, 0},
  {"force", 'f', "Continue even if we get an sql-error.",
   (gptr*) &ignore_errors, (gptr*) &ignore_errors, 0, GET_BOOL, NO_ARG,
   0, 0, 0, 0, 0, 0},
@@ -3037,6 +3043,7 @@ static int dump_all_tables_in_db(char *database)

  char hash_key[2*NAME_LEN+2];  /* "db.tablename" */
  char *afterdot;
  int using_mysql_db= my_strcasecmp(&my_charset_latin1, database, "mysql");

  afterdot= strmov(hash_key, database);
  *afterdot++= '.';
@@ -3099,6 +3106,11 @@ static int dump_all_tables_in_db(char *database)
  }
  if (lock_tables)
    VOID(mysql_query_with_error_report(mysql, 0, "UNLOCK TABLES"));
  if (flush_privileges && using_mysql_db == 0)
  {
    fprintf(md_result_file,"\n--\n-- Flush Grant Tables \n--\n");
    fprintf(md_result_file,"\n/*! FLUSH PRIVILEGES */;\n");
  }
  return 0;
} /* dump_all_tables_in_db */

+10 −0
Original line number Diff line number Diff line
@@ -695,6 +695,16 @@ CREATE TABLE t2 (z int, y int);
CREATE TABLE t3 (a int, b int);
INSERT INTO t3 (SELECT x, y FROM t1 JOIN t2 USING (y) WHERE z = 1);
DROP TABLE IF EXISTS t1,t2,t3;
CREATE DATABASE bug21774_1;
CREATE DATABASE bug21774_2;
CREATE TABLE bug21774_1.t1(id VARCHAR(10) NOT NULL,label VARCHAR(255));
CREATE TABLE bug21774_2.t1(id VARCHAR(10) NOT NULL,label VARCHAR(255));
CREATE TABLE bug21774_1.t2(id VARCHAR(10) NOT NULL,label VARCHAR(255));
INSERT INTO bug21774_2.t1 SELECT t1.* FROM bug21774_1.t1;
use bug21774_1;
INSERT INTO bug21774_2.t1 SELECT t1.* FROM t1;
DROP DATABASE bug21774_1;
DROP DATABASE bug21774_2;
CREATE DATABASE meow;
CREATE TABLE table_target   ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
CREATE TABLE table_target2  ( mexs_id CHAR(8), messzeit TIMESTAMP, PRIMARY KEY (mexs_id));
Loading