~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2009-10-06 19:37:52 UTC
  • mto: This revision was merged to the branch mainline in revision 1184.
  • Revision ID: mordred@inaugust.com-20091006193752-4dx2c8u35j4em79g
Removed more server_includes.h from headers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
 
17
17
/**
25
25
    (This shouldn't be needed)
26
26
*/
27
27
 
28
 
#include "config.h"
 
28
#include <drizzled/server_includes.h>
 
29
#include <mysys/sha1.h>
29
30
#include <zlib.h>
30
31
#include <drizzled/query_id.h>
 
32
#include <uuid/uuid.h>
31
33
#include <drizzled/error.h>
32
34
#include <drizzled/function/str/strfunc.h>
33
35
 
34
36
// For soundex_map
35
 
#include "drizzled/internal/my_static.h"
 
37
#include <mysys/my_static.h>
36
38
 
37
39
using namespace std;
38
40
 
39
 
namespace drizzled
40
 
{
41
 
 
42
41
Item_str_func::~Item_str_func() {}
43
42
 
44
43
bool Item_str_func::fix_fields(Session *session, Item **ref)
53
52
}
54
53
 
55
54
 
56
 
type::Decimal *Item_str_func::val_decimal(type::Decimal *decimal_value)
 
55
my_decimal *Item_str_func::val_decimal(my_decimal *decimal_value)
57
56
{
58
57
  assert(fixed == 1);
59
58
  char buff[64];
60
59
  String *res, tmp(buff,sizeof(buff), &my_charset_bin);
61
60
  res= val_str(&tmp);
62
 
  if (not res)
 
61
  if (!res)
63
62
    return 0;
64
 
 
65
 
  (void)decimal_value->store(E_DEC_FATAL_ERROR, (char*) res->ptr(), res->length(), res->charset());
66
 
 
 
63
  (void)str2my_decimal(E_DEC_FATAL_ERROR, (char*) res->ptr(),
 
64
                       res->length(), res->charset(), decimal_value);
67
65
  return decimal_value;
68
66
}
69
67
 
84
82
{
85
83
  assert(fixed == 1);
86
84
  int err;
87
 
  char buff[DECIMAL_LONGLONG_DIGITS];
 
85
  char buff[22];
88
86
  String *res, tmp(buff,sizeof(buff), &my_charset_bin);
89
87
  res= val_str(&tmp);
90
88
  return (res ?
106
104
  }
107
105
}
108
106
 
109
 
DRIZZLED_API String my_empty_string("",default_charset_info);
 
107
String my_empty_string("",default_charset_info);
110
108
 
111
 
} /* namespace drizzled */