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
18cc9fd4
Commit
18cc9fd4
authored
Jul 17, 2009
by
V Narayanan
Browse files
Options
Browse Files
Download
Plain Diff
merging with mysql-5.0-bugteam
parents
b6b56895
55588472
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
mysys/array.c
mysys/array.c
+7
-7
No files found.
mysys/array.c
View file @
18cc9fd4
...
@@ -32,11 +32,11 @@
...
@@ -32,11 +32,11 @@
DESCRIPTION
DESCRIPTION
init_dynamic_array() initiates array and allocate space for
init_dynamic_array() initiates array and allocate space for
init_alloc eilements.
init_alloc eilements.
Array is usable even if space allocation failed.
Array is usable even if space allocation failed, hence, the
function never returns TRUE.
Static buffers must begin immediately after the array structure.
Static buffers must begin immediately after the array structure.
RETURN VALUE
RETURN VALUE
TRUE my_malloc_ci() failed
FALSE Ok
FALSE Ok
*/
*/
...
@@ -63,12 +63,12 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
...
@@ -63,12 +63,12 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
array
->
size_of_element
=
element_size
;
array
->
size_of_element
=
element_size
;
if
((
array
->
buffer
=
init_buffer
))
if
((
array
->
buffer
=
init_buffer
))
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
if
(
!
(
array
->
buffer
=
(
uchar
*
)
my_malloc_ci
(
element_size
*
init_alloc
,
/*
MYF
(
MY_WME
))))
Since the dynamic array is usable even if allocation fails here malloc
{
should not throw an error
*/
if
(
!
(
array
->
buffer
=
(
char
*
)
my_malloc_ci
(
element_size
*
init_alloc
,
MYF
(
0
))))
array
->
max_element
=
0
;
array
->
max_element
=
0
;
DBUG_RETURN
(
TRUE
);
}
DBUG_RETURN
(
FALSE
);
DBUG_RETURN
(
FALSE
);
}
}
...
...
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