~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/utility_dictionary/counter.cc

mergeĀ lp:~linuxjedi/drizzle/trunk-remove-drizzleadmin

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include "config.h"
 
21
#include <config.h>
22
22
 
23
 
#include "plugin/utility_dictionary/dictionary.h"
 
23
#include <plugin/utility_dictionary/dictionary.h>
24
24
 
25
25
#include <drizzled/atomics.h>
26
26
#include <drizzled/session.h>
27
 
 
 
27
#include <drizzled/sql_lex.h>
28
28
 
29
29
using namespace drizzled;
30
30
using namespace std;
39
39
 
40
40
bool utility_dictionary::Counter::Generator::populate()
41
41
{
42
 
  if (getSession().getLex()->isSumExprUsed() && count > 0)
43
 
    return false;
44
 
 
45
 
  if (getSession().getLex()->current_select->group_list.elements && count > 0)
46
 
    return false;
47
 
 
48
 
  if (getSession().getLex()->current_select->explicit_limit or count == 0)
 
42
  if (lex().isSumExprUsed() && count > 0)
 
43
    return false;
 
44
 
 
45
  if (lex().current_select->group_list.elements && count > 0)
 
46
    return false;
 
47
 
 
48
  if (lex().current_select->explicit_limit or count == 0)
49
49
  {
50
50
    push(counter.increment());
51
51
  }