~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_lex.cc

  • Committer: Brian Aker
  • Date: 2011-01-13 02:08:31 UTC
  • mto: (2079.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 2080.
  • Revision ID: brian@tangent.org-20110113020831-gionzccgg17efwn7
Basic DDL for catalog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
static bool add_to_list(Session *session, SQL_LIST &list, Item *item, bool asc)
50
50
{
51
51
  Order *order;
 
52
 
52
53
  if (!(order = (Order *) session->alloc(sizeof(Order))))
53
 
    return(1);
 
54
    return true;
 
55
 
54
56
  order->item_ptr= item;
55
57
  order->item= &order->item_ptr;
56
58
  order->asc = asc;
57
59
  order->free_me=0;
58
60
  order->used=0;
59
61
  order->counter_used= 0;
60
 
  list.link_in_list((unsigned char*) order,(unsigned char**) &order->next);
61
 
  return(0);
 
62
  list.link_in_list((unsigned char*) order, (unsigned char**) &order->next);
 
63
 
 
64
  return false;
62
65
}
63
66
 
64
67
/**
68
71
 
69
72
Lex_input_stream::Lex_input_stream(Session *session,
70
73
                                   const char* buffer,
71
 
                                   unsigned int length)
72
 
: m_session(session),
 
74
                                   unsigned int length) :
 
75
  m_session(session),
73
76
  yylineno(1),
74
77
  yytoklen(0),
75
78
  yylval(NULL),
2169
2172
                                            str, length));
2170
2173
}
2171
2174
 
2172
 
bool check_for_sql_keyword(drizzled::drizzle_lex_string const& string)
 
2175
bool check_for_sql_keyword(drizzled::lex_string_t const& string)
2173
2176
{
2174
2177
  if (sql_reserved_words::in_word_set(string.str, string.length))
2175
2178
      return true;