summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authormonty@donna.mysql.com <>2001-01-17 03:15:20 +0200
committermonty@donna.mysql.com <>2001-01-17 03:15:20 +0200
commit0732f7475eb4775fcfff20257bbe386b38e51a99 (patch)
tree256b185f833ce2fac42471efe65aa7bde9b9a8da /sql/field.h
parent5f4a3f51675240ac05daaba50926740e380e5016 (diff)
downloadmariadb-git-0732f7475eb4775fcfff20257bbe386b38e51a99.tar.gz
Fixed for bugs that was found when getting full code coverage of BDB
Fixed bug with HEAP tables on windows Fixed bug with HAVING on empty tables
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h44
1 files changed, 10 insertions, 34 deletions
diff --git a/sql/field.h b/sql/field.h
index 4af7c17486a..21fd9ebffd9 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -166,7 +166,12 @@ public:
memcpy(to,from,length);
return from+length;
}
- virtual char *keypack(char* to, const char *from, uint max_length=~(uint) 0)
+ virtual char *pack_key(char* to, const char *from, uint max_length)
+ {
+ return pack(to,from,max_length);
+ }
+ virtual char *pack_key_from_key_image(char* to, const char *from,
+ uint max_length)
{
return pack(to,from,max_length);
}
@@ -861,39 +866,10 @@ public:
tmp=(char*) value.ptr(); memcpy_fixed(ptr+packlength,&tmp,sizeof(char*));
return 0;
}
- char *pack(char *to, const char *from, uint max_length= ~(uint) 0)
- {
- ulong length=get_length();
- if (length > max_length)
- {
- length=max_length;
- char *save=ptr;
- ptr=to;
- store_length(length);
- ptr=save;
- }
- else
- memcpy(to,from,packlength);
- if (length)
- {
- get_ptr((char**) &from);
- memcpy(to+packlength, from,length);
- return to+packlength+length;
- }
- return to+packlength;
- }
- const char *unpack(char *to, const char *from)
- {
- memcpy(to,from,packlength);
- from+=packlength;
- ulong length=get_length();
- if (length)
- memcpy_fixed(to+packlength, &from, sizeof(from));
- else
- bzero(to+packlength,sizeof(from));
- return from+length;
- }
- char *pack_key(char *to, const char *from, uint max_length=~(uint) 0);
+ char *pack(char *to, const char *from, uint max_length= ~(uint) 0);
+ const char *unpack(char *to, const char *from);
+ char *pack_key(char *to, const char *from, uint max_length);
+ char *pack_key_from_key_image(char* to, const char *from, uint max_length);
int pack_cmp(const char *a, const char *b, uint key_length);
int pack_cmp(const char *b, uint key_length);
uint packed_col_length(const char *col_ptr)