~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/make_set.h

Reverted 1103

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2008 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
5
5
 *
6
6
 *  This program is free software; you can redistribute it and/or modify
7
7
 *  it under the terms of the GNU General Public License as published by
22
22
 
23
23
#include <drizzled/function/str/strfunc.h>
24
24
 
25
 
namespace drizzled
26
 
{
27
 
 
28
25
class Item_func_make_set :public Item_str_func
29
26
{
30
 
  Session &session;
31
27
  Item *item;
32
28
  String tmp_str;
33
29
 
34
30
public:
35
31
  using Item::split_sum_func;
36
 
  Item_func_make_set(Session &session_arg, Item *a, List<Item> &list) :
37
 
    Item_str_func(list), 
38
 
    session(session_arg),
39
 
    item(a) {}
 
32
  Item_func_make_set(Item *a,List<Item> &list) :Item_str_func(list),item(a) {}
40
33
  String *val_str(String *str);
41
 
  bool fix_fields(Session *session_arg, Item **ref)
 
34
  bool fix_fields(Session *session, Item **ref)
42
35
  {
43
36
    assert(fixed == 0);
44
 
    return ((!item->fixed && item->fix_fields(session_arg, &item)) ||
 
37
    return ((!item->fixed && item->fix_fields(session, &item)) ||
45
38
            item->check_cols(1) ||
46
 
            Item_func::fix_fields(session_arg, ref));
 
39
            Item_func::fix_fields(session, ref));
47
40
  }
48
 
  void split_sum_func(Session *session_arg, Item **ref_pointer_array, List<Item> &fields);
 
41
  void split_sum_func(Session *session, Item **ref_pointer_array, List<Item> &fields);
49
42
  void fix_length_and_dec();
50
43
  void update_used_tables();
51
44
  const char *func_name() const { return "make_set"; }
59
52
  virtual void print(String *str, enum_query_type query_type);
60
53
};
61
54
 
62
 
} /* namespace drizzled */
63
 
 
64
55
#endif /* DRIZZLED_FUNCTION_STR_MAKE_SET_H */