summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.com>2001-01-17 03:15:20 +0200
committerunknown <monty@donna.mysql.com>2001-01-17 03:15:20 +0200
commit5372aa60ce6c076297815958bbbec2180d919772 (patch)
tree256b185f833ce2fac42471efe65aa7bde9b9a8da /sql/field.h
parentf0a33e62a1ed70f3b2393e6548b7a128d7dea3e1 (diff)
downloadmariadb-git-5372aa60ce6c076297815958bbbec2180d919772.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 Docs/manual.texi: Update of UDF functions mysql-test/mysql-test-run.sh: Added option --user mysql-test/r/bdb.result: Added more test to get better coverage mysql-test/t/bdb.test: Added more test to get better coverage sql/field.cc: Fixes for key packing in BDB sql/field.h: Fixes for key packing in BDB sql/ha_berkeley.cc: Fixed for bugs that was found when getting full code coverage sql/ha_heap.cc: Fixed problem with HEAP tables on windows sql/log.cc: Safety fix sql/sql_select.cc: Fixed bug with HAVING on empty tables sql/table.cc: Fixed problem with HEAP tables on windows
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)