diff options
author | unknown <serg@infomag.ape.relarn.ru> | 2000-08-17 19:30:36 +0400 |
---|---|---|
committer | unknown <serg@infomag.ape.relarn.ru> | 2000-08-17 19:30:36 +0400 |
commit | f02d7772d9a18c312fba536784511f6858f0706f (patch) | |
tree | 6619554e62beb76cf3c8b15d68b4a3b36f96223a /myisam/ft_eval.c | |
parent | 3843d8e5a7138c71361cd9901eb6f8271ff10f19 (diff) | |
download | mariadb-git-f02d7772d9a18c312fba536784511f6858f0706f.tar.gz |
Many MATCH'es per query now allowed (i.e. AND's and OR's now work, but
slow - full table scan); ORDER BY now works with MATCH (slow, full table
scan)
myisam/ft_eval.c:
ft_read_next compatibility
myisam/ft_test1.c:
ft_read_next compatibility
include/ft_global.h:
ft_read_next redesigned, ft_get_relevance introduced
sql/ha_myisam.cc:
Many MATCH'es per query now allowed
sql/ha_myisam.h:
Many MATCH'es per query now allowed
sql/handler.h:
Many MATCH'es per query now allowed
sql/item_func.cc:
Many MATCH'es per query now allowed
sql/item_func.h:
Many MATCH'es per query now allowed
sql/sql_select.cc:
Many MATCH'es per query now allowed
myisam/ft_search.c:
HA_KEY_NOT_FOUND => HA_END_OF_FILE
Diffstat (limited to 'myisam/ft_eval.c')
-rw-r--r-- | myisam/ft_eval.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/myisam/ft_eval.c b/myisam/ft_eval.c index eeb414a7505..6739e631d8c 100644 --- a/myisam/ft_eval.c +++ b/myisam/ft_eval.c @@ -1,15 +1,15 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -82,7 +82,7 @@ int main(int argc,char *argv[]) if (!silent) printf("- Reading rows with key\n"); for(i=1;create_record(record,qf);i++) { - FT_DOCLIST *result; double w; int t; + FT_DOCLIST *result; double w; int t,err; result=ft_init_search(file,0,blob_record,(uint) strlen(blob_record),1); if(!result) { @@ -91,11 +91,12 @@ int main(int argc,char *argv[]) } if (!silent) printf("Query %d. Found: %d.\n",i,result->ndocs); - for(j=0;(w=ft_read_next(result, read_record))>0;j++) { + for(j=0;(err=ft_read_next(result, read_record))==0;j++) { t=uint2korr(read_record); + w=ft_get_relevance(result); printf("%d %.*s %f\n",i,t,read_record+2,w); } - if(w<0) { + if(err != HA_ERR_KEY_NOT_FOUND) { printf("ft_read_next %d failed with errno %3d\n",j,my_errno); goto err; } |