Commit 44dcd7e8 authored by unknown's avatar unknown
Browse files

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/my/mysql-5.0


BitKeeper/triggers/post-commit:
  Auto merged
mysql-test/r/distinct.result:
  Auto merged
mysql-test/r/select.result:
  Auto merged
sql/table.cc:
  Auto merged
parents 265bc984 6992c010
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ serg@sergbook.mysql.com
sergefp@mysql.com
sinisa@rhols221.adsl.netsonic.fi
stewart@mysql.com
svoj@mysql.com
tfr@beta.frontier86.ee
tfr@indrek.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee
+8 −1
Original line number Diff line number Diff line
@@ -253,6 +253,7 @@ VAR var_reg[10];
/*Perl/shell-like variable registers */
HASH var_hash;
my_bool disable_query_log=0, disable_result_log=0, disable_warnings=0;
my_bool disable_ps_warnings= 0;
my_bool disable_info= 1;			/* By default off */
my_bool abort_on_error= 1;

@@ -283,6 +284,7 @@ Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER,
Q_WAIT_FOR_SLAVE_TO_STOP,
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
Q_ENABLE_PS_WARNINGS, Q_DISABLE_PS_WARNINGS,
Q_ENABLE_INFO, Q_DISABLE_INFO,
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
Q_EXEC, Q_DELIMITER,
@@ -360,6 +362,8 @@ const char *command_names[]=
  "wait_for_slave_to_stop",
  "enable_warnings",
  "disable_warnings",
  "enable_ps_warnings",
  "disable_ps_warnings",
  "enable_info",
  "disable_info",
  "enable_metadata",
@@ -3021,6 +3025,7 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags)

  /* We may have got warnings already, collect them if any */
  /* FIXME we only want this if the statement succeeds I think */ 
  if (!disable_ps_warnings)
    run_query_stmt_handle_warnings(mysql, ds);

  /*
@@ -3711,6 +3716,8 @@ int main(int argc, char **argv)
      case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
      case Q_ENABLE_WARNINGS:    disable_warnings=0; break;
      case Q_DISABLE_WARNINGS:   disable_warnings=1; break;
      case Q_ENABLE_PS_WARNINGS:    disable_ps_warnings=0; break;
      case Q_DISABLE_PS_WARNINGS:   disable_ps_warnings=1; break;
      case Q_ENABLE_INFO:        disable_info=0; break;
      case Q_DISABLE_INFO:       disable_info=1; break;
      case Q_ENABLE_METADATA:    display_metadata=1; break;
+11 −7
Original line number Diff line number Diff line
@@ -71,9 +71,11 @@ void Querycache_stream::store_int(uint i)
    cur_data+= 4;
    return;
  }
  memcpy(cur_data, &i, rest_len);
  char buf[4];
  int4store(buf, i);
  memcpy(cur_data, buf, rest_len);
  use_next_block();
  memcpy(cur_data, ((byte*)&i)+rest_len, 4-rest_len);
  memcpy(cur_data, buf+rest_len, 4-rest_len);
  cur_data+= 4-rest_len;
}

@@ -186,10 +188,12 @@ uint Querycache_stream::load_int()
    cur_data+= 4;
    return result;
  }
  memcpy(&result, cur_data, rest_len);
  char buf[4];
  memcpy(buf, cur_data, rest_len);
  use_next_block();
  memcpy(((byte*)&result)+rest_len, cur_data, 4-rest_len);
  memcpy(buf+rest_len, cur_data, 4-rest_len);
  cur_data+= 4-rest_len;
  result= uint4korr(buf);
  return result;
}

@@ -270,10 +274,10 @@ int Querycache_stream::load_column(MEM_ROOT *alloc, char** column)
    return 0;
  }
  len--;
  if (!(*column= (char *)alloc_root(alloc, len + 4 + 1)))
  if (!(*column= (char *)alloc_root(alloc, len + sizeof(uint) + 1)))
    return 1;
  int4store(*column, len);
  (*column)+= 4;
  *((uint*)*column)= len;
  (*column)+= sizeof(uint);
  load_str_only(*column, len);
  return 1;
}
+14 −22
Original line number Diff line number Diff line
@@ -436,32 +436,24 @@ static int _ftb_strstr(const byte *s0, const byte *e0,
                const byte *s1, const byte *e1,
                CHARSET_INFO *cs)
{
  const byte *p0, *p1;
  my_bool s_after, e_before;

  s_after=true_word_char(cs, s1[0]);
  e_before=true_word_char(cs, e1[-1]);
  p0=s0;
  const byte *p0= s0;
  my_bool s_after= true_word_char(cs, s1[0]);
  my_bool e_before= true_word_char(cs, e1[-1]);
  uint p0_len;
  my_match_t m[2];

  while (p0 < e0)
  {
    while (p0 < e0 && cs->to_upper[(uint) (uchar) *p0++] !=
           cs->to_upper[(uint) (uchar) *s1])
      /* no-op */;
    if (p0 >= e0)
      return 0;

    if (s_after && p0-1 > s0 && true_word_char(cs, p0[-2]))
      continue;

    p1=s1+1;
    while (p0 < e0 && p1 < e1 && cs->to_upper[(uint) (uchar) *p0] ==
           cs->to_upper[(uint) (uchar) *p1])
      p0++, p1++;
    if (p1 == e1 && (!e_before || p0 == e0 || !true_word_char(cs, p0[0])))
      return 1;
    if (cs->coll->instr(cs, p0, e0 - p0, s1, e1 - s1, m, 2) != 2)
      return(0);
    if ((!s_after || p0 + m[1].beg == s0 || !true_word_char(cs, p0[m[1].beg-1])) &&
        (!e_before || p0 + m[1].end == e0 || !true_word_char(cs, p0[m[1].end])))
      return(1);
    p0+= m[1].beg;
    p0+= (p0_len= my_mbcharlen(cs, *(uchar *)p0)) ? p0_len : 1;
  }
  return 0;

  return(0);
}


+4 −4
Original line number Diff line number Diff line
@@ -77,7 +77,7 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
    /* Read the next block of index file into the preload buffer */
    if ((my_off_t) length > (key_file_length-pos))
      length= (ulong) (key_file_length-pos);
    if (my_pread(share->kfile, (byte*) buff, length, pos, MYF(MY_FAE)))
    if (my_pread(share->kfile, (byte*) buff, length, pos, MYF(MY_FAE|MY_FNABP)))
      goto err;

    if (ignore_leaves)
Loading