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
702f4efc
Commit
702f4efc
authored
Sep 14, 2021
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More "straightforward" memory management
Do not put Histogram objects on MEM_ROOT at all
parent
28ad1285
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
sql/sql_statistics.cc
sql/sql_statistics.cc
+4
-2
sql/sql_statistics.h
sql/sql_statistics.h
+1
-1
No files found.
sql/sql_statistics.cc
View file @
702f4efc
...
...
@@ -1238,6 +1238,8 @@ class Column_stat: public Stat_table
table_field
->
read_stats
->
histogram
=
hist
;
return
hist
;
}
else
delete
hist
;
}
return
NULL
;
}
...
...
@@ -1647,10 +1649,10 @@ Histogram_base *create_histogram(MEM_ROOT *mem_root, Histogram_type hist_type,
switch
(
hist_type
)
{
case
SINGLE_PREC_HB
:
case
DOUBLE_PREC_HB
:
res
=
new
(
mem_root
)
Histogram_binary
();
res
=
new
Histogram_binary
();
break
;
case
JSON_HB
:
res
=
new
(
mem_root
)
Histogram_json_hb
();
res
=
new
Histogram_json_hb
();
break
;
default:
DBUG_ASSERT
(
0
);
...
...
sql/sql_statistics.h
View file @
702f4efc
...
...
@@ -151,7 +151,7 @@ class Histogram_builder;
/*
Common base for all histograms
*/
class
Histogram_base
:
public
Sql_alloc
class
Histogram_base
{
public:
virtual
bool
parse
(
MEM_ROOT
*
mem_root
,
Field
*
field
,
Histogram_type
type_arg
,
...
...
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