~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/parser.cc

  • Committer: Brian Aker
  • Date: 2011-07-25 14:24:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2373.
  • Revision ID: brian@tangent.org-20110725142419-3vobv9u6k7jp4qej
Remove the typedef on lexkey

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
  my_printf_error(ER_PARSE_ERROR_UNKNOWN, ER(ER_PARSE_ERROR_UNKNOWN), MYF(0), message);
221
221
}
222
222
 
223
 
bool check_reserved_words(LEX_STRING *name)
 
223
bool check_reserved_words(lex_string_t *name)
224
224
{
225
225
  if (!my_strcasecmp(system_charset_info, name->str, "GLOBAL") ||
226
226
      !my_strcasecmp(system_charset_info, name->str, "LOCAL") ||
300
300
  return true;
301
301
}
302
302
 
303
 
void buildEngineOption(LEX *lex, const char *key, const LEX_STRING &value)
 
303
void buildEngineOption(LEX *lex, const char *key, const lex_string_t &value)
304
304
{
305
305
  message::Engine::Option *opt= lex->table()->mutable_engine()->add_options();
306
306
  opt->set_name(key);
314
314
  opt->set_state(boost::lexical_cast<std::string>(value));
315
315
}
316
316
 
317
 
void buildSchemaOption(LEX *lex, const char *key, const LEX_STRING &value)
 
317
void buildSchemaOption(LEX *lex, const char *key, const lex_string_t &value)
318
318
{
319
319
  statement::CreateSchema *statement= (statement::CreateSchema *)lex->statement;
320
320
  message::Engine::Option *opt= statement->schema_message.mutable_engine()->add_options();
322
322
  opt->set_state(value.str, value.length);
323
323
}
324
324
 
325
 
void buildSchemaDefiner(LEX *lex, const LEX_STRING &value)
 
325
void buildSchemaDefiner(LEX *lex, const lex_string_t &value)
326
326
{
327
327
  statement::CreateSchema *statement= (statement::CreateSchema *)lex->statement;
328
328
  identifier::User user(value.str);
343
343
  opt->set_state(boost::lexical_cast<std::string>(value));
344
344
}
345
345
 
346
 
bool checkFieldIdent(LEX *lex, const LEX_STRING &schema_name, const LEX_STRING &table_name)
 
346
bool checkFieldIdent(LEX *lex, const lex_string_t &schema_name, const lex_string_t &table_name)
347
347
{
348
348
  TableList *table= reinterpret_cast<TableList*>(lex->current_select->table_list.first);
349
349
 
367
367
}
368
368
 
369
369
Item *buildIdent(LEX *lex,
370
 
                 const LEX_STRING &schema_name,
371
 
                 const LEX_STRING &table_name,
372
 
                 const LEX_STRING &field_name)
 
370
                 const lex_string_t &schema_name,
 
371
                 const lex_string_t &table_name,
 
372
                 const lex_string_t &field_name)
373
373
{
374
374
  Select_Lex *sel= lex->current_select;
375
375
 
387
387
  return item;
388
388
}
389
389
 
390
 
Item *buildTableWild(LEX *lex, const LEX_STRING &schema_name, const LEX_STRING &table_name)
 
390
Item *buildTableWild(LEX *lex, const lex_string_t &schema_name, const lex_string_t &table_name)
391
391
{
392
392
  Select_Lex *sel= lex->current_select;
393
393
  Item *item= new Item_field(lex->current_context(), schema_name.str, table_name.str, "*");
402
402
  lex->length= lex->dec=0;
403
403
  lex->type=0;
404
404
  statement->default_value= statement->on_update_value= 0;
405
 
  statement->comment= null_lex_str;
 
405
  statement->comment= null_lex_string();
406
406
  lex->charset= NULL;
407
407
  statement->column_format= COLUMN_FORMAT_TYPE_DEFAULT;
408
408