~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: Lee Bieber
  • Date: 2011-03-22 17:41:09 UTC
  • mfrom: (2241.2.18 refactor2)
  • Revision ID: kalebral@gmail.com-20110322174109-1bsfvv4q1dnfd089
Merge Olaf - more code refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
409
409
  session->make_lex_string(&db, "data_dictionary", sizeof("data_dictionary"), false);
410
410
  session->make_lex_string(&table, schema_table_name, false);
411
411
 
412
 
  if (! sel->add_table_to_list(session, new Table_ident(db, table),
413
 
                               NULL, table_options, TL_READ))
 
412
  if (not sel->add_table_to_list(session, new Table_ident(db, table), NULL, table_options, TL_READ))
414
413
  {
415
414
    return true;
416
415
  }
961
960
                                         List<Index_hint> *index_hints_arg,
962
961
                                         LEX_STRING *option)
963
962
{
964
 
  TableList *ptr;
965
963
  TableList *previous_table_ref; /* The table preceding the current one. */
966
964
  char *alias_str;
967
965
  LEX *lex= &session->lex();
1000
998
    if (!(alias_str= (char*) session->getMemRoot()->duplicate(alias_str,table->table.length+1)))
1001
999
      return NULL;
1002
1000
  }
1003
 
  if (!(ptr = (TableList *) session->calloc(sizeof(TableList))))
1004
 
    return NULL;
 
1001
  TableList *ptr = (TableList *) session->calloc(sizeof(TableList));
1005
1002
 
1006
1003
  if (table->db.str)
1007
1004
  {
1380
1377
    true   if a memory allocation error occured
1381
1378
*/
1382
1379
 
1383
 
bool
1384
 
push_new_name_resolution_context(Session *session,
1385
 
                                 TableList *left_op, TableList *right_op)
 
1380
void push_new_name_resolution_context(Session& session, TableList& left_op, TableList& right_op)
1386
1381
{
1387
 
  Name_resolution_context *on_context;
1388
 
  if (!(on_context= new (session->mem_root) Name_resolution_context))
1389
 
    return true;
 
1382
  Name_resolution_context *on_context= new (session.mem_root) Name_resolution_context;
1390
1383
  on_context->init();
1391
 
  on_context->first_name_resolution_table=
1392
 
    left_op->first_leaf_for_name_resolution();
1393
 
  on_context->last_name_resolution_table=
1394
 
    right_op->last_leaf_for_name_resolution();
1395
 
  return session->lex().push_context(on_context);
 
1384
  on_context->first_name_resolution_table= left_op.first_leaf_for_name_resolution();
 
1385
  on_context->last_name_resolution_table= right_op.last_leaf_for_name_resolution();
 
1386
  session.lex().push_context(on_context);
1396
1387
}
1397
1388
 
1398
1389