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
db746178
Commit
db746178
authored
Feb 16, 2011
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Post-merge fixes part 3
parent
089d2e2e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
sql/sql_join_cache.cc
sql/sql_join_cache.cc
+9
-9
No files found.
sql/sql_join_cache.cc
View file @
db746178
...
...
@@ -253,7 +253,7 @@ psergey-merge: was:
The following loop will get inside SJM nests, because data may be unpacked
to sjm-inner tables.
*/
for
(
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
{
tab
->
calc_used_field_length
(
FALSE
);
flag_fields
+=
test
(
tab
->
used_null_fields
||
tab
->
used_uneven_bit_fields
);
...
...
@@ -313,7 +313,7 @@ void JOIN_CACHE::collect_info_on_key_args()
tab"=start_tab" is not a correct substitute for
"cache->join_tab - cache->tables".
*/
for
(
tab
=
cache
->
start_tab
;
tab
!=
cache
->
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
tab
=
cache
->
start_tab
;
tab
!=
cache
->
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
//for (tab= cache->join_tab-cache->tables; tab ;
// tab= cache->get_next_table(tab))
{
...
...
@@ -433,7 +433,7 @@ void JOIN_CACHE::create_flag_fields()
/* Create fields for all null bitmaps and null row flags that are needed */
// // psergey-merge: for (tab= join_tab-tables; tab; tab= get_next_table(tab))
//for (tab= join_tab-tables; tab < join_tab; tab++)
for
(
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
{
TABLE
*
table
=
tab
->
table
;
...
...
@@ -524,7 +524,7 @@ void JOIN_CACHE::create_key_arg_fields()
// tab= cache->get_next_table(tab))
//psergey-merge: ^
for
(
tab
=
cache
->
start_tab
;
tab
!=
cache
->
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
{
CACHE_FIELD
*
copy_end
;
MY_BITMAP
*
key_read_set
=
&
tab
->
table
->
tmp_set
;
...
...
@@ -574,7 +574,7 @@ void JOIN_CACHE::create_key_arg_fields()
/* Now create local fields that are used to build ref for this key access */
copy
=
field_descr
+
flag_fields
;
for
(
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
//for (tab= join_tab-tables; tab; tab= get_next_table(tab))
{
length
+=
add_table_data_fields_to_join_cache
(
tab
,
&
tab
->
table
->
tmp_set
,
...
...
@@ -631,7 +631,7 @@ void JOIN_CACHE::create_remaining_fields()
CACHE_FIELD
*
copy
=
field_descr
+
flag_fields
+
data_field_count
;
CACHE_FIELD
**
copy_ptr
=
blob_ptr
+
data_field_ptr_count
;
for
(
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
//psergey-merge: for (tab= join_tab-tables; tab; tab= get_next_table(tab))
//for (tab= join_tab-tables; tab < join_tab; tab++)
{
...
...
@@ -791,7 +791,7 @@ ulong JOIN_CACHE::get_min_join_buffer_size()
{
ulong
len
=
0
;
//for (JOIN_TAB *tab= join_tab-tables; tab < join_tab; tab++)
for
(
JOIN_TAB
*
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
JOIN_TAB
*
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
len
+=
tab
->
get_max_used_fieldlength
();
len
+=
get_record_max_affix_length
()
+
get_max_key_addon_space_per_record
();
ulong
min_sz
=
len
*
min_records
;
...
...
@@ -845,7 +845,7 @@ ulong JOIN_CACHE::get_max_join_buffer_size(bool optimize_buff_size)
ulong
min_sz
=
get_min_join_buffer_size
();
ulong
len
=
0
;
//for (JOIN_TAB *tab= join_tab-tables; tab < join_tab; tab++)
for
(
JOIN_TAB
*
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
for
(
JOIN_TAB
*
tab
=
start_tab
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
len
+=
tab
->
get_used_fieldlength
();
len
+=
get_record_max_affix_length
();
avg_record_length
=
len
;
...
...
@@ -924,7 +924,7 @@ int JOIN_CACHE::alloc_buffer()
// for (tab= cache->join_tab-cache->tables; tab < cache->join_tab ; tab++)
// (fixed)
for
(
tab
=
join
->
join_tab
+
join
->
const_tables
;
tab
!=
join_tab
;
tab
=
next_linear_tab
(
join
,
tab
,
TRU
E
))
tab
=
next_linear_tab
(
join
,
tab
,
FALS
E
))
{
cache
=
tab
->
cache
;
if
(
cache
)
...
...
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