diff options
author | unknown <monty@hundin.mysql.fi> | 2001-11-03 15:18:09 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-11-03 15:18:09 +0200 |
commit | b2cec26dfb0fa6e2e7240d5dd2044e1192596ef8 (patch) | |
tree | d5d2a601f2e922dce27a5041739103c6468d4cf8 /sql/field.cc | |
parent | b9e1b930f73a43c739a916254fdbb46641cd51a0 (diff) | |
download | mariadb-git-b2cec26dfb0fa6e2e7240d5dd2044e1192596ef8.tar.gz |
Fix that mysqladmin shutdown can be interrupted with ^C
Fixed bug with BLOB keys in BDB tables
Fixed problem with MERGE tables on OS with 32 bit files
Fixed that TIME_TO_SEC() works with negative times
Docs/manual.texi:
Changelog
client/mysqladmin.c:
Fix that mysqladmin shutdown can be interrupted with ^C
include/mysqld_error.h:
Fixed typo
mysql-test/r/func_time.result:
Added test case for negative times
mysql-test/t/func_time.test:
Added test case for negative times
mysql-test/t/rpl000015-slave.sh:
Removed warnings
mysql-test/t/rpl000016-slave.sh:
Removed warnings
sql/field.cc:
Fixed bug with BLOB keys in BDB tables
sql/field.h:
Fixed bug with BLOB keys in BDB tables
sql/ha_berkeley.cc:
Fixed bug with BLOB keys in BDB tables
sql/ha_myisammrg.cc:
Fixed problem with MERGE tables on OS with 32 bit files
sql/item_timefunc.cc:
Fixed that TIME_TO_SEC() works with negative times.
sql/share/swedish/errmsg.txt:
Merge with 4.0
sql/sql_acl.cc:
Fixed typo
Diffstat (limited to 'sql/field.cc')
-rw-r--r-- | sql/field.cc | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/sql/field.cc b/sql/field.cc index bd923a09dc6..c6a26a48c0c 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -3466,9 +3466,9 @@ int Field_string::pack_cmp(const char *b, uint length) } -uint Field_string::packed_col_length(const char *ptr) +uint Field_string::packed_col_length(const char *ptr, uint length) { - if (field_length > 255) + if (length > 255) return uint2korr(ptr)+2; else return (uint) ((uchar) *ptr)+1; @@ -3476,7 +3476,7 @@ uint Field_string::packed_col_length(const char *ptr) uint Field_string::max_packed_col_length(uint max_length) { - return (field_length > 255 ? 2 : 1)+max_length; + return (max_length > 255 ? 2 : 1)+max_length; } @@ -3685,9 +3685,9 @@ int Field_varstring::pack_cmp(const char *b, uint key_length) return my_sortncmp(a,a_length, b,b_length); } -uint Field_varstring::packed_col_length(const char *ptr) +uint Field_varstring::packed_col_length(const char *ptr, uint length) { - if (field_length > 255) + if (length > 255) return uint2korr(ptr)+2; else return (uint) ((uchar) *ptr)+1; @@ -3695,7 +3695,7 @@ uint Field_varstring::packed_col_length(const char *ptr) uint Field_varstring::max_packed_col_length(uint max_length) { - return (field_length > 255 ? 2 : 1)+max_length; + return (max_length > 255 ? 2 : 1)+max_length; } /**************************************************************************** @@ -4225,6 +4225,18 @@ char *Field_blob::pack_key_from_key_image(char *to, const char *from, return to+length; } +uint Field_blob::packed_col_length(const char *ptr, uint length) +{ + if (length > 255) + return uint2korr(ptr)+2; + else + return (uint) ((uchar) *ptr)+1; +} + +uint Field_blob::max_packed_col_length(uint max_length) +{ + return (max_length > 255 ? 2 : 1)+max_length; +} /**************************************************************************** ** enum type. |