summaryrefslogtreecommitdiff
path: root/sql/field.h
diff options
context:
space:
mode:
authorJorgen Loland <jorgen.loland@oracle.com>2011-11-18 14:53:54 +0100
committerJorgen Loland <jorgen.loland@oracle.com>2011-11-18 14:53:54 +0100
commitaea2e93bd83b619128f4b78d65061553148484e9 (patch)
treea4eace05cadaa9ce0751f0e5a078ba97794c0314 /sql/field.h
parent63e381e98d010e0049bff2ff99c091b8806e6bc2 (diff)
parent523c849d14acf041670337afa6a7e2a6deeaab67 (diff)
downloadmariadb-git-aea2e93bd83b619128f4b78d65061553148484e9.tar.gz
Merge BUG#12997905 from 5.1 to 5.5
Diffstat (limited to 'sql/field.h')
-rw-r--r--sql/field.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/sql/field.h b/sql/field.h
index 9c2cd52cfa5..b4adb764b22 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -2227,6 +2227,23 @@ public:
uchar *from_null_ptr,*to_null_ptr;
my_bool *null_row;
uint from_bit,to_bit;
+ /**
+ Number of bytes in the fields pointed to by 'from_ptr' and
+ 'to_ptr'. Usually this is the number of bytes that are copied from
+ 'from_ptr' to 'to_ptr'.
+
+ For variable-length fields (VARCHAR), the first byte(s) describe
+ the actual length of the text. For VARCHARs with length
+ < 256 there is 1 length byte
+ >= 256 there is 2 length bytes
+ Thus, if from_field is VARCHAR(10), from_length (and in most cases
+ to_length) is 11. For VARCHAR(1024), the length is 1026. @see
+ Field_varstring::length_bytes
+
+ Note that for VARCHARs, do_copy() will be do_varstring*() which
+ only copies the length-bytes (1 or 2) + the actual length of the
+ text instead of from/to_length bytes. @see get_copy_func()
+ */
uint from_length,to_length;
Field *from_field,*to_field;
String tmp; // For items