~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/cmpfunc.h

  • Committer: Brian Aker
  • Date: 2010-12-07 21:33:25 UTC
  • mto: This revision was merged to the branch mainline in revision 1987.
  • Revision ID: brian@tangent.org-20101207213325-u6vbc107dpe0c7ld
Added compatible REGEX for Drizzle to MySQL's syntax.

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, Inc.
 
4
 *  Copyright (C) 2008 Sun Microsystems
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
1150
1150
  Item_result cmp_type;
1151
1151
  DTCollation cmp_collation;
1152
1152
  enum_field_types cached_field_type;
1153
 
  cmp_item *cmp_items[DECIMAL_RESULT+1]; /* For all result types */
 
1153
  cmp_item *cmp_items[5]; /* For all result types */
1154
1154
  cmp_item *case_item;
1155
1155
public:
1156
1156
  Item_func_case(List<Item> &list, Item *first_expr_arg, Item *else_expr_arg)
1235
1235
  uint32_t decimal_precision() const { return 1; }
1236
1236
  void cleanup()
1237
1237
  {
 
1238
    uint32_t i;
1238
1239
    Item_int_func::cleanup();
1239
1240
    delete array;
1240
1241
    array= 0;
1241
 
    for (int i= STRING_RESULT; i <= DECIMAL_RESULT; i++)
 
1242
    for (i= 0; i <= (uint32_t)DECIMAL_RESULT + 1; i++)
1242
1243
    {
1243
1244
      delete cmp_items[i];
1244
1245
      cmp_items[i]= 0;