~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item_sum.cc

  • Committer: Brian Aker
  • Date: 2008-07-31 19:40:12 UTC
  • Revision ID: brian@tangent.org-20080731194012-oat11oy5vombrb1b
First pass of CHAR removal.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1224
1224
      The easiest way is to do this is to store both value in a string
1225
1225
      and unpack on access.
1226
1226
    */
1227
 
    field= new Field_string(((hybrid_type == DECIMAL_RESULT) ?
1228
 
                             dec_bin_size : sizeof(double)) + sizeof(int64_t),
1229
 
                            0, name, &my_charset_bin);
 
1227
    field= new Field_varstring(((hybrid_type == DECIMAL_RESULT) ?
 
1228
                                dec_bin_size : sizeof(double)) + sizeof(int64_t),
 
1229
                               0, name, table->s, &my_charset_bin);
1230
1230
  }
1231
1231
  else if (hybrid_type == DECIMAL_RESULT)
1232
1232
    field= new Field_new_decimal(max_length, maybe_null, name,
1434
1434
      The easiest way is to do this is to store both value in a string
1435
1435
      and unpack on access.
1436
1436
    */
1437
 
    field= new Field_string(sizeof(double)*2 + sizeof(int64_t), 0, name, &my_charset_bin);
 
1437
    field= new Field_varstring(sizeof(double)*2 + sizeof(int64_t), 0, name, table->s, &my_charset_bin);
1438
1438
  }
1439
1439
  else
1440
1440
    field= new Field_double(max_length, maybe_null, name, decimals, true);
2582
2582
      Field *f= *field;
2583
2583
      enum enum_field_types f_type= f->type();
2584
2584
      tree_key_length+= f->pack_length();
2585
 
      if ((f_type == DRIZZLE_TYPE_VARCHAR) || (!f->binary() && (f_type == DRIZZLE_TYPE_STRING)))
 
2585
      if (f_type == DRIZZLE_TYPE_VARCHAR)
2586
2586
      {
2587
2587
        all_binary= false;
2588
2588
        break;