~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/functions/locate.cc

  • Committer: Monty Taylor
  • Date: 2008-11-16 20:15:33 UTC
  • mto: (584.1.9 devel)
  • mto: This revision was merged to the branch mainline in revision 589.
  • Revision ID: monty@inaugust.com-20081116201533-d0f19s1bk1h95iyw
Removed a big bank of includes from item.h.

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"
21
 
 
22
 
#include <drizzled/function/locate.h>
23
 
 
24
 
namespace drizzled
25
 
{
 
20
#include <drizzled/server_includes.h>
 
21
#include CSTDINT_H
 
22
#include <drizzled/functions/locate.h>
26
23
 
27
24
void Item_func_locate::fix_length_and_dec()
28
25
{
38
35
  if (!a || !b)
39
36
  {
40
37
    null_value=1;
41
 
    return 0;
 
38
    return 0; /* purecov: inspected */
42
39
  }
43
40
  null_value=0;
44
41
  /* must be int64_t to avoid truncation */
64
61
 
65
62
  if (!cmp_collation.collation->coll->instr(cmp_collation.collation,
66
63
                                            a->ptr()+start,
67
 
                                            (uint32_t) (a->length()-start),
 
64
                                            (uint) (a->length()-start),
68
65
                                            b->ptr(), b->length(),
69
66
                                            &match, 1))
70
67
    return 0;
86
83
  str->append(')');
87
84
}
88
85
 
89
 
} /* namespace drizzled */