~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Olaf van der Spek
  • Date: 2011-06-23 11:44:30 UTC
  • mto: This revision was merged to the branch mainline in revision 2348.
  • Revision ID: olafvdspek@gmail.com-20110623114430-no355yypk4y3icqb
Refactor

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
 
4
 *  Copyright (C) 2008 Sun Microsystems, Inc.
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
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
25
namespace drizzled
26
26
{
39
39
 
40
40
void Item_func_set_collation::fix_length_and_dec()
41
41
{
42
 
  const CHARSET_INFO *set_collation;
 
42
  const charset_info_st *set_collation;
43
43
  const char *colname;
44
44
  String tmp, *str= args[1]->val_str(&tmp);
45
45
  colname= str->c_ptr();
85
85
  return 1;
86
86
}
87
87
 
88
 
void Item_func_set_collation::print(String *str, enum_query_type query_type)
 
88
void Item_func_set_collation::print(String *str)
89
89
{
90
90
  str->append('(');
91
 
  args[0]->print(str, query_type);
 
91
  args[0]->print(str);
92
92
  str->append(STRING_WITH_LEN(" collate "));
93
93
  assert(args[1]->basic_const_item() &&
94
94
              args[1]->type() == Item::STRING_ITEM);