svnno****@sourc*****
svnno****@sourc*****
2008年 6月 10日 (火) 18:20:15 JST
Revision: 139 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=tritonn&view=rev&rev=139 Author: mir Date: 2008-06-10 18:20:15 +0900 (Tue, 10 Jun 2008) Log Message: ----------- removed testing function "func_snip" Modified Paths: -------------- trunk/src/ha_tritonn.cc -------------- next part -------------- Modified: trunk/src/ha_tritonn.cc =================================================================== --- trunk/src/ha_tritonn.cc 2008-06-10 02:04:07 UTC (rev 138) +++ trunk/src/ha_tritonn.cc 2008-06-10 09:20:15 UTC (rev 139) @@ -28,56 +28,6 @@ static HASH tritonn_open_tables; ///< Hash used to track the number of open tables; variable for tritonn share methods pthread_mutex_t tritonn_mutex; ///< This is the mutex used to init the hash; variable for tritonn share methods -#include <stdio.h> -#include <senna/senna.h> - -const char *path = "hoge"; -int key_size = 4; -int flags = SEN_INDEX_NORMALIZE | SEN_INDEX_NGRAM; -int initial_n_segments = 512; -sen_encoding encoding = sen_enc_utf8; - -int key_1 = 100; -int key_2 = 200; -int key_3 = 300; -int key_4 = 400; - -int keybuf; -int bufsize = 4; -int score; -int key; -int hits; - -int func_snip() -{ - printf("func_snip started\n"); - sen_init(); - sen_index_remove(path); - sen_index *index = sen_index_create(path, key_size, flags, initial_n_segments, encoding); - - sen_index_upd(index, &key_1, NULL, 0, "aaa", 3); - sen_index_upd(index, &key_2, NULL, 0, "bbb", 3); - sen_index_upd(index, &key_3, NULL, 0, "ccc", 3); - sen_index_upd(index, &key_4, NULL, 0, "ddd", 3); - - sen_records *records = sen_index_sel(index, "aaa", 3); - - hits = sen_records_nhits(records); - printf("number of hit is %d\n", hits); - - while ((key = sen_records_next(records, &keybuf, bufsize, &score))) - { - printf("key=%d, keybuf=%d, score=%d\n", key, keybuf, score); - } - - sen_records_close(records); - sen_index_close(index); - sen_fin(); - printf("func_snip finished\n"); - return 0; -} - - static uchar* get_key(TRITONN_SHARE *share, size_t *length, my_bool not_used __attribute__((unused))) { @@ -267,7 +217,6 @@ { DBUG_ENTER("ha_tritonn::create"); /* This is not implemented but we want someone to be able to see that it works. */ - /*func_snip();*/ DBUG_RETURN(0); }