~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item.cc

Fixed bashism.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1048
1048
  case INT_RESULT:     
1049
1049
    return DRIZZLE_TYPE_LONGLONG;
1050
1050
  case DECIMAL_RESULT: 
1051
 
    return DRIZZLE_TYPE_DECIMAL;
 
1051
    return DRIZZLE_TYPE_NEWDECIMAL;
1052
1052
  case REAL_RESULT:    
1053
1053
    return DRIZZLE_TYPE_DOUBLE;
1054
1054
  case ROW_RESULT:
1152
1152
  Field *field;
1153
1153
 
1154
1154
  switch (field_type()) {
1155
 
  case DRIZZLE_TYPE_DECIMAL:
1156
 
    field= new Field_decimal((unsigned char*) 0,
 
1155
  case DRIZZLE_TYPE_NEWDECIMAL:
 
1156
    field= new Field_new_decimal((unsigned char*) 0,
1157
1157
                                 max_length,
1158
1158
                                 null_ptr,
1159
1159
                                 0,
1282
1282
  case DRIZZLE_TYPE_ENUM:
1283
1283
  case DRIZZLE_TYPE_BLOB:
1284
1284
  case DRIZZLE_TYPE_VARCHAR:
1285
 
  case DRIZZLE_TYPE_DECIMAL:
 
1285
  case DRIZZLE_TYPE_NEWDECIMAL:
1286
1286
  {
1287
1287
    String *res;
1288
1288
    if ((res=val_str(buffer)))
1586
1586
        len-= item->decimals - dec;             // corrected value fits
1587
1587
    }
1588
1588
 
1589
 
    new_field= new Field_decimal(len,
1590
 
                                 maybe_null,
1591
 
                                 item->name,
1592
 
                                 dec,
1593
 
                                 item->unsigned_flag);
 
1589
    new_field= new Field_new_decimal(len,
 
1590
                                     maybe_null,
 
1591
                                     item->name,
 
1592
                                     dec,
 
1593
                                     item->unsigned_flag);
1594
1594
    break;
1595
1595
  }
1596
1596
  case ROW_RESULT: