mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 19:11:46 +01:00
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
This commit is contained in:
commit
b89e5bbc95
1 changed files with 13 additions and 16 deletions
|
@ -204,7 +204,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
uint off;
|
uint off;
|
||||||
int subkeys;
|
int subkeys=1;
|
||||||
my_bool can_go_down;
|
my_bool can_go_down;
|
||||||
MI_INFO *info=ftb->info;
|
MI_INFO *info=ftb->info;
|
||||||
|
|
||||||
|
@ -279,22 +279,19 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
|
||||||
|
|
||||||
/* matching key found */
|
/* matching key found */
|
||||||
memcpy(ftbw->word+ftbw->off, info->lastkey, info->lastkey_length);
|
memcpy(ftbw->word+ftbw->off, info->lastkey, info->lastkey_length);
|
||||||
if (!ftbw->off && (init_search || (ftbw->flags & FTB_FLAG_TRUNC)))
|
/* going down ? */
|
||||||
|
if (subkeys<0)
|
||||||
{
|
{
|
||||||
/* going down ? */
|
/*
|
||||||
if (subkeys<0)
|
yep, going down, to the second-level tree
|
||||||
{
|
TODO here: subkey-based optimization
|
||||||
/*
|
*/
|
||||||
yep, going down, to the second-level tree
|
ftbw->off=off;
|
||||||
TODO here: subkey-based optimization
|
ftbw->key_root=info->lastpos;
|
||||||
*/
|
ftbw->keyinfo=& info->s->ft2_keyinfo;
|
||||||
ftbw->off=off;
|
r=_mi_search_first(info, ftbw->keyinfo, ftbw->key_root);
|
||||||
ftbw->key_root=info->lastpos;
|
DBUG_ASSERT(r==0); /* found something */
|
||||||
ftbw->keyinfo=& info->s->ft2_keyinfo;
|
memcpy(ftbw->word+off, info->lastkey, info->lastkey_length);
|
||||||
r=_mi_search_first(info, ftbw->keyinfo, ftbw->key_root);
|
|
||||||
DBUG_ASSERT(r==0); /* found something */
|
|
||||||
memcpy(ftbw->word+off, info->lastkey, info->lastkey_length);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ftbw->docid[0]=info->lastpos;
|
ftbw->docid[0]=info->lastpos;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue