mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Fixing usage of my_strndup() to new prototype.
This commit is contained in:
parent
0d830d1658
commit
e28341264b
4 changed files with 8 additions and 12 deletions
|
|
@ -629,10 +629,9 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
|
||||||
DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length));
|
DBUG_PRINT("info", ("Length: %d", table->s->connect_string.length));
|
||||||
DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length,
|
DBUG_PRINT("info", ("String: '%.*s'", table->s->connect_string.length,
|
||||||
table->s->connect_string.str));
|
table->s->connect_string.str));
|
||||||
share->scheme= my_strndup((const byte*)table->s->
|
share->scheme= my_strndup(table->s->connect_string.str,
|
||||||
connect_string.str,
|
table->s->connect_string.length,
|
||||||
table->s->connect_string.length,
|
MYF(0));
|
||||||
MYF(0));
|
|
||||||
|
|
||||||
// Add a null for later termination of table name
|
// Add a null for later termination of table name
|
||||||
share->scheme[table->s->connect_string.length]= 0;
|
share->scheme[table->s->connect_string.length]= 0;
|
||||||
|
|
|
||||||
|
|
@ -3175,8 +3175,7 @@ Rotate_log_event::Rotate_log_event(const char* new_log_ident_arg,
|
||||||
llstr(pos_arg, buff), flags));
|
llstr(pos_arg, buff), flags));
|
||||||
#endif
|
#endif
|
||||||
if (flags & DUP_NAME)
|
if (flags & DUP_NAME)
|
||||||
new_log_ident= my_strndup((const byte*) new_log_ident_arg,
|
new_log_ident= my_strndup(new_log_ident_arg, ident_len, MYF(MY_WME));
|
||||||
ident_len, MYF(MY_WME));
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -3199,9 +3198,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, uint event_len,
|
||||||
(header_size+post_header_len));
|
(header_size+post_header_len));
|
||||||
ident_offset = post_header_len;
|
ident_offset = post_header_len;
|
||||||
set_if_smaller(ident_len,FN_REFLEN-1);
|
set_if_smaller(ident_len,FN_REFLEN-1);
|
||||||
new_log_ident= my_strndup((byte*) buf + ident_offset,
|
new_log_ident= my_strndup(buf + ident_offset, (uint) ident_len, MYF(MY_WME));
|
||||||
(uint) ident_len,
|
|
||||||
MYF(MY_WME));
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1097,7 +1097,7 @@ bool update_sys_var_str(sys_var_str *var_str, rw_lock_t *var_mutex,
|
||||||
uint new_length= (var ? var->value->str_value.length() : 0);
|
uint new_length= (var ? var->value->str_value.length() : 0);
|
||||||
if (!old_value)
|
if (!old_value)
|
||||||
old_value= (char*) "";
|
old_value= (char*) "";
|
||||||
if (!(res= my_strndup((byte*)old_value, new_length, MYF(0))))
|
if (!(res= my_strndup(old_value, new_length, MYF(0))))
|
||||||
return 1;
|
return 1;
|
||||||
/*
|
/*
|
||||||
Replace the old value in such a way that the any thread using
|
Replace the old value in such a way that the any thread using
|
||||||
|
|
@ -2632,7 +2632,7 @@ bool update_sys_var_str_path(THD *thd, sys_var_str *var_str,
|
||||||
old_value= make_default_log_name(buff, log_ext);
|
old_value= make_default_log_name(buff, log_ext);
|
||||||
str_length= strlen(old_value);
|
str_length= strlen(old_value);
|
||||||
}
|
}
|
||||||
if (!(res= my_strndup((byte*)old_value, str_length, MYF(MY_FAE+MY_WME))))
|
if (!(res= my_strndup(old_value, str_length, MYF(MY_FAE+MY_WME))))
|
||||||
{
|
{
|
||||||
result= 1;
|
result= 1;
|
||||||
goto err;
|
goto err;
|
||||||
|
|
|
||||||
|
|
@ -1055,7 +1055,7 @@ public:
|
||||||
uint name_length_arg, gptr data_arg)
|
uint name_length_arg, gptr data_arg)
|
||||||
:name_length(name_length_arg), data(data_arg)
|
:name_length(name_length_arg), data(data_arg)
|
||||||
{
|
{
|
||||||
name= my_strndup((byte*) name_arg, name_length, MYF(MY_WME));
|
name= my_strndup(name_arg, name_length, MYF(MY_WME));
|
||||||
links->push_back(this);
|
links->push_back(this);
|
||||||
}
|
}
|
||||||
inline bool cmp(const char *name_cmp, uint length)
|
inline bool cmp(const char *name_cmp, uint length)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue