diff options
author | unknown <hf@deer.(none)> | 2004-06-02 19:17:35 +0500 |
---|---|---|
committer | unknown <hf@deer.(none)> | 2004-06-02 19:17:35 +0500 |
commit | d55cb81cb0b89c14663e814a53b2fc69d0710580 (patch) | |
tree | ff05e5599bdcdb7f2d378d8130e42f7d8d5bea93 /myisam/rt_test.c | |
parent | 911073ed99d8622b165c0ecd69bc1175431f829a (diff) | |
parent | 21dea7fc0b4412586765e45a6b900e380cef9a58 (diff) | |
download | mariadb-git-d55cb81cb0b89c14663e814a53b2fc69d0710580.tar.gz |
Merging
myisam/rt_index.c:
Auto merged
myisam/rt_index.h:
Auto merged
myisam/rt_mbr.c:
Auto merged
myisam/rt_mbr.h:
Auto merged
myisam/rt_split.c:
Auto merged
myisam/rt_test.c:
Auto merged
sql/spatial.cc:
Auto merged
Diffstat (limited to 'myisam/rt_test.c')
-rw-r--r-- | myisam/rt_test.c | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/myisam/rt_test.c b/myisam/rt_test.c index 5bf390cd0d8..5e883e223b3 100644 --- a/myisam/rt_test.c +++ b/myisam/rt_test.c @@ -34,6 +34,51 @@ static void create_record1(char *record,uint rownr); static void print_record(char * record,my_off_t offs,const char * tail); static int run_test(const char *filename); +static double rt_data[]= +{ + /*1*/ 0,10,0,10, + /*2*/ 5,15,0,10, + /*3*/ 0,10,5,15, + /*4*/ 10,20,10,20, + /*5*/ 0,10,0,10, + /*6*/ 5,15,0,10, + /*7*/ 0,10,5,15, + /*8*/ 10,20,10,20, + /*9*/ 0,10,0,10, + /*10*/ 5,15,0,10, + /*11*/ 0,10,5,15, + /*12*/ 10,20,10,20, + /*13*/ 0,10,0,10, + /*14*/ 5,15,0,10, + /*15*/ 0,10,5,15, + /*16*/ 10,20,10,20, + /*17*/ 5,15,0,10, + /*18*/ 0,10,5,15, + /*19*/ 10,20,10,20, + /*20*/ 0,10,0,10, + + /*1*/ 100,110,0,10, + /*2*/ 105,115,0,10, + /*3*/ 100,110,5,15, + /*4*/ 110,120,10,20, + /*5*/ 100,110,0,10, + /*6*/ 105,115,0,10, + /*7*/ 100,110,5,15, + /*8*/ 110,120,10,20, + /*9*/ 100,110,0,10, + /*10*/ 105,115,0,10, + /*11*/ 100,110,5,15, + /*12*/ 110,120,10,20, + /*13*/ 100,110,0,10, + /*14*/ 105,115,0,10, + /*15*/ 100,110,5,15, + /*16*/ 110,120,10,20, + /*17*/ 105,115,0,10, + /*18*/ 100,110,5,15, + /*19*/ 110,120,10,20, + /*20*/ 100,110,0,10, + -1 +}; int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) { @@ -58,7 +103,7 @@ static int run_test(const char *filename) int key_type=HA_KEYTYPE_DOUBLE; int key_length=8; int null_fields=0; - int nrecords=300; + int nrecords=sizeof(rt_data)/(sizeof(double)*4);/* 3000;*/ int rec_length=0; int uniques=0; int i; @@ -381,7 +426,7 @@ static void create_record1(char *record,uint rownr) } -static void create_record(char *record,uint rownr) +static void create_record0(char *record,uint rownr) { int i; char * pos; @@ -402,6 +447,19 @@ static void create_record(char *record,uint rownr) } } +static void create_record(char *record,uint rownr) +{ + int i; + char *pos; + double *data= rt_data+rownr*4; + record[0]=0x01; /* DEL marker */ + for ( pos=record+1, i=0; i<ndims*2; i++) + { + float8store(pos,data[i]); + pos+=8; + } +} + #else int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused))) { |