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
c368878f
Commit
c368878f
authored
Apr 10, 2018
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: comments and whitespaces
parent
4b061ec4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
15 deletions
+16
-15
sql/sql_class.h
sql/sql_class.h
+2
-2
sql/sql_select.cc
sql/sql_select.cc
+13
-12
sql/sql_select.h
sql/sql_select.h
+1
-1
No files found.
sql/sql_class.h
View file @
c368878f
...
@@ -4990,7 +4990,7 @@ class select_result :public select_result_sink
...
@@ -4990,7 +4990,7 @@ class select_result :public select_result_sink
virtual
uint
field_count
(
List
<
Item
>
&
fields
)
const
virtual
uint
field_count
(
List
<
Item
>
&
fields
)
const
{
return
fields
.
elements
;
}
{
return
fields
.
elements
;
}
virtual
bool
send_result_set_metadata
(
List
<
Item
>
&
list
,
uint
flags
)
=
0
;
virtual
bool
send_result_set_metadata
(
List
<
Item
>
&
list
,
uint
flags
)
=
0
;
virtual
bool
initialize_tables
(
JOIN
*
join
=
0
)
{
return
0
;
}
virtual
bool
initialize_tables
(
JOIN
*
join
)
{
return
0
;
}
virtual
bool
send_eof
()
=
0
;
virtual
bool
send_eof
()
=
0
;
/**
/**
Check if this query returns a result set and therefore is allowed in
Check if this query returns a result set and therefore is allowed in
...
@@ -5542,7 +5542,7 @@ class select_union_direct :public select_unit
...
@@ -5542,7 +5542,7 @@ class select_union_direct :public select_unit
bool
postponed_prepare
(
List
<
Item
>
&
types
);
bool
postponed_prepare
(
List
<
Item
>
&
types
);
bool
send_result_set_metadata
(
List
<
Item
>
&
list
,
uint
flags
);
bool
send_result_set_metadata
(
List
<
Item
>
&
list
,
uint
flags
);
int
send_data
(
List
<
Item
>
&
items
);
int
send_data
(
List
<
Item
>
&
items
);
bool
initialize_tables
(
JOIN
*
join
=
NULL
);
bool
initialize_tables
(
JOIN
*
join
);
bool
send_eof
();
bool
send_eof
();
bool
flush
()
{
return
false
;
}
bool
flush
()
{
return
false
;
}
bool
check_simple_select
()
const
bool
check_simple_select
()
const
...
...
sql/sql_select.cc
View file @
c368878f
...
@@ -2529,7 +2529,7 @@ int JOIN::optimize_stage2()
...
@@ -2529,7 +2529,7 @@ int JOIN::optimize_stage2()
ordered_index_usage
=
ordered_index_order_by
;
ordered_index_usage
=
ordered_index_order_by
;
}
}
}
}
}
}
if
(
having
)
if
(
having
)
having_is_correlated
=
MY_TEST
(
having
->
used_tables
()
&
OUTER_REF_TABLE_BIT
);
having_is_correlated
=
MY_TEST
(
having
->
used_tables
()
&
OUTER_REF_TABLE_BIT
);
...
@@ -2977,13 +2977,13 @@ bool JOIN::make_aggr_tables_info()
...
@@ -2977,13 +2977,13 @@ bool JOIN::make_aggr_tables_info()
(
select_distinct
&&
tmp_table_param
.
using_outer_summary_function
))
(
select_distinct
&&
tmp_table_param
.
using_outer_summary_function
))
{
/* Must copy to another table */
{
/* Must copy to another table */
DBUG_PRINT
(
"info"
,(
"Creating group table"
));
DBUG_PRINT
(
"info"
,(
"Creating group table"
));
calc_group_buffer
(
this
,
group_list
);
calc_group_buffer
(
this
,
group_list
);
count_field_types
(
select_lex
,
&
tmp_table_param
,
tmp_all_fields1
,
count_field_types
(
select_lex
,
&
tmp_table_param
,
tmp_all_fields1
,
select_distinct
&&
!
group_list
);
select_distinct
&&
!
group_list
);
tmp_table_param
.
hidden_field_count
=
tmp_table_param
.
hidden_field_count
=
tmp_all_fields1
.
elements
-
tmp_fields_list1
.
elements
;
tmp_all_fields1
.
elements
-
tmp_fields_list1
.
elements
;
curr_tab
++
;
curr_tab
++
;
aggr_tables
++
;
aggr_tables
++
;
bzero
(
curr_tab
,
sizeof
(
JOIN_TAB
));
bzero
(
curr_tab
,
sizeof
(
JOIN_TAB
));
...
@@ -2998,12 +2998,11 @@ bool JOIN::make_aggr_tables_info()
...
@@ -2998,12 +2998,11 @@ bool JOIN::make_aggr_tables_info()
if
(
join_tab
->
is_using_loose_index_scan
())
if
(
join_tab
->
is_using_loose_index_scan
())
tmp_table_param
.
precomputed_group_by
=
TRUE
;
tmp_table_param
.
precomputed_group_by
=
TRUE
;
tmp_table_param
.
hidden_field_count
=
tmp_table_param
.
hidden_field_count
=
curr_all_fields
->
elements
-
curr_fields_list
->
elements
;
curr_all_fields
->
elements
-
curr_fields_list
->
elements
;
ORDER
*
dummy
=
NULL
;
//TODO can use table->group here also
ORDER
*
dummy
=
NULL
;
//TODO can use table->group here also
if
(
create_postjoin_aggr_table
(
curr_tab
,
if
(
create_postjoin_aggr_table
(
curr_tab
,
curr_all_fields
,
dummy
,
true
,
curr_all_fields
,
dummy
,
true
,
distinct
,
keep_row_order
))
distinct
,
keep_row_order
))
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
...
@@ -3274,8 +3273,8 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
...
@@ -3274,8 +3273,8 @@ JOIN::create_postjoin_aggr_table(JOIN_TAB *tab, List<Item> *table_fields,
*/
*/
ha_rows
table_rows_limit
=
((
order
==
NULL
||
skip_sort_order
)
&&
ha_rows
table_rows_limit
=
((
order
==
NULL
||
skip_sort_order
)
&&
!
table_group
&&
!
table_group
&&
!
select_lex
->
with_sum_func
)
?
!
select_lex
->
with_sum_func
)
?
select_limit
select_limit
:
HA_POS_ERROR
;
:
HA_POS_ERROR
;
if
(
!
(
tab
->
tmp_table_param
=
new
TMP_TABLE_PARAM
(
tmp_table_param
)))
if
(
!
(
tab
->
tmp_table_param
=
new
TMP_TABLE_PARAM
(
tmp_table_param
)))
DBUG_RETURN
(
true
);
DBUG_RETURN
(
true
);
...
@@ -9373,7 +9372,7 @@ bool JOIN::get_best_combination()
...
@@ -9373,7 +9372,7 @@ bool JOIN::get_best_combination()
*/
*/
uint
aggr_tables
=
(
group_list
?
1
:
0
)
+
uint
aggr_tables
=
(
group_list
?
1
:
0
)
+
(
select_distinct
?
(
select_distinct
?
(
tmp_table_param
.
using_outer_summary_function
?
2
:
1
)
:
0
)
+
(
tmp_table_param
.
using_outer_summary_function
?
2
:
1
)
:
0
)
+
(
order
?
1
:
0
)
+
(
order
?
1
:
0
)
+
(
select_options
&
(
SELECT_BIG_RESULT
|
OPTION_BUFFER_RESULT
)
?
1
:
0
)
;
(
select_options
&
(
SELECT_BIG_RESULT
|
OPTION_BUFFER_RESULT
)
?
1
:
0
)
;
...
@@ -16628,8 +16627,6 @@ static void create_tmp_field_from_item_finalize(THD *thd,
...
@@ -16628,8 +16627,6 @@ static void create_tmp_field_from_item_finalize(THD *thd,
update the record in the original table.
update the record in the original table.
If modify_item is 0 then fill_record() will
If modify_item is 0 then fill_record() will
update the temporary table
update the temporary table
@param convert_blob_length If >0 create a varstring(convert_blob_length)
field instead of blob.
@retval
@retval
0 on error
0 on error
...
@@ -16947,6 +16944,10 @@ setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps)
...
@@ -16947,6 +16944,10 @@ setup_tmp_table_column_bitmaps(TABLE *table, uchar *bitmaps)
temporary table
temporary table
@param table_alias possible name of the temporary table that can
@param table_alias possible name of the temporary table that can
be used for name resolving; can be "".
be used for name resolving; can be "".
@param do_not_open only create the TABLE object, do not
open the table in the engine
@param keep_row_order rows need to be read in the order they were
inserted, the engine should preserve this order
*/
*/
TABLE
*
TABLE
*
...
...
sql/sql_select.h
View file @
c368878f
...
@@ -470,7 +470,7 @@ typedef struct st_join_table {
...
@@ -470,7 +470,7 @@ typedef struct st_join_table {
Window_funcs_computation
*
window_funcs_step
;
Window_funcs_computation
*
window_funcs_step
;
/**
/**
List of topmost expressions in the select list. The *next* JOIN
TAB
List of topmost expressions in the select list. The *next* JOIN
_
TAB
in the plan should use it to obtain correct values. Same applicable to
in the plan should use it to obtain correct values. Same applicable to
all_fields. These lists are needed because after tmp tables functions
all_fields. These lists are needed because after tmp tables functions
will be turned to fields. These variables are pointing to
will be turned to fields. These variables are pointing to
...
...
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