~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/utility_dictionary/random_string.cc

  • Committer: pcrews
  • Date: 2011-05-24 17:36:24 UTC
  • mfrom: (1099.4.232 drizzle)
  • Revision ID: pcrews@lucid32-20110524173624-mwr1bvq6fa1r01ao
Updated translations + 2011.05.18 tarball tag

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;
49
49
 
50
50
bool utility_dictionary::RandomString::Generator::populate()
51
51
{
52
 
  if (getSession().getLex()->isSumExprUsed() && count > 0)
53
 
    return false;
54
 
 
55
 
  if (getSession().getLex()->current_select->group_list.elements && count > 0)
56
 
    return false;
57
 
 
58
 
  if (getSession().getLex()->current_select->explicit_limit or count == 0)
 
52
  if (lex().isSumExprUsed() && count > 0)
 
53
    return false;
 
54
 
 
55
  if (lex().current_select->group_list.elements && count > 0)
 
56
    return false;
 
57
 
 
58
  if (lex().current_select->explicit_limit or count == 0)
59
59
  {
60
60
    uint32_t random_char_number= random() % LARGEST_RANDOM_STRING;
61
61
    char buffer[LARGEST_RANDOM_STRING];