~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/opt_sum.cc

  • Committer: Brian Aker
  • Date: 2008-08-18 22:20:43 UTC
  • mto: This revision was merged to the branch mainline in revision 352.
  • Revision ID: brian@tangent.org-20080818222043-et6zf93ogrgx1cz9
Refactoring table.h

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
    #                   Multiplication of number of rows in all tables
75
75
*/
76
76
 
77
 
static uint64_t get_exact_record_count(TABLE_LIST *tables)
 
77
static uint64_t get_exact_record_count(TableList *tables)
78
78
{
79
79
  uint64_t count= 1;
80
 
  for (TABLE_LIST *tl= tables; tl; tl= tl->next_leaf)
 
80
  for (TableList *tl= tables; tl; tl= tl->next_leaf)
81
81
  {
82
82
    ha_rows tmp= tl->table->file->records();
83
83
    if ((tmp == HA_POS_ERROR))
109
109
    HA_ERR_... if a deadlock or a lock wait timeout happens, for example
110
110
*/
111
111
 
112
 
int opt_sum_query(TABLE_LIST *tables, List<Item> &all_fields,COND *conds)
 
112
int opt_sum_query(TableList *tables, List<Item> &all_fields,COND *conds)
113
113
{
114
114
  List_iterator_fast<Item> it(all_fields);
115
115
  int const_result= 1;
128
128
    Analyze outer join dependencies, and, if possible, compute the number
129
129
    of returned rows.
130
130
  */
131
 
  for (TABLE_LIST *tl= tables; tl; tl= tl->next_leaf)
 
131
  for (TableList *tl= tables; tl; tl= tl->next_leaf)
132
132
  {
133
 
    TABLE_LIST *embedded;
 
133
    TableList *embedded;
134
134
    for (embedded= tl ; embedded; embedded= embedded->embedding)
135
135
    {
136
136
      if (embedded->on_expr)