~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_base.cc

  • Committer: Brian Aker
  • Date: 2009-05-15 07:40:30 UTC
  • mfrom: (1019.1.7 merge)
  • Revision ID: brian@gaz-20090515074030-che1sh7nqadhyj45
Code / Style cleanup merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1717
1717
                       &share, sizeof(*share),
1718
1718
                       &key_buff, key_length,
1719
1719
                       NULL))
1720
 
    return(NULL);
 
1720
    return NULL;
1721
1721
 
1722
1722
  table->s= share;
1723
1723
  share->set_table_cache_key(key_buff, key, key_length);
1728
1728
  if (my_hash_insert(&open_cache, (unsigned char*)table))
1729
1729
  {
1730
1730
    free((unsigned char*) table);
1731
 
    return(NULL);
 
1731
    return NULL;
1732
1732
  }
1733
1733
 
1734
1734
  return(table);
1869
1869
          return(0);
1870
1870
        }
1871
1871
        table->query_id= session->query_id;
1872
 
        session->thread_specific_used= true;
1873
1872
        goto reset;
1874
1873
      }
1875
1874
    }
2136
2135
        if (!(table= table_cache_insert_placeholder(session, key, key_length)))
2137
2136
        {
2138
2137
          pthread_mutex_unlock(&LOCK_open);
2139
 
          return(NULL);
 
2138
          return NULL;
2140
2139
        }
2141
2140
        /*
2142
2141
          Link placeholder to the open tables list so it will be automatically
2157
2156
    if (table == NULL)
2158
2157
    {
2159
2158
      pthread_mutex_unlock(&LOCK_open);
2160
 
      return(NULL);
 
2159
      return NULL;
2161
2160
    }
2162
2161
 
2163
2162
    error= open_unireg_entry(session, table, table_list, alias, key, key_length);
2165
2164
    {
2166
2165
      free(table);
2167
2166
      pthread_mutex_unlock(&LOCK_open);
2168
 
      return(NULL);
 
2167
      return NULL;
2169
2168
    }
2170
2169
    my_hash_insert(&open_cache,(unsigned char*) table);
2171
2170
  }
3613
3612
      if (nj_col)
3614
3613
      {
3615
3614
        my_error(ER_NON_UNIQ_ERROR, MYF(0), name, session->where);
3616
 
        return(NULL);
 
3615
        return NULL;
3617
3616
      }
3618
3617
      nj_col= curr_nj_col;
3619
3618
    }
3620
3619
  }
3621
3620
  if (!nj_col)
3622
 
    return(NULL);
 
3621
    return NULL;
3623
3622
  {
3624
3623
    /* This is a base table. */
3625
3624
    assert(nj_col->table_ref->table == nj_col->table_field->table);
4084
4083
        Store the original table of the field, which may be different from
4085
4084
        cur_table in the case of NATURAL/USING join.
4086
4085
      */
4087
 
      item->cached_table= (!actual_table->cacheable_table || found) ?
4088
 
                          0 : actual_table;
 
4086
      item->cached_table= found ?  0 : actual_table;
4089
4087
 
4090
4088
      assert(session->where);
4091
4089
      /*