mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Cleanups during review of code
Fixed newly introduced bug in rollup client/mysqldump.c: Safer buffer allocation Removed wrong assert mysql-test/r/olap.result: more tests mysql-test/t/olap.test: more tests sql/handler.cc: Simple cleanup Fixed wrong check for next digit (wrong debug output) sql/item.cc: Replace shrink_to_length() with mark_as_const() as the former allowed one to do changes to the string sql/item_sum.cc: Change reference to pointer Trivial optimzation of testing 'allways_null' sql/mysqld.cc: Proper indentation of comment sql/sql_select.cc: Fixed newly introduced bug in rollup sql/sql_string.h: Remove not needed 'shrink_to_length()' Added 'mark_as_const()' to be used when one want to ensure that a string is not changed
This commit is contained in:
@ -84,6 +84,7 @@ public:
|
||||
inline char& operator [] (uint32 i) const { return Ptr[i]; }
|
||||
inline void length(uint32 len) { str_length=len ; }
|
||||
inline bool is_empty() { return (str_length == 0); }
|
||||
inline void mark_as_const() { Alloced_length= 0;}
|
||||
inline const char *ptr() const { return Ptr; }
|
||||
inline char *c_ptr()
|
||||
{
|
||||
@ -205,10 +206,6 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
inline void shrink_to_length()
|
||||
{
|
||||
Alloced_length= str_length;
|
||||
}
|
||||
bool is_alloced() { return alloced; }
|
||||
inline String& operator = (const String &s)
|
||||
{
|
||||
|
Reference in New Issue
Block a user