Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c18b7d19
Commit
c18b7d19
authored
Jul 07, 2006
by
mats@romeo.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing usage of my_strndup() to new prototype.
parent
4044fb8c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
12 deletions
+8
-12
sql/ha_federated.cc
sql/ha_federated.cc
+3
-4
sql/log_event.cc
sql/log_event.cc
+2
-5
sql/set_var.cc
sql/set_var.cc
+2
-2
sql/set_var.h
sql/set_var.h
+1
-1
No files found.
sql/ha_federated.cc
View file @
c18b7d19
...
...
@@ -629,8 +629,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
DBUG_PRINT
(
"info"
,
(
"Length: %d"
,
table
->
s
->
connect_string
.
length
));
DBUG_PRINT
(
"info"
,
(
"String: '%.*s'"
,
table
->
s
->
connect_string
.
length
,
table
->
s
->
connect_string
.
str
));
share
->
scheme
=
my_strndup
((
const
byte
*
)
table
->
s
->
connect_string
.
str
,
share
->
scheme
=
my_strndup
(
table
->
s
->
connect_string
.
str
,
table
->
s
->
connect_string
.
length
,
MYF
(
0
));
...
...
sql/log_event.cc
View file @
c18b7d19
...
...
@@ -3175,8 +3175,7 @@ Rotate_log_event::Rotate_log_event(const char* new_log_ident_arg,
llstr
(
pos_arg
,
buff
),
flags
));
#endif
if
(
flags
&
DUP_NAME
)
new_log_ident
=
my_strndup
((
const
byte
*
)
new_log_ident_arg
,
ident_len
,
MYF
(
MY_WME
));
new_log_ident
=
my_strndup
(
new_log_ident_arg
,
ident_len
,
MYF
(
MY_WME
));
DBUG_VOID_RETURN
;
}
#endif
...
...
@@ -3199,9 +3198,7 @@ Rotate_log_event::Rotate_log_event(const char* buf, uint event_len,
(
header_size
+
post_header_len
));
ident_offset
=
post_header_len
;
set_if_smaller
(
ident_len
,
FN_REFLEN
-
1
);
new_log_ident
=
my_strndup
((
byte
*
)
buf
+
ident_offset
,
(
uint
)
ident_len
,
MYF
(
MY_WME
));
new_log_ident
=
my_strndup
(
buf
+
ident_offset
,
(
uint
)
ident_len
,
MYF
(
MY_WME
));
DBUG_VOID_RETURN
;
}
...
...
sql/set_var.cc
View file @
c18b7d19
...
...
@@ -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
);
if
(
!
old_value
)
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
;
/*
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
);
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
;
goto
err
;
...
...
sql/set_var.h
View file @
c18b7d19
...
...
@@ -1055,7 +1055,7 @@ public:
uint
name_length_arg
,
gptr
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
);
}
inline
bool
cmp
(
const
char
*
name_cmp
,
uint
length
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment