~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field_iterator.cc

  • Committer: Lee Bieber
  • Date: 2011-03-29 22:31:41 UTC
  • mfrom: (2257.1.3 build)
  • Revision ID: kalebral@gmail.com-20110329223141-yxc22h3l2he58sk0
Merge Andrew - 743842: Build failure using GCC 4.6
Merge Stewart - 738022: CachedDirectory silently fails to add entries if stat() fails
Merge Olaf - Common fwd: add copyright, add more declaration

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <config.h>
21
21
#include <drizzled/field_iterator.h>
22
22
#include <drizzled/table_list.h>
23
23
#include <drizzled/session.h>
 
24
#include <drizzled/sql_lex.h>
24
25
#include <drizzled/table.h>
25
26
 
26
27
namespace drizzled
46
47
 
47
48
Item *Field_iterator_table::create_item(Session *session)
48
49
{
49
 
  Select_Lex *select= session->lex->current_select;
50
 
 
51
 
  Item_field *item= new Item_field(session, &select->context, *ptr);
52
 
 
53
 
  return item;
 
50
  return new Item_field(session, &session->lex().current_select->context, *ptr);
54
51
}
55
52
 
56
53
 
57
54
void Field_iterator_natural_join::set(TableList *table_ref)
58
55
{
59
56
  assert(table_ref->join_columns);
60
 
  column_ref_it.init(*(table_ref->join_columns));
 
57
  column_ref_it= table_ref->join_columns->begin();
61
58
  cur_column_ref= column_ref_it++;
62
59
}
63
60
 
242
239
      must take care to mark when all fields are created/added.
243
240
    */
244
241
    if (!parent_table_ref &&
245
 
        add_table_ref->join_columns->elements == field_count)
 
242
        add_table_ref->join_columns->size() == field_count)
246
243
      add_table_ref->is_join_columns_complete= true;
247
244
  }
248
245