diff options
author | monty@narttu.mysql.fi <> | 2000-10-11 00:48:03 +0300 |
---|---|---|
committer | monty@narttu.mysql.fi <> | 2000-10-11 00:48:03 +0300 |
commit | ae80d2a5a3bd11714ca5e2dab171e7805be92523 (patch) | |
tree | c6677bb9b8f4eee0143a25aa5b5b345004edc2ff /sql/sql_string.h | |
parent | 16f11f94b2fa7c7fca19fb5160b27c902c446a3c (diff) | |
download | mariadb-git-ae80d2a5a3bd11714ca5e2dab171e7805be92523.tar.gz |
Portability fixes
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 8711cf314ad..45c82b82dd0 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -100,16 +100,16 @@ public: bool set(ulonglong num); bool set(double num,uint decimals=2); inline void free() + { + if (alloced) { - if (alloced) - { - alloced=0; - Alloced_length=0; - my_free(Ptr,MYF(0)); - Ptr=0; - } + alloced=0; + Alloced_length=0; + my_free(Ptr,MYF(0)); + Ptr=0; + str_length=0; /* Safety */ } - + } inline bool alloc(uint32 arg_length) { if (arg_length < Alloced_length) |