1237.9.1
by Padraig O'Sullivan
Moved the opt_sum.cc file into the optimizer directory and renamed it to sum.cc. Added a header file |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
3 |
*
|
|
1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
4 |
* Copyright (C) 2008-2009 Sun Microsystems, Inc.
|
1237.9.1
by Padraig O'Sullivan
Moved the opt_sum.cc file into the optimizer directory and renamed it to sum.cc. Added a header file |
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or modify
|
|
7 |
* it under the terms of the GNU General Public License as published by
|
|
8 |
* the Free Software Foundation; version 2 of the License.
|
|
9 |
*
|
|
10 |
* This program is distributed in the hope that it will be useful,
|
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13 |
* GNU General Public License for more details.
|
|
14 |
*
|
|
15 |
* You should have received a copy of the GNU General Public License
|
|
16 |
* along with this program; if not, write to the Free Software
|
|
17 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
18 |
*/
|
|
19 |
||
2234
by Brian Aker
Mass removal of ifdef/endif in favor of pragma once. |
20 |
#pragma once
|
1237.9.1
by Padraig O'Sullivan
Moved the opt_sum.cc file into the optimizer directory and renamed it to sum.cc. Added a header file |
21 |
|
22 |
namespace drizzled |
|
23 |
{
|
|
24 |
||
25 |
namespace optimizer |
|
26 |
{
|
|
27 |
||
28 |
/**
|
|
29 |
Test if the predicate compares a field with constants.
|
|
30 |
||
31 |
@param func_item Predicate item
|
|
32 |
@param[out] args Here we store the field followed by constants
|
|
33 |
@param[out] inv_order Is set to 1 if the predicate is of the form
|
|
34 |
'const op field'
|
|
35 |
||
36 |
@retval
|
|
37 |
0 func_item is a simple predicate: a field is compared with
|
|
38 |
constants
|
|
39 |
@retval
|
|
40 |
1 Otherwise
|
|
41 |
*/
|
|
1237.13.5
by Padraig O'Sullivan
Split some classes from the range optimizer out in to their own header and implementation files. |
42 |
bool simple_pred(Item_func *func_item, Item **args, bool &inv_order); |
1237.9.1
by Padraig O'Sullivan
Moved the opt_sum.cc file into the optimizer directory and renamed it to sum.cc. Added a header file |
43 |
|
44 |
/**
|
|
45 |
Substitutes constants for some COUNT(), MIN() and MAX() functions.
|
|
46 |
||
47 |
@param tables list of leaves of join table tree
|
|
48 |
@param all_fields All fields to be returned
|
|
49 |
@param conds WHERE clause
|
|
50 |
||
51 |
@note
|
|
52 |
This function is only called for queries with sum functions and no
|
|
53 |
GROUP BY part.
|
|
54 |
||
55 |
@retval
|
|
56 |
0 no errors
|
|
57 |
@retval
|
|
58 |
1 if all items were resolved
|
|
59 |
@retval
|
|
60 |
HA_ERR_KEY_NOT_FOUND on impossible conditions
|
|
61 |
@retval
|
|
62 |
HA_ERR_... if a deadlock or a lock wait timeout happens, for example
|
|
63 |
*/
|
|
64 |
int sum_query(TableList *tables, List<Item> &all_fields, COND *conds); |
|
65 |
||
66 |
} /* namespace optimizer */ |
|
67 |
||
68 |
} /* namespace drizzled */ |
|
69 |