mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge ymer.(none):/usr/local/mysql/mysql-4.1-ndb.tmp
into ymer.(none):/usr/local/mysql/mysql-5.1-new-ndb storage/ndb/include/util/UtilBuffer.hpp: Auto merged storage/ndb/src/common/util/SimpleProperties.cpp: Auto merged
This commit is contained in:
@@ -73,11 +73,15 @@ public:
|
||||
}
|
||||
|
||||
int assign(const void * d, size_t l) {
|
||||
if (data) free(data);
|
||||
/* Free the old data only after copying, in case d==data. */
|
||||
void *old_data= data;
|
||||
data = NULL;
|
||||
len = 0;
|
||||
alloc_size = 0;
|
||||
return append(d, l);
|
||||
int ret= append(d, l);
|
||||
if (old_data)
|
||||
free(old_data);
|
||||
return ret;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
|
Reference in New Issue
Block a user