Commit 7d0df267 authored by unknown's avatar unknown
Browse files

Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1

into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b5291

parents 4b4af1c1 1230daf8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2693,6 +2693,7 @@ char *get_arg(char *line, my_bool get_next_arg)
      ptr++;
    if (*ptr == '\\') // short command was used
      ptr+= 2;
    else
      while (*ptr &&!my_isspace(charset_info, *ptr)) // skip command
        ptr++;
  }
+2 −2
Original line number Diff line number Diff line
@@ -2445,10 +2445,10 @@ elif test "$extra_charsets" = none; then
  CHARSETS="$CHARSETS"
elif test "$extra_charsets" = complex; then
  CHARSETS="$CHARSETS $CHARSETS_COMPLEX"
  AC_DEFINE([DEFINE_ALL_CHARACTER_SETS])
  AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
elif test "$extra_charsets" = all; then
  CHARSETS="$CHARSETS $CHARSETS_AVAILABLE"
  AC_DEFINE([DEFINE_ALL_CHARACTER_SETS])
  AC_DEFINE([DEFINE_ALL_CHARACTER_SETS],1,[all charsets are available])
else
  EXTRA_CHARSETS=`echo $extra_charsets | sed -e 's/,/ /g'`
  CHARSETS="$CHARSETS $EXTRA_CHARSETS"
+23 −9
Original line number Diff line number Diff line
@@ -1585,7 +1585,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
  int old_lock;
  MYISAM_SHARE *share=info->s;
  MI_STATE_INFO old_state;
  DBUG_ENTER("sort_index");
  DBUG_ENTER("mi_sort_index");

  if (!(param->testflag & T_SILENT))
    printf("- Sorting index for MyISAM-table '%s'\n",name);
@@ -1664,7 +1664,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
err2:
  VOID(my_delete(param->temp_filename,MYF(MY_WME)));
  DBUG_RETURN(-1);
} /* sort_index */
} /* mi_sort_index */


	 /* Sort records recursive using one index */
@@ -1672,7 +1672,7 @@ int mi_sort_index(MI_CHECK *param, register MI_INFO *info, my_string name)
static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
			  my_off_t pagepos, File new_file)
{
  uint length,nod_flag,used_length;
  uint length,nod_flag,used_length, key_length;
  uchar *buff,*keypos,*endpos;
  uchar key[MI_MAX_POSSIBLE_KEY_BUFF];
  my_off_t new_page_pos,next_page;
@@ -1693,7 +1693,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
		llstr(pagepos,llbuff));
    goto err;
  }
  if ((nod_flag=mi_test_if_nod(buff)))
  if ((nod_flag=mi_test_if_nod(buff)) || keyinfo->flag & HA_FULLTEXT)
  {
    used_length=mi_getint(buff);
    keypos=buff+2+nod_flag;
@@ -1714,11 +1714,25 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
	}
      }
      if (keypos >= endpos ||
	  ((*keyinfo->get_key)(keyinfo,nod_flag,&keypos,key)) == 0)
	  (key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&keypos,key)) == 0)
	break;
#ifdef EXTRA_DEBUG
      assert(keypos <= endpos);
#endif
      DBUG_ASSERT(keypos <= endpos);
      if (keyinfo->flag & HA_FULLTEXT)
      {
        uint off;
        int  subkeys;
        get_key_full_length_rdonly(off, key);
        subkeys=ft_sintXkorr(key+off);
        if (subkeys < 0)
        {
          next_page= _mi_dpos(info,0,key+key_length);
          _mi_dpointer(info,keypos-nod_flag-info->s->rec_reflength,
                       param->new_file_pos); /* Save new pos */
          if (sort_one_index(param,info,&info->s->ft2_keyinfo,
                             next_page,new_file))
            goto err;
        }
      }
    }
  }

+9 −0
Original line number Diff line number Diff line
@@ -7,6 +7,15 @@ FULLTEXT KEY (a)
repair table t1 quick;
Table	Op	Msg_type	Msg_text
test.t1	repair	status	OK
check table t1;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
optimize table t1;
Table	Op	Msg_type	Msg_text
test.t1	optimize	status	OK
check table t1;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
select count(*) from t1 where match a against ('aaaxxx');
count(*)
260
+9 −0
Original line number Diff line number Diff line
@@ -642,3 +642,12 @@ x y
1	3
1	2
drop table t1,t2,t3;
create table t1 (a int);
create table t2 (a int);
insert into t1 values (0);
insert into t2 values (1);
create table t3 engine=merge union=(t1, t2) select * from t1;
ERROR HY000: You can't specify target table 't1' for update in FROM clause
create table t3 engine=merge union=(t1, t2) select * from t2;
ERROR HY000: You can't specify target table 't2' for update in FROM clause
drop table t1, t2;
Loading