Skip to content

Commit e8daa41

Browse files
committed
typos in comments, minor stylistic edits
1 parent cf50e13 commit e8daa41

File tree

6 files changed

+19
-20
lines changed

6 files changed

+19
-20
lines changed

sql/group_by_handler.cc

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014, SkySQL Ab & MariaDB Foundation
2+
Copyright (c) 2014, 2015 SkySQL Ab & MariaDB Foundation
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -21,10 +21,6 @@
2121
upper level.
2222
*/
2323

24-
#ifdef USE_PRAGMA_IMPLEMENTATION
25-
#pragma implementation // gcc: Class implementation
26-
#endif
27-
2824
#include "sql_priv.h"
2925
#include "sql_select.h"
3026

@@ -45,7 +41,7 @@ int group_by_handler::execute(JOIN *join)
4541
ha_rows max_limit;
4642
ha_rows *reset_limit= 0;
4743
Item **reset_item= 0;
48-
DBUG_ENTER("group_by_handler");
44+
DBUG_ENTER("group_by_handler::execute");
4945

5046
if ((err= init_scan()))
5147
goto error;

sql/group_by_handler.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2014, SkySQL Ab & MariaDB Foundation
2+
Copyright (c) 2014, 2015 SkySQL Ab & MariaDB Foundation
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -28,8 +28,6 @@
2828
SELECT a,count(*) as sum FROM t1 where b > 10 group by a, order by sum;
2929
SELECT a,count(*) FROM t1,t2;
3030
SELECT a, (select sum(*) from t2 where t1.a=t2.a) from t2;
31-
32-
See https://mariadb.atlassian.net/browse/MDEV-6080 for more information.
3331
*/
3432

3533
class JOIN;
@@ -46,10 +44,6 @@ class group_by_handler
4644
Item *where, *having;
4745
handlerton *ht; /* storage engine of this handler */
4846

49-
/*
50-
Bit's of things the storage engine can do for this query.
51-
Should be initialized on object creation.
52-
*/
5347
/* Temporary table where all results should be stored in record[0] */
5448
TABLE *table;
5549

@@ -90,6 +84,8 @@ class group_by_handler
9084
}
9185

9286
/*
87+
Bits of things the storage engine can do for this query.
88+
Should be initialized on object creation.
9389
Result data is sorted by the storage engine according to order_by (if it
9490
exists) else according to the group_by. If this is not specified,
9591
MariaDB will store the result set into the temporary table and sort the

sql/handler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ struct handlerton
12641264
the summary / group by query.
12651265
If the storage engine can't do that, return NULL.
12661266
1267-
This is only called for SELECT's where all tables are from the same
1267+
The server guaranteeds that all tables in the list belong to this
12681268
storage engine.
12691269
*/
12701270
group_by_handler *(*create_group_by)(THD *thd, SELECT_LEX *select_lex,

sql/sql_select.cc

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ JOIN::prepare(Item ***rref_pointer_array,
760760
TABLE_LIST *tbl;
761761
List_iterator_fast<TABLE_LIST> li(select_lex->leaf_tables);
762762
/*
763-
If all tables comes from the same storage engine, one_storge_engine will
763+
If all tables comes from the same storage engine, one_storage_engine will
764764
be set to point to the handlerton of this engine.
765765
*/
766766
one_storage_engine= 0;
@@ -1118,7 +1118,8 @@ JOIN::optimize_inner()
11181118
conds && conds->walk(&Item::exists2in_processor, 0, (uchar *)thd))
11191119
DBUG_RETURN(1);
11201120
/*
1121-
TODO: make view to decide if it is possible to write to WHERE directly or make Semi-Joins able to process ON condition if it is possible
1121+
TODO
1122+
make view to decide if it is possible to write to WHERE directly or make Semi-Joins able to process ON condition if it is possible
11221123
for (TABLE_LIST *tbl= tables_list; tbl; tbl= tbl->next_local)
11231124
{
11241125
if (tbl->on_expr &&
@@ -1969,8 +1970,8 @@ TODO: make view to decide if it is possible to write to WHERE directly or make S
19691970
}
19701971
storage_handler_for_group_by->store_data_in_temp_table= need_tmp;
19711972
/*
1972-
If there is not specified ORDER BY, we should sort things according
1973-
to the group_by
1973+
If no ORDER BY clause was specified explicitly, we should sort things
1974+
according to the group_by
19741975
*/
19751976
if (!order)
19761977
order= group_list;
@@ -17861,7 +17862,8 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
1786117862
/* Setup HAVING to work with fields in temporary table */
1786217863
join->set_items_ref_array(join->items1);
1786317864
/* The storage engine will take care of the group by query result */
17864-
DBUG_RETURN(join->storage_handler_for_group_by->execute(join));
17865+
int res= join->storage_handler_for_group_by->execute(join);
17866+
DBUG_RETURN(res);
1786517867
}
1786617868

1786717869
if (table)

sql/sql_select.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,11 @@ class JOIN :public Sql_alloc
10111011
*/
10121012
uint top_join_tab_count;
10131013
uint send_group_parts;
1014+
/*
1015+
This counts how many times do_select() was invoked for this JOIN.
1016+
It's used to restrict Pushdown_query::execute() only to the first
1017+
do_select() invocation.
1018+
*/
10141019
uint do_select_call_count;
10151020
/*
10161021
True if the query has GROUP BY.

storage/sequence/sequence.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ int ha_seq_group_by_handler::next_row()
462462
List_iterator_fast<Item> it(*fields);
463463
Item_sum *item_sum;
464464
Sequence_share *seqs= ((ha_seq*) table_list->table->file)->seqs;
465-
DBUG_ENTER("ha_seq_group_by_handler");
465+
DBUG_ENTER("ha_seq_group_by_handler::next_row");
466466

467467
/*
468468
Check if this is the first call to the function. If not, we have already

0 commit comments

Comments
 (0)