~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2009-05-23 00:24:25 UTC
  • mfrom: (1034.1.7 merge)
  • Revision ID: brian@gaz-20090523002425-rd9slkqwe2ip0xkh
Merge of Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
805
805
  bool result= false;
806
806
  assert(session);
807
807
 
808
 
  memset(&tmp, 0, sizeof(TableList));
809
 
 
810
808
  if (!have_lock)
811
809
    pthread_mutex_lock(&LOCK_open);
812
810
 
2264
2262
    errmsg_printf(ERRMSG_LVL_ERROR, _("Table %s had a open data handler in reopen_table"),
2265
2263
                    table->alias);
2266
2264
#endif
2267
 
  memset(&table_list, 0, sizeof(TableList));
2268
2265
  table_list.db=         table->s->db.str;
2269
2266
  table_list.table_name= table->s->table_name.str;
2270
2267
  table_list.table=      table;
2987
2984
    */
2988
2985
    if (tables->schema_table)
2989
2986
    {
2990
 
      if (!mysql_schema_table(session, session->lex, tables))
 
2987
      if (mysql_schema_table(session, session->lex, tables) == false)
2991
2988
        continue;
2992
 
      return(-1);
 
2989
      return -1;
2993
2990
    }
2994
2991
    (*counter)++;
2995
2992
 
2997
2994
      Not a placeholder: must be a base table or a view, and the table is
2998
2995
      not opened yet. Try to open the table.
2999
2996
    */
3000
 
    if (!tables->table)
 
2997
    if (tables->table == NULL)
3001
2998
      tables->table= open_table(session, tables, &refresh, flags);
3002
2999
 
3003
 
    if (!tables->table)
 
3000
    if (tables->table == NULL)
3004
3001
    {
3005
3002
      free_root(&new_frm_mem, MYF(MY_KEEP_PREALLOC));
3006
3003
 
3319
3316
  */
3320
3317
  *need_reopen= false;
3321
3318
 
3322
 
  if (!tables)
 
3319
  if (tables == NULL)
3323
3320
    return 0;
3324
3321
 
3325
3322
  if (!session->locked_tables)
5008
5005
** Expand all '*' in given fields
5009
5006
****************************************************************************/
5010
5007
 
5011
 
int setup_wild(Session *session,
5012
 
               TableList *,
5013
 
               List<Item> &fields,
 
5008
int setup_wild(Session *session, List<Item> &fields,
5014
5009
               List<Item> *sum_func_list,
5015
5010
               uint32_t wild_num)
5016
5011
{
5017
5012
  if (!wild_num)
5018
 
    return(0);
 
5013
    return 0;
5019
5014
 
5020
5015
  Item *item;
5021
5016
  List_iterator<Item> it(fields);
5193
5188
    this is used for INSERT ... SELECT.
5194
5189
    For select we setup tables except first (and its underlying tables)
5195
5190
  */
5196
 
  TableList *first_select_table= (select_insert ?
5197
 
                                   tables->next_local:
5198
 
                                   0);
 
5191
  TableList *first_select_table= (select_insert ?  tables->next_local: NULL);
 
5192
 
5199
5193
  if (!(*leaves))
5200
5194
    make_leaves_list(leaves, tables);
5201
5195
 
5489
5483
    false if all is OK
5490
5484
*/
5491
5485
 
5492
 
int setup_conds(Session *session, TableList *,
5493
 
                TableList *leaves,
5494
 
                COND **conds)
 
5486
int setup_conds(Session *session, TableList *leaves, COND **conds)
5495
5487
{
5496
5488
  Select_Lex *select_lex= session->lex->current_select;
5497
5489
  TableList *table= NULL;       // For HP compilers