diff options
author | monty@mysql.com <> | 2005-10-12 00:58:22 +0300 |
---|---|---|
committer | monty@mysql.com <> | 2005-10-12 00:58:22 +0300 |
commit | f5fdf3e87a5f60fdb6442912ae5741a24b2461c8 (patch) | |
tree | ce0e98ba05247bbe755ac299d0ceaa8c42d63b7a /sql/unireg.cc | |
parent | 17d7ba931d2293f1db89cbd1107a4bc71bc4fcdf (diff) | |
download | mariadb-git-f5fdf3e87a5f60fdb6442912ae5741a24b2461c8.tar.gz |
Reviewing new pushed code
- CHAR() now returns binary string as default
- CHAR(X*65536+Y*256+Z) is now equal to CHAR(X,Y,Z) independent of the character set for CHAR()
- Test for both ETIMEDOUT and ETIME from pthread_cond_timedwait()
(Some old systems returns ETIME and it's safer to test for both values
than to try to write a wrapper for each old system)
- Fixed new introduced bug in NOT BETWEEN X and X
- Ensure we call commit_by_xid or rollback_by_xid for all engines, even if one engine has failed
- Use octet2hex() for all conversion of string to hex
- Simplify and optimize code
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index d297b143d3b..7c244b20a8b 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -474,16 +474,10 @@ static bool pack_header(uchar *forminfo, enum db_type table_type, char *dst; uint length= field->interval->type_lengths[pos], hex_length; const char *src= field->interval->type_names[pos]; - const char *srcend= src + length; hex_length= length * 2; field->interval->type_lengths[pos]= hex_length; field->interval->type_names[pos]= dst= sql_alloc(hex_length + 1); - for ( ; src < srcend; src++) - { - *dst++= _dig_vec_upper[((uchar) *src) >> 4]; - *dst++= _dig_vec_upper[((uchar) *src) & 15]; - } - *dst= '\0'; + octet2hex(dst, src, length); } } |