summaryrefslogtreecommitdiff
path: root/sql/sql_string.h
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-19 03:02:09 +0200
committerunknown <serg@serg.mylan>2004-08-19 03:02:09 +0200
commite86cbb3ad6f658949e8dfd094f1475191f9e1ef7 (patch)
treebb710739af8b8fd4ec8ff388deaf56c37a27d24a /sql/sql_string.h
parent1afa6809873737eafe27d99c4963af68d2118db8 (diff)
downloadmariadb-git-e86cbb3ad6f658949e8dfd094f1475191f9e1ef7.tar.gz
after merge fixes
strings/my_vsnprintf.c: %.#s support in my_vsnprintf BitKeeper/etc/ignore: Added EXCEPTIONS-CLIENT to the ignore list
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r--sql/sql_string.h8
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)
{