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
2c8b096f
Commit
2c8b096f
authored
6 months ago
by
Vicențiu Ciorbaru
Committed by
Vicențiu Ciorbaru
6 months ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup
parent
b481358a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
15 deletions
+14
-15
sql/item_jsonfunc.h
sql/item_jsonfunc.h
+1
-1
sql/sql_statistics.cc
sql/sql_statistics.cc
+3
-5
sql/uniques.cc
sql/uniques.cc
+2
-1
sql/uniques.h
sql/uniques.h
+8
-8
No files found.
sql/item_jsonfunc.h
View file @
2c8b096f
...
...
@@ -717,7 +717,7 @@ class Item_func_json_arrayagg : public Item_func_group_concat
String
*
get_str_from_item
(
Item
*
i
,
String
*
tmp
)
override
;
String
*
get_str_from_field
(
Item
*
i
,
Field
*
f
,
String
*
tmp
,
const
uchar
*
key
,
size_t
offset
)
override
;
String
*
get_str_from_field
(
Item
*
i
,
Field
*
f
,
String
*
tmp
);
String
*
get_str_from_field
(
Item
*
i
,
Field
*
f
,
String
*
tmp
)
override
;
void
cut_max_length
(
String
*
result
,
uint
old_length
,
uint
max_length
)
const
override
;
public:
...
...
This diff is collapsed.
Click to expand it.
sql/sql_statistics.cc
View file @
2c8b096f
...
...
@@ -2603,11 +2603,9 @@ void Column_statistics_collected::init(THD *thd, Field *table_field)
{
count_distinct
=
table_field
->
type
()
==
MYSQL_TYPE_BIT
?
new
(
thd
->
mem_root
)
Count_distinct_field_bit
(
table_field
,
max_heap_table_size
)
:
new
(
thd
->
mem_root
)
Count_distinct_field
(
table_field
,
max_heap_table_size
);
if
(
count_distinct
&&
!
count_distinct
->
exists
())
new
(
thd
->
mem_root
)
Count_distinct_field_bit
(
table_field
)
:
new
(
thd
->
mem_root
)
Count_distinct_field
(
table_field
);
if
(
count_distinct
&&
!
count_distinct
->
setup
(
thd
,
max_heap_table_size
))
{
/* Allocation failed */
delete
count_distinct
;
...
...
This diff is collapsed.
Click to expand it.
sql/uniques.cc
View file @
2c8b096f
...
...
@@ -309,7 +309,8 @@ static double get_merge_many_buffs_cost(THD *thd,
these will be random seeks.
*/
double
Unique_impl
::
get_use_cost
(
uint
*
buffer
,
size_t
nkeys
,
uint
key_size
,
double
Unique_impl
::
get_use_cost
(
THD
*
thd
,
uint
*
buffer
,
size_t
nkeys
,
uint
key_size
,
size_t
max_in_memory_size
,
double
compare_factor
,
bool
intersect_fl
,
bool
*
in_memory
)
...
...
This diff is collapsed.
Click to expand it.
sql/uniques.h
View file @
2c8b096f
...
...
@@ -139,9 +139,9 @@ class Fixed_size_keys_descriptor : public Descriptor
Fixed_size_keys_descriptor
(
uint
length
);
virtual
~
Fixed_size_keys_descriptor
()
{}
uint
get_length_of_key
(
uchar
*
ptr
)
override
{
return
max_length
;
}
bool
setup_for_field
(
THD
*
thd
,
Field
*
field
);
bool
setup_for_field
(
THD
*
thd
,
Field
*
field
)
override
;
bool
setup_for_item
(
THD
*
thd
,
Item_sum
*
item
,
uint
non_const_args
,
uint
arg_count
);
uint
non_const_args
,
uint
arg_count
)
override
;
virtual
int
compare_keys
(
uchar
*
a
,
uchar
*
b
)
override
;
virtual
bool
is_single_arg
()
override
{
return
true
;
}
};
...
...
@@ -456,17 +456,17 @@ class Unique_impl : public Unique {
uint
size_arg
,
size_t
max_in_memory_size_arg
,
uint
min_dupl_count_arg
,
Descriptor
*
desc
);
~
Unique_impl
();
ulong
elements_in_tree
()
{
return
tree
.
elements_in_tree
;
}
ulong
elements_in_tree
()
override
{
return
tree
.
elements_in_tree
;
}
bool
unique_add
(
void
*
ptr
)
override
{
return
unique_add
(
ptr
,
m_descriptor
->
get_length_of_key
((
uchar
*
)
ptr
));
}
bool
is_in_memory
()
{
return
(
my_b_tell
(
&
file
)
==
0
);
}
void
close_for_expansion
()
{
tree
.
flag
=
TREE_ONLY_DUPS
;
}
bool
is_in_memory
()
override
{
return
(
my_b_tell
(
&
file
)
==
0
);
}
void
close_for_expansion
()
override
{
tree
.
flag
=
TREE_ONLY_DUPS
;
}
bool
get
(
TABLE
*
table
);
bool
get
(
TABLE
*
table
)
override
;
/* Cost of searching for an element in the tree */
inline
static
double
get_search_cost
(
ulonglong
tree_elems
,
...
...
@@ -490,11 +490,11 @@ class Unique_impl : public Unique {
}
void
reset
()
override
;
bool
walk
(
TABLE
*
table
,
tree_walk_action
action
,
void
*
walk_action_arg
);
bool
walk
(
TABLE
*
table
,
tree_walk_action
action
,
void
*
walk_action_arg
)
override
;
uint
get_size
()
const
{
return
size
;
}
uint
get_full_size
()
const
{
return
full_size
;
}
size_t
get_max_in_memory_size
()
const
{
return
max_in_memory_size
;
}
size_t
get_max_in_memory_size
()
const
override
{
return
max_in_memory_size
;
}
bool
is_count_stored
()
{
return
with_counters
;
}
IO_CACHE
*
get_file
()
{
return
&
file
;
}
int
write_record_to_file
(
uchar
*
key
);
...
...
This diff is collapsed.
Click to expand it.
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