~thomir-deactivatedaccount/drizzle/drizzle-fix-bug653747

« back to all changes in this revision

Viewing changes to drizzled/item/sum.cc

  • Committer: Brian Aker
  • Date: 2010-10-10 02:07:52 UTC
  • mfrom: (1827.2.3 staging)
  • Revision ID: brian@tangent.org-20101010020752-ktv73isay5dxtvp3
Merge in switch on table_share_instance inheritance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
521
521
        convert_blob_length > Field_varstring::MAX_SIZE ||
522
522
        !convert_blob_length)
523
523
      return make_string_field(table);
524
 
 
525
 
    table->setVariableWidth();
526
524
    field= new Field_varstring(convert_blob_length, maybe_null,
527
 
                               name, collation.collation);
 
525
                               name, table->getMutableShare(), collation.collation);
528
526
    break;
529
527
  case DECIMAL_RESULT:
530
528
    field= new Field_decimal(max_length, maybe_null, name,
1257
1255
      The easiest way is to do this is to store both value in a string
1258
1256
      and unpack on access.
1259
1257
    */
1260
 
    table->setVariableWidth();
1261
1258
    field= new Field_varstring(((hybrid_type == DECIMAL_RESULT) ?
1262
1259
                                dec_bin_size : sizeof(double)) + sizeof(int64_t),
1263
 
                               0, name, &my_charset_bin);
 
1260
                               0, name, table->getMutableShare(), &my_charset_bin);
1264
1261
  }
1265
1262
  else if (hybrid_type == DECIMAL_RESULT)
1266
1263
    field= new Field_decimal(max_length, maybe_null, name,
1474
1471
      The easiest way is to do this is to store both value in a string
1475
1472
      and unpack on access.
1476
1473
    */
1477
 
    table->setVariableWidth();
1478
 
    field= new Field_varstring(sizeof(double)*2 + sizeof(int64_t), 0, name, &my_charset_bin);
 
1474
    field= new Field_varstring(sizeof(double)*2 + sizeof(int64_t), 0, name, table->getMutableShare(), &my_charset_bin);
1479
1475
  }
1480
1476
  else
1481
1477
    field= new Field_double(max_length, maybe_null, name, decimals, true);