~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/parser.cc

  • Committer: Mark Atwood
  • Date: 2011-10-19 00:10:47 UTC
  • mfrom: (2440.2.13 rf)
  • Revision ID: me@mark.atwood.name-20111019001047-atj0u8gedphon1tb
mergeĀ lp:~olafvdspek/drizzle/refactor5

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
  my_printf_error(ER_PARSE_ERROR_UNKNOWN, ER(ER_PARSE_ERROR_UNKNOWN), MYF(0), message);
222
222
}
223
223
 
224
 
bool check_reserved_words(lex_string_t *name)
 
224
bool check_reserved_words(str_ref name)
225
225
{
226
 
  if (!my_strcasecmp(system_charset_info, name->data(), "GLOBAL") ||
227
 
      !my_strcasecmp(system_charset_info, name->data(), "LOCAL") ||
228
 
      !my_strcasecmp(system_charset_info, name->data(), "SESSION"))
 
226
  if (!my_strcasecmp(system_charset_info, name.data(), "GLOBAL") ||
 
227
      !my_strcasecmp(system_charset_info, name.data(), "LOCAL") ||
 
228
      !my_strcasecmp(system_charset_info, name.data(), "SESSION"))
229
229
    return true;
230
230
 
231
231
  return false;
441
441
void buildForeignKey(LEX *lex, const lex_string_t &name_arg, drizzled::Table_ident *table)
442
442
{
443
443
  statement::AlterTable *statement= (statement::AlterTable *)lex->statement;
444
 
  Key *key= new Foreign_key(name_arg, lex->col_list,
445
 
                            table,
446
 
                            lex->ref_list,
447
 
                            statement->fk_delete_opt,
448
 
                            statement->fk_update_opt,
449
 
                            statement->fk_match_option);
 
444
  statement->alter_info.key_list.push_back(new Foreign_key(name_arg, lex->col_list, table, lex->ref_list, 
 
445
    statement->fk_delete_opt, statement->fk_update_opt, statement->fk_match_option));
450
446
 
451
 
  statement->alter_info.key_list.push_back(key);
452
 
  key= new Key(Key::MULTIPLE, name_arg, &default_key_create_info, 1, lex->col_list);
453
 
  statement->alter_info.key_list.push_back(key);
 
447
  statement->alter_info.key_list.push_back(new Key(Key::MULTIPLE, name_arg, &default_key_create_info, 1, lex->col_list));
454
448
  lex->col_list.clear(); /* Alloced by memory::sql_alloc */
455
449
  /* Only used for ALTER TABLE. Ignored otherwise. */
456
450
  statement->alter_info.flags.set(ALTER_FOREIGN_KEY);