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
325204b5
Commit
325204b5
authored
Feb 20, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix valgrind warnings
parent
7daf7f6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
sql/opt_range.cc
sql/opt_range.cc
+3
-2
sql/sql_select.cc
sql/sql_select.cc
+4
-1
No files found.
sql/opt_range.cc
View file @
325204b5
...
@@ -341,8 +341,9 @@ class SEL_ARG :public Sql_alloc
...
@@ -341,8 +341,9 @@ class SEL_ARG :public Sql_alloc
SEL_ARG
(
Field
*
field
,
uint8
part
,
uchar
*
min_value
,
uchar
*
max_value
,
SEL_ARG
(
Field
*
field
,
uint8
part
,
uchar
*
min_value
,
uchar
*
max_value
,
uint8
min_flag
,
uint8
max_flag
,
uint8
maybe_flag
);
uint8
min_flag
,
uint8
max_flag
,
uint8
maybe_flag
);
SEL_ARG
(
enum
Type
type_arg
)
SEL_ARG
(
enum
Type
type_arg
)
:
min_flag
(
0
),
elements
(
1
),
use_count
(
1
),
left
(
0
),
right
(
0
),
next_key_part
(
0
),
:
min_flag
(
0
),
max_part_no
(
0
)
/* first key part means 1. 0 mean 'no parts'*/
,
color
(
BLACK
),
type
(
type_arg
)
elements
(
1
),
use_count
(
1
),
left
(
0
),
right
(
0
),
next_key_part
(
0
),
color
(
BLACK
),
type
(
type_arg
)
{}
{}
inline
bool
is_same
(
SEL_ARG
*
arg
)
inline
bool
is_same
(
SEL_ARG
*
arg
)
{
{
...
...
sql/sql_select.cc
View file @
325204b5
...
@@ -8521,7 +8521,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
...
@@ -8521,7 +8521,7 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
//for (i=join->const_tables ; i < join->tables ; i++)
//for (i=join->const_tables ; i < join->tables ; i++)
for
(
tab
=
first_linear_tab
(
join
,
TRUE
),
i
=
join
->
const_tables
;
for
(
tab
=
first_linear_tab
(
join
,
TRUE
),
i
=
join
->
const_tables
;
tab
;
tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRUE
)
,
i
++
)
tab
=
next_linear_tab
(
join
,
tab
,
TRUE
))
{
{
/*
/*
The approximation below for partial join cardinality is not good because
The approximation below for partial join cardinality is not good because
...
@@ -8533,8 +8533,11 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
...
@@ -8533,8 +8533,11 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
if
((
tab
->
bush_root_tab
&&
tab
->
bush_root_tab
->
bush_children
->
start
==
tab
)
||
if
((
tab
->
bush_root_tab
&&
tab
->
bush_root_tab
->
bush_children
->
start
==
tab
)
||
(
tab
==
join
->
join_tab
+
join
->
const_tables
))
(
tab
==
join
->
join_tab
+
join
->
const_tables
))
prev_tab
=
NULL
;
prev_tab
=
NULL
;
DBUG_ASSERT
(
tab
->
bush_children
||
tab
->
table
==
join
->
best_positions
[
i
].
table
->
table
);
tab
->
partial_join_cardinality
=
join
->
best_positions
[
i
].
records_read
*
tab
->
partial_join_cardinality
=
join
->
best_positions
[
i
].
records_read
*
(
prev_tab
?
prev_tab
->
partial_join_cardinality
:
1
);
(
prev_tab
?
prev_tab
->
partial_join_cardinality
:
1
);
if
(
!
tab
->
bush_children
)
i
++
;
}
}
check_join_cache_usage_for_tables
(
join
,
options
,
no_jbuf_after
);
check_join_cache_usage_for_tables
(
join
,
options
,
no_jbuf_after
);
...
...
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