Loading client/mysql.cc +3 −2 Original line number Diff line number Diff line Loading @@ -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++; } Loading configure.in +2 −2 Original line number Diff line number Diff line Loading @@ -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" Loading myisam/mi_check.c +23 −9 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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 */ Loading @@ -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; Loading @@ -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; Loading @@ -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; } } } } Loading mysql-test/r/fulltext2.result +9 −0 Original line number Diff line number Diff line Loading @@ -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 Loading mysql-test/r/merge.result +9 −0 Original line number Diff line number Diff line Loading @@ -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
client/mysql.cc +3 −2 Original line number Diff line number Diff line Loading @@ -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++; } Loading
configure.in +2 −2 Original line number Diff line number Diff line Loading @@ -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" Loading
myisam/mi_check.c +23 −9 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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 */ Loading @@ -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; Loading @@ -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; Loading @@ -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; } } } } Loading
mysql-test/r/fulltext2.result +9 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
mysql-test/r/merge.result +9 −0 Original line number Diff line number Diff line Loading @@ -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;