diff options
author | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-23 17:09:27 -0300 |
---|---|---|
committer | Davi Arnaut <davi.arnaut@oracle.com> | 2010-07-23 17:09:27 -0300 |
commit | 9fd9857e0bd02932543c03495599b19ea081031c (patch) | |
tree | 541cfc3d5f16c89cdcacdc7babd0c0fdf9de16a0 /storage | |
parent | 9e01fddb5b3bcceb760a86a10d2d07e05076c360 (diff) | |
download | mariadb-git-9fd9857e0bd02932543c03495599b19ea081031c.tar.gz |
WL#5498: Remove dead and unused source code
Remove code that has been disabled for a long time.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/heap/hp_test2.c | 5 | ||||
-rw-r--r-- | storage/myisam/mi_dynrec.c | 14 | ||||
-rw-r--r-- | storage/myisam/myisamdef.h | 4 | ||||
-rw-r--r-- | storage/myisam/rt_test.c | 43 | ||||
-rw-r--r-- | storage/myisam/sp_test.c | 69 |
5 files changed, 0 insertions, 135 deletions
diff --git a/storage/heap/hp_test2.c b/storage/heap/hp_test2.c index 1571fc98402..3ee903be7ed 100644 --- a/storage/heap/hp_test2.c +++ b/storage/heap/hp_test2.c @@ -179,11 +179,6 @@ int main(int argc, char *argv[]) printf("can't find key1: \"%s\"\n",(char*) key); goto err; } -#ifdef NOT_USED - if (file->current_ptr == hp_find_block(&file->s->block,0) || - file->current_ptr == hp_find_block(&file->s->block,1)) - continue; /* Don't remove 2 first records */ -#endif if (heap_delete(file,record)) { printf("error: %d; can't delete record: \"%s\"\n", my_errno,(char*) record); diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c index 59b895b5e64..37c5c34658e 100644 --- a/storage/myisam/mi_dynrec.c +++ b/storage/myisam/mi_dynrec.c @@ -283,13 +283,6 @@ int _mi_write_blob_record(MI_INFO *info, const uchar *record) MI_DYN_DELETE_BLOCK_HEADER+1); reclength= (info->s->base.pack_reclength + _my_calc_total_blob_length(info,record)+ extra); -#ifdef NOT_USED /* We now support big rows */ - if (reclength > MI_DYN_MAX_ROW_LENGTH) - { - my_errno=HA_ERR_TO_BIG_ROW; - return -1; - } -#endif if (!(rec_buff=(uchar*) my_alloca(reclength))) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ @@ -317,13 +310,6 @@ int _mi_update_blob_record(MI_INFO *info, my_off_t pos, const uchar *record) MI_DYN_DELETE_BLOCK_HEADER); reclength= (info->s->base.pack_reclength+ _my_calc_total_blob_length(info,record)+ extra); -#ifdef NOT_USED /* We now support big rows */ - if (reclength > MI_DYN_MAX_ROW_LENGTH) - { - my_errno=HA_ERR_TO_BIG_ROW; - return -1; - } -#endif if (!(rec_buff=(uchar*) my_alloca(reclength))) { my_errno= HA_ERR_OUT_OF_MEM; /* purecov: inspected */ diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h index 130a96bc9e0..7312500abbd 100644 --- a/storage/myisam/myisamdef.h +++ b/storage/myisam/myisamdef.h @@ -544,10 +544,6 @@ void _mi_store_static_key(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp); void _mi_store_var_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp); -#ifdef NOT_USED -void _mi_store_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos, - MI_KEY_PARAM *s_temp); -#endif void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo, uchar *key_pos, MI_KEY_PARAM *s_temp); diff --git a/storage/myisam/rt_test.c b/storage/myisam/rt_test.c index 4a9b61605d9..7233300c539 100644 --- a/storage/myisam/rt_test.c +++ b/storage/myisam/rt_test.c @@ -366,25 +366,6 @@ static int read_with_pos (MI_INFO * file,int silent) } -#ifdef NOT_USED -static void bprint_record(char * record, - my_off_t offs __attribute__((unused)), - const char * tail) -{ - int i; - char * pos; - i=(unsigned char)record[0]; - printf("%02X ",i); - - for( pos=record+1, i=0; i<32; i++,pos++){ - int b=(unsigned char)*pos; - printf("%02X",b); - } - printf("%s",tail); -} -#endif - - static void print_record(uchar * record, my_off_t offs __attribute__((unused)), const char * tail) @@ -424,30 +405,6 @@ static void create_record1(uchar *record,uint rownr) } } -#ifdef NOT_USED - -static void create_record0(uchar *record,uint rownr) -{ - int i; - char * pos; - double c=rownr+10; - double c0=0; - - bzero((char*) record,MAX_REC_LENGTH); - record[0]=0x01; /* DEL marker */ - - for ( pos=record+1, i=0; i<ndims; i++) - { - memcpy(pos,&c0,sizeof(c0)); - float8store(pos,c0); - pos+=sizeof(c0); - memcpy(pos,&c,sizeof(c)); - float8store(pos,c); - pos+=sizeof(c); - } -} - -#endif static void create_record(uchar *record,uint rownr) { diff --git a/storage/myisam/sp_test.c b/storage/myisam/sp_test.c index 069f43c320d..7358b138a67 100644 --- a/storage/myisam/sp_test.c +++ b/storage/myisam/sp_test.c @@ -299,26 +299,6 @@ static int read_with_pos (MI_INFO * file,int silent) } -#ifdef NOT_USED -static void bprint_record(uchar * record, - my_off_t offs __attribute__((unused)), - const char * tail) -{ - int i; - char * pos; - i=(unsigned char)record[0]; - printf("%02X ",i); - - for( pos=record+1, i=0; i<32; i++,pos++) - { - int b=(unsigned char)*pos; - printf("%02X",b); - } - printf("%s",tail); -} -#endif - - static void print_record(uchar * record, my_off_t offs,const char * tail) { uchar *pos; @@ -340,34 +320,6 @@ static void print_record(uchar * record, my_off_t offs,const char * tail) } -#ifdef NOT_USED -static void create_point(uchar *record,uint rownr) -{ - uint tmp; - char *ptr; - char *pos=record; - double x[200]; - int i; - - for(i=0;i<SPDIMS;i++) - x[i]=rownr; - - bzero((char*) record,MAX_REC_LENGTH); - *pos=0x01; /* DEL marker */ - pos++; - - memset(blob_key,0,sizeof(blob_key)); - tmp=rtree_CreatePointWKB(x,SPDIMS,blob_key); - - int4store(pos,tmp); - pos+=4; - - ptr=blob_key; - memcpy_fixed(pos,&ptr,sizeof(char*)); -} -#endif - - static void create_linestring(uchar *record,uint rownr) { uint tmp; @@ -426,27 +378,6 @@ static void print_key(const uchar *key,const char * tail) } -#ifdef NOT_USED - -static int rtree_CreatePointWKB(double *ords, uint n_dims, uchar *wkb) -{ - uint i; - - *wkb = wkbXDR; - ++wkb; - int4store(wkb, wkbPoint); - wkb += 4; - - for (i=0; i < n_dims; ++i) - { - float8store(wkb, ords[i]); - wkb += 8; - } - return 5 + n_dims * 8; -} -#endif - - static int rtree_CreateLineStringWKB(double *ords, uint n_dims, uint n_points, uchar *wkb) { |