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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
cccc96d6
Commit
cccc96d6
authored
Mar 19, 2021
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed wrong initializations of Dynamic_array
Other things: - Added size() function to Dynamic_array()
parent
8f33f49e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
10 deletions
+14
-10
sql/item_subselect.cc
sql/item_subselect.cc
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+1
-1
sql/rowid_filter.h
sql/rowid_filter.h
+2
-1
sql/rpl_rli.cc
sql/rpl_rli.cc
+2
-1
sql/sql_acl.cc
sql/sql_acl.cc
+4
-4
sql/sql_array.h
sql/sql_array.h
+3
-1
sql/sql_db.cc
sql/sql_db.cc
+1
-1
No files found.
sql/item_subselect.cc
View file @
cccc96d6
...
...
@@ -3022,7 +3022,7 @@ bool Item_exists_subselect::exists2in_processor(void *opt_arg)
Query_arena
*
arena
=
NULL
,
backup
;
int
res
=
FALSE
;
List
<
Item
>
outer
;
Dynamic_array
<
EQ_FIELD_OUTER
>
eqs
(
5
,
5
);
Dynamic_array
<
EQ_FIELD_OUTER
>
eqs
(
PSI_INSTRUMENT_MEM
,
5
,
5
);
bool
will_be_correlated
;
DBUG_ENTER
(
"Item_exists_subselect::exists2in_processor"
);
...
...
sql/opt_range.cc
View file @
cccc96d6
...
...
@@ -8027,7 +8027,7 @@ SEL_TREE *Item_func_in::get_func_row_mm_tree(RANGE_OPT_PARAM *param,
table_map
param_comp
=
~
(
param
->
prev_tables
|
param
->
read_tables
|
param
->
current_table
);
uint
row_cols
=
key_row
->
cols
();
Dynamic_array
<
Key_col_info
>
key_cols_info
(
row_cols
);
Dynamic_array
<
Key_col_info
>
key_cols_info
(
PSI_INSTRUMENT_MEM
,
row_cols
);
cmp_item_row
*
row_cmp_item
;
if
(
array
)
...
...
sql/rowid_filter.h
View file @
cccc96d6
...
...
@@ -311,7 +311,8 @@ class Refpos_container_sorted_array : public Sql_alloc
bool
alloc
()
{
array
=
new
Dynamic_array
<
char
>
(
elem_size
*
max_elements
,
array
=
new
Dynamic_array
<
char
>
(
PSI_INSTRUMENT_MEM
,
elem_size
*
max_elements
,
elem_size
*
max_elements
/
sizeof
(
char
)
+
1
);
return
array
==
NULL
;
}
...
...
sql/rpl_rli.cc
View file @
cccc96d6
...
...
@@ -1710,7 +1710,8 @@ scan_all_gtid_slave_pos_table(THD *thd, int (*cb)(THD *, LEX_CSTRING *, void *),
else
{
size_t
i
;
Dynamic_array
<
LEX_CSTRING
*>
files
(
dirp
->
number_of_files
);
Dynamic_array
<
LEX_CSTRING
*>
files
(
PSI_INSTRUMENT_MEM
,
dirp
->
number_of_files
);
Discovered_table_list
tl
(
thd
,
&
files
);
int
err
;
...
...
sql/sql_acl.cc
View file @
cccc96d6
...
...
@@ -655,7 +655,7 @@ bool ROLE_GRANT_PAIR::init(MEM_ROOT *mem, const char *username,
#define ROLE_OPENED (1L << 3)
static
DYNAMIC_ARRAY
acl_hosts
,
acl_users
,
acl_proxy_users
;
static
Dynamic_array
<
ACL_DB
>
acl_dbs
(
PSI_INSTRUMENT_MEM
,
0
U
,
50U
);
static
Dynamic_array
<
ACL_DB
>
acl_dbs
(
PSI_INSTRUMENT_MEM
,
0
,
50
);
typedef
Dynamic_array
<
ACL_DB
>::
CMP_FUNC
acl_dbs_cmp
;
static
HASH
acl_roles
;
/*
...
...
@@ -2786,7 +2786,7 @@ void acl_free(bool end)
bool
acl_reload
(
THD
*
thd
)
{
DYNAMIC_ARRAY
old_acl_hosts
,
old_acl_users
,
old_acl_proxy_users
;
Dynamic_array
<
ACL_DB
>
old_acl_dbs
(
0U
,
0U
);
Dynamic_array
<
ACL_DB
>
old_acl_dbs
(
PSI_INSTRUMENT_MEM
,
0
,
0
);
HASH
old_acl_roles
,
old_acl_roles_mappings
;
MEM_ROOT
old_mem
;
int
result
;
...
...
@@ -6170,8 +6170,8 @@ static int traverse_role_graph_impl(ACL_USER_BASE *user, void *context,
It uses a Dynamic_array to reduce the number of
malloc calls to a minimum
*/
Dynamic_array
<
NODE_STATE
>
stack
(
20
,
50
);
Dynamic_array
<
ACL_USER_BASE
*>
to_clear
(
20
,
50
);
Dynamic_array
<
NODE_STATE
>
stack
(
PSI_INSTRUMENT_MEM
,
20
,
50
);
Dynamic_array
<
ACL_USER_BASE
*>
to_clear
(
PSI_INSTRUMENT_MEM
,
20
,
50
);
NODE_STATE
state
;
/* variable used to insert elements in the stack */
int
result
=
0
;
...
...
sql/sql_array.h
View file @
cccc96d6
...
...
@@ -170,6 +170,8 @@ template <class Elem> class Dynamic_array
return
((
const
Elem
*
)
array
.
buffer
)
+
array
.
elements
-
1
;
}
size_t
size
()
const
{
return
array
.
elements
;
}
const
Elem
*
end
()
const
{
return
back
()
+
1
;
...
...
sql/sql_db.cc
View file @
cccc96d6
...
...
@@ -1228,7 +1228,7 @@ static bool find_db_tables_and_rm_known_files(THD *thd, MY_DIR *dirp,
DBUG_PRINT
(
"enter"
,(
"path: %s"
,
path
));
/* first, get the list of tables */
Dynamic_array
<
LEX_CSTRING
*>
files
(
dirp
->
number_of_files
);
Dynamic_array
<
LEX_CSTRING
*>
files
(
PSI_INSTRUMENT_MEM
,
dirp
->
number_of_files
);
Discovered_table_list
tl
(
thd
,
&
files
);
if
(
ha_discover_table_names
(
thd
,
&
db
,
dirp
,
&
tl
,
true
))
DBUG_RETURN
(
1
);
...
...
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