mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 07:05:33 +02:00
cleanup: thd->alloc<>() and thd->calloc<>()
create templates thd->alloc<X>(n) to use instead of (X*)thd->alloc(sizeof(X)*n) and the same for thd->calloc(). By the default the type is char, so old usage of thd->alloc(size) works too.
This commit is contained in:
parent
eff16d7593
commit
44c6328cbb
63 changed files with 262 additions and 362 deletions
|
|
@ -544,7 +544,7 @@ Event_parse_data::init_definer(THD *thd)
|
|||
/* + 1 for @ */
|
||||
DBUG_PRINT("info",("init definer as whole"));
|
||||
definer.length= definer_user_len + definer_host_len + 1;
|
||||
definer.str= tmp= (char*) thd->alloc(definer.length + 1);
|
||||
definer.str= tmp= thd->alloc(definer.length + 1);
|
||||
|
||||
DBUG_PRINT("info",("copy the user"));
|
||||
strmake(tmp, definer_user, definer_user_len);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue