~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/str/set_collation.cc

Merge Monty - Updates to pandora-build to support features of gcc 4.5.

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/function/str/set_collation.h>
22
22
#include <drizzled/error.h>
23
 
#include <drizzled/charset.h>
 
23
#include "drizzled/charset.h"
24
24
 
25
 
namespace drizzled {
 
25
namespace drizzled
 
26
{
26
27
 
27
28
static const char *binary_keyword= "BINARY";
28
29
 
38
39
 
39
40
void Item_func_set_collation::fix_length_and_dec()
40
41
{
41
 
  const charset_info_st *set_collation;
 
42
  const CHARSET_INFO *set_collation;
42
43
  const char *colname;
43
44
  String tmp, *str= args[1]->val_str(&tmp);
44
45
  colname= str->c_ptr();
84
85
  return 1;
85
86
}
86
87
 
87
 
void Item_func_set_collation::print(String *str)
 
88
void Item_func_set_collation::print(String *str, enum_query_type query_type)
88
89
{
89
90
  str->append('(');
90
 
  args[0]->print(str);
 
91
  args[0]->print(str, query_type);
91
92
  str->append(STRING_WITH_LEN(" collate "));
92
 
  assert(args[1]->basic_const_item() && args[1]->type() == Item::STRING_ITEM);
93
 
  args[1]->str_value.print(*str);
 
93
  assert(args[1]->basic_const_item() &&
 
94
              args[1]->type() == Item::STRING_ITEM);
 
95
  args[1]->str_value.print(str);
94
96
  str->append(')');
95
97
}
96
98