mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
typos in comments, minor stylistic edits
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2014, SkySQL Ab & MariaDB Foundation
|
||||
Copyright (c) 2014, 2015 SkySQL Ab & MariaDB Foundation
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -21,10 +21,6 @@
|
||||
upper level.
|
||||
*/
|
||||
|
||||
#ifdef USE_PRAGMA_IMPLEMENTATION
|
||||
#pragma implementation // gcc: Class implementation
|
||||
#endif
|
||||
|
||||
#include "sql_priv.h"
|
||||
#include "sql_select.h"
|
||||
|
||||
@ -45,7 +41,7 @@ int group_by_handler::execute(JOIN *join)
|
||||
ha_rows max_limit;
|
||||
ha_rows *reset_limit= 0;
|
||||
Item **reset_item= 0;
|
||||
DBUG_ENTER("group_by_handler");
|
||||
DBUG_ENTER("group_by_handler::execute");
|
||||
|
||||
if ((err= init_scan()))
|
||||
goto error;
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (c) 2014, SkySQL Ab & MariaDB Foundation
|
||||
Copyright (c) 2014, 2015 SkySQL Ab & MariaDB Foundation
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -28,8 +28,6 @@
|
||||
SELECT a,count(*) as sum FROM t1 where b > 10 group by a, order by sum;
|
||||
SELECT a,count(*) FROM t1,t2;
|
||||
SELECT a, (select sum(*) from t2 where t1.a=t2.a) from t2;
|
||||
|
||||
See https://mariadb.atlassian.net/browse/MDEV-6080 for more information.
|
||||
*/
|
||||
|
||||
class JOIN;
|
||||
@ -46,10 +44,6 @@ public:
|
||||
Item *where, *having;
|
||||
handlerton *ht; /* storage engine of this handler */
|
||||
|
||||
/*
|
||||
Bit's of things the storage engine can do for this query.
|
||||
Should be initialized on object creation.
|
||||
*/
|
||||
/* Temporary table where all results should be stored in record[0] */
|
||||
TABLE *table;
|
||||
|
||||
@ -90,6 +84,8 @@ public:
|
||||
}
|
||||
|
||||
/*
|
||||
Bits of things the storage engine can do for this query.
|
||||
Should be initialized on object creation.
|
||||
Result data is sorted by the storage engine according to order_by (if it
|
||||
exists) else according to the group_by. If this is not specified,
|
||||
MariaDB will store the result set into the temporary table and sort the
|
||||
|
@ -1264,7 +1264,7 @@ struct handlerton
|
||||
the summary / group by query.
|
||||
If the storage engine can't do that, return NULL.
|
||||
|
||||
This is only called for SELECT's where all tables are from the same
|
||||
The server guaranteeds that all tables in the list belong to this
|
||||
storage engine.
|
||||
*/
|
||||
group_by_handler *(*create_group_by)(THD *thd, SELECT_LEX *select_lex,
|
||||
|
@ -760,7 +760,7 @@ JOIN::prepare(Item ***rref_pointer_array,
|
||||
TABLE_LIST *tbl;
|
||||
List_iterator_fast<TABLE_LIST> li(select_lex->leaf_tables);
|
||||
/*
|
||||
If all tables comes from the same storage engine, one_storge_engine will
|
||||
If all tables comes from the same storage engine, one_storage_engine will
|
||||
be set to point to the handlerton of this engine.
|
||||
*/
|
||||
one_storage_engine= 0;
|
||||
@ -1118,7 +1118,8 @@ JOIN::optimize_inner()
|
||||
conds && conds->walk(&Item::exists2in_processor, 0, (uchar *)thd))
|
||||
DBUG_RETURN(1);
|
||||
/*
|
||||
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
|
||||
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
|
||||
for (TABLE_LIST *tbl= tables_list; tbl; tbl= tbl->next_local)
|
||||
{
|
||||
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
|
||||
}
|
||||
storage_handler_for_group_by->store_data_in_temp_table= need_tmp;
|
||||
/*
|
||||
If there is not specified ORDER BY, we should sort things according
|
||||
to the group_by
|
||||
If no ORDER BY clause was specified explicitly, we should sort things
|
||||
according to the group_by
|
||||
*/
|
||||
if (!order)
|
||||
order= group_list;
|
||||
@ -17861,7 +17862,8 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
|
||||
/* Setup HAVING to work with fields in temporary table */
|
||||
join->set_items_ref_array(join->items1);
|
||||
/* The storage engine will take care of the group by query result */
|
||||
DBUG_RETURN(join->storage_handler_for_group_by->execute(join));
|
||||
int res= join->storage_handler_for_group_by->execute(join);
|
||||
DBUG_RETURN(res);
|
||||
}
|
||||
|
||||
if (table)
|
||||
|
@ -1011,6 +1011,11 @@ public:
|
||||
*/
|
||||
uint top_join_tab_count;
|
||||
uint send_group_parts;
|
||||
/*
|
||||
This counts how many times do_select() was invoked for this JOIN.
|
||||
It's used to restrict Pushdown_query::execute() only to the first
|
||||
do_select() invocation.
|
||||
*/
|
||||
uint do_select_call_count;
|
||||
/*
|
||||
True if the query has GROUP BY.
|
||||
|
@ -462,7 +462,7 @@ int ha_seq_group_by_handler::next_row()
|
||||
List_iterator_fast<Item> it(*fields);
|
||||
Item_sum *item_sum;
|
||||
Sequence_share *seqs= ((ha_seq*) table_list->table->file)->seqs;
|
||||
DBUG_ENTER("ha_seq_group_by_handler");
|
||||
DBUG_ENTER("ha_seq_group_by_handler::next_row");
|
||||
|
||||
/*
|
||||
Check if this is the first call to the function. If not, we have already
|
||||
|
Reference in New Issue
Block a user