~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/utility_dictionary/random_number.cc

  • Committer: Brian Aker
  • Date: 2011-02-12 08:10:17 UTC
  • mto: This revision was merged to the branch mainline in revision 2161.
  • Revision ID: brian@tangent.org-20110212081017-7793i41ybt7gp5ty
More removal of session from includes.

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
 
#include <drizzled/sql_lex.h>
 
27
 
28
28
 
29
29
using namespace drizzled;
30
30
using namespace std;
37
37
 
38
38
bool utility_dictionary::RandomNumber::Generator::populate()
39
39
{
40
 
  if (lex().isSumExprUsed() && count > 0)
41
 
    return false;
42
 
 
43
 
  if (lex().current_select->group_list.elements && count > 0)
44
 
    return false;
45
 
 
46
 
  if (lex().current_select->explicit_limit or count == 0)
 
40
  if (getSession().getLex()->isSumExprUsed() && count > 0)
 
41
    return false;
 
42
 
 
43
  if (getSession().getLex()->current_select->group_list.elements && count > 0)
 
44
    return false;
 
45
 
 
46
  if (getSession().getLex()->current_select->explicit_limit or count == 0)
47
47
  {
48
48
    push(static_cast<int64_t>(random()));
49
49
  }