mirror of
https://github.com/MariaDB/server.git
synced 2025-09-05 08:04:25 +03:00
Merge MariaDB 5.1.66 -> 5.2 -> 5.3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2000, 2011, Oracle and/or its affiliates.
|
||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2008-2011 Monty Program Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
@@ -263,8 +263,12 @@ public:
|
||||
return 0;
|
||||
return realloc_with_extra(arg_length);
|
||||
}
|
||||
inline void shrink(uint32 arg_length) // Shrink buffer
|
||||
|
||||
// Shrink the buffer, but only if it is allocated on the heap.
|
||||
inline void shrink(uint32 arg_length)
|
||||
{
|
||||
if (!is_alloced())
|
||||
return;
|
||||
if (ALIGN_SIZE(arg_length+1) < Alloced_length)
|
||||
{
|
||||
char *new_ptr;
|
||||
@@ -280,7 +284,7 @@ public:
|
||||
}
|
||||
}
|
||||
}
|
||||
bool is_alloced() { return alloced; }
|
||||
bool is_alloced() const { return alloced; }
|
||||
inline String& operator = (const String &s)
|
||||
{
|
||||
if (&s != this)
|
||||
|
Reference in New Issue
Block a user