~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/item_buff.cc

  • Committer: Brian Aker
  • Date: 2008-07-14 16:24:25 UTC
  • Revision ID: brian@tangent.org-20080714162425-juw3vw221gs9kysh
Cleanup around intptr_t

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
  Buffers to save and compare item values
22
22
*/
23
23
 
24
 
#include <drizzled/server_includes.h>
 
24
#include "mysql_priv.h"
25
25
 
26
26
/**
27
27
  Create right type of Cached_item for an item.
63
63
*/
64
64
 
65
65
Cached_item_str::Cached_item_str(THD *thd, Item *arg)
66
 
  :item(arg), value(cmin(arg->max_length, (uint32_t)thd->variables.max_sort_length))
 
66
  :item(arg), value(min(arg->max_length, thd->variables.max_sort_length))
67
67
{}
68
68
 
69
69
bool Cached_item_str::cmp(void)
72
72
  bool tmp;
73
73
 
74
74
  if ((res=item->val_str(&tmp_value)))
75
 
    res->length(cmin(res->length(), value.alloced_length()));
 
75
    res->length(min(res->length(), value.alloced_length()));
76
76
 
77
77
  if (null_value != item->null_value)
78
78
  {