~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/default_value.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:26:39 UTC
  • mfrom: (2157.2.2 give-in-to-pkg-config)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172639-nhy7i72sfhoq13ms
Merged in pkg-config fixes.

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