diff options
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; |