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
5a4ba06c
Commit
5a4ba06c
authored
Feb 16, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes part 2
parent
979d9239
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
15 deletions
+30
-15
sql/sql_join_cache.cc
sql/sql_join_cache.cc
+4
-0
sql/sql_select.cc
sql/sql_select.cc
+26
-15
No files found.
sql/sql_join_cache.cc
View file @
5a4ba06c
...
@@ -235,6 +235,10 @@ psergey-merge: was:
...
@@ -235,6 +235,10 @@ psergey-merge: was:
}
}
}
}
start_tab
=
tab
;
start_tab
=
tab
;
while
(
start_tab
->
bush_children
&&
start_tab
!=
join_tab
)
start_tab
++
;
tab
=
start_tab
;
//tables= join_tab-tab;
//tables= join_tab-tab;
//tables= 0;
//tables= 0;
fields
=
0
;
fields
=
0
;
...
...
sql/sql_select.cc
View file @
5a4ba06c
...
@@ -8402,13 +8402,21 @@ void check_join_cache_usage_for_tables(JOIN *join, ulonglong options,
...
@@ -8402,13 +8402,21 @@ void check_join_cache_usage_for_tables(JOIN *join, ulonglong options,
{
{
//JOIN_TAB *first_sjm_table= NULL;
//JOIN_TAB *first_sjm_table= NULL;
//JOIN_TAB *last_sjm_table= NULL;
//JOIN_TAB *last_sjm_table= NULL;
JOIN_TAB
*
tab
;
for
(
uint
i
=
join
->
const_tables
;
i
<
join
->
tables
;
i
++
)
//for (uint i= join->const_tables; i < join->tables; i++)
join
->
join_tab
[
i
].
used_join_cache_level
=
join
->
max_allowed_join_cache_level
;
for
(
tab
=
first_linear_tab
(
join
,
TRUE
);
tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRUE
))
{
tab
->
used_join_cache_level
=
join
->
max_allowed_join_cache_level
;
}
for
(
uint
i
=
join
->
const_tables
;
i
<
join
->
tables
;
i
++
)
//for (uint i= join->const_tables; i < join->tables; i++)
for
(
tab
=
first_linear_tab
(
join
,
TRUE
);
tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRUE
))
{
{
JOIN_TAB
*
tab
=
join
->
join_tab
+
i
;
#if 0
#if 0
if (sj_is_materialize_strategy(join->best_positions[i].sj_strategy))
if (sj_is_materialize_strategy(join->best_positions[i].sj_strategy))
{
{
...
@@ -8442,8 +8450,11 @@ void check_join_cache_usage_for_tables(JOIN *join, ulonglong options,
...
@@ -8442,8 +8450,11 @@ void check_join_cache_usage_for_tables(JOIN *join, ulonglong options,
// tab-1);
// tab-1);
prev_tab
);
prev_tab
);
tab
->
use_join_cache
=
test
(
tab
->
used_join_cache_level
);
tab
->
use_join_cache
=
test
(
tab
->
used_join_cache_level
);
DBUG_ASSERT
(
!
join
->
return_tab
);
/*
if (join->return_tab)
if (join->return_tab)
i= join->return_tab-join->join_tab-1; // always >= 0
i= join->return_tab-join->join_tab-1; // always >= 0
*/
break
;
break
;
default:
default:
tab
->
used_join_cache_level
=
0
;
tab
->
used_join_cache_level
=
0
;
...
@@ -8507,8 +8518,11 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
...
@@ -8507,8 +8518,11 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
- it does not differentiate between inner joins, outer joins and semi-joins.
- it does not differentiate between inner joins, outer joins and semi-joins.
Later it should be improved.
Later it should be improved.
*/
*/
JOIN_TAB
*
prev_tab
=
tab
-
1
;
if
((
tab
->
bush_root_tab
&&
tab
->
bush_root_tab
->
bush_children
->
start
==
tab
))
prev_tab
=
NULL
;
tab
->
partial_join_cardinality
=
join
->
best_positions
[
i
].
records_read
*
tab
->
partial_join_cardinality
=
join
->
best_positions
[
i
].
records_read
*
(
i
?
(
tab
-
1
)
->
partial_join_cardinality
:
1
);
(
prev_tab
?
prev_tab
->
partial_join_cardinality
:
1
);
}
}
check_join_cache_usage_for_tables
(
join
,
options
,
no_jbuf_after
);
check_join_cache_usage_for_tables
(
join
,
options
,
no_jbuf_after
);
...
@@ -8519,23 +8533,20 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
...
@@ -8519,23 +8533,20 @@ make_join_readinfo(JOIN *join, ulonglong options, uint no_jbuf_after)
tab
=
next_linear_tab
(
join
,
tab
,
TRUE
),
i
++
)
tab
=
next_linear_tab
(
join
,
tab
,
TRUE
),
i
++
)
{
{
//JOIN_TAB *tab=join->join_tab+i;
//JOIN_TAB *tab=join->join_tab+i;
if
(
tab
->
bush_children
)
{
if
(
setup_sj_materialization
(
tab
))
return
TRUE
;
}
TABLE
*
table
=
tab
->
table
;
TABLE
*
table
=
tab
->
table
;
uint
jcl
=
tab
->
used_join_cache_level
;
uint
jcl
=
tab
->
used_join_cache_level
;
tab
->
read_record
.
table
=
table
;
tab
->
read_record
.
table
=
table
;
tab
->
read_record
.
file
=
table
->
file
;
tab
->
read_record
.
file
=
table
->
file
;
tab
->
read_record
.
unlock_row
=
rr_unlock_row
;
tab
->
read_record
.
unlock_row
=
rr_unlock_row
;
tab
->
next_select
=
sub_select
;
/* normal select */
tab
->
sorted
=
sorted
;
tab
->
sorted
=
sorted
;
sorted
=
0
;
// only first must be sorted
sorted
=
0
;
// only first must be sorted
if
(
tab
->
bush_children
)
{
if
(
setup_sj_materialization
(
tab
))
return
TRUE
;
table
=
tab
->
table
;
}
if
(
!
(
tab
->
bush_root_tab
&&
if
(
!
(
tab
->
bush_root_tab
&&
tab
->
bush_root_tab
->
bush_children
->
end
==
tab
+
1
))
tab
->
bush_root_tab
->
bush_children
->
end
==
tab
+
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