diff options
author | Magne Mahre <magne.mahre@oracle.com> | 2011-02-17 12:53:09 +0100 |
---|---|---|
committer | Magne Mahre <magne.mahre@oracle.com> | 2011-02-17 12:53:09 +0100 |
commit | 5a47bc87c803dc0a875d07e5b748ad14ccab36d5 (patch) | |
tree | 47614fb0684f8a543db20bd9e82c4181270fea42 /sql/sql_string.h | |
parent | 2152cd958d70acbd0721c1245d663a2bb437ef89 (diff) | |
parent | 6503226743a2fa24c7330d4541560a5b8fa821d6 (diff) | |
download | mariadb-git-5a47bc87c803dc0a875d07e5b748ad14ccab36d5.tar.gz |
Merge from 5.1
Diffstat (limited to 'sql/sql_string.h')
-rw-r--r-- | sql/sql_string.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_string.h b/sql/sql_string.h index dcd9975f399..67c8fe4f45f 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -113,6 +113,9 @@ public: inline const char *ptr() const { return Ptr; } inline char *c_ptr() { + DBUG_ASSERT(!alloced || !Ptr || !Alloced_length || + (Alloced_length >= (str_length + 1))); + if (!Ptr || Ptr[str_length]) /* Should be safe */ (void) realloc(str_length); return Ptr; |