diff options
author | serg@serg.mylan <> | 2004-08-19 03:02:09 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2004-08-19 03:02:09 +0200 |
commit | 3f2210c06445535f3beae31a8cecb3ae73c1d236 (patch) | |
tree | bb710739af8b8fd4ec8ff388deaf56c37a27d24a /sql/sql_string.h | |
parent | e1237cbc53355382e032f0e88f906d67edd1f597 (diff) | |
download | mariadb-git-3f2210c06445535f3beae31a8cecb3ae73c1d236.tar.gz |
after merge fixes
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index 0179b3ebadc..d8c4c3a87a1 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -95,6 +95,14 @@ public: Ptr[str_length]=0; return Ptr; } + inline char *c_ptr_safe() + { + if (Ptr && str_length < Alloced_length) + Ptr[str_length]=0; + else + (void) realloc(str_length); + return Ptr; + } void set(String &str,uint32 offset,uint32 arg_length) { |