~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/default_value.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
 
22
22
#include <drizzled/error.h>
23
23
#include <drizzled/name_resolution_context.h>
24
24
#include <drizzled/table.h>
25
25
#include <drizzled/session.h>
26
 
#include <drizzled/current_session.h>
27
26
#include <drizzled/item/default_value.h>
28
27
 
29
28
namespace drizzled
79
78
}
80
79
 
81
80
 
82
 
void Item_default_value::print(String *str, enum_query_type query_type)
 
81
void Item_default_value::print(String *str)
83
82
{
84
83
  if (!arg)
85
84
  {
87
86
    return;
88
87
  }
89
88
  str->append(STRING_WITH_LEN("default("));
90
 
  arg->print(str, query_type);
 
89
  arg->print(str);
91
90
  str->append(')');
92
91
}
93
92
 
131
130
  Item *new_item= arg->transform(transformer, args);
132
131
  if (!new_item)
133
132
    return NULL;
134
 
 
135
 
  /*
136
 
    Session::change_item_tree() should be called only if the tree was
137
 
    really transformed, i.e. when a new item has been created.
138
 
    Otherwise we'll be allocating a lot of unnecessary memory for
139
 
    change records at each execution.
140
 
  */
141
 
  if (arg != new_item)
142
 
    current_session->change_item_tree(&arg, new_item);
 
133
  arg= new_item;
143
134
  return (this->*transformer)(args);
144
135
}
145
136