1888
Item_decimal::Item_decimal(const uchar *bin, int precision, int scale)
1888
Item_decimal::Item_decimal(const unsigned char *bin, int precision, int scale)
1890
1890
binary2my_decimal(E_DEC_FATAL_ERROR, bin,
1891
1891
&decimal_value, precision, scale);
4080
4080
The field functions defines a field to be not null if null_ptr is not 0
4082
uchar *null_ptr= maybe_null ? (uchar*) "" : 0;
4082
unsigned char *null_ptr= maybe_null ? (unsigned char*) "" : 0;
4085
4085
switch (field_type()) {
4086
4086
case DRIZZLE_TYPE_NEWDECIMAL:
4087
field= new Field_new_decimal((uchar*) 0, max_length, null_ptr, 0,
4087
field= new Field_new_decimal((unsigned char*) 0, max_length, null_ptr, 0,
4088
4088
Field::NONE, name, decimals, 0,
4089
4089
unsigned_flag);
4091
4091
case DRIZZLE_TYPE_TINY:
4092
field= new Field_tiny((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
4092
field= new Field_tiny((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4093
4093
name, 0, unsigned_flag);
4095
4095
case DRIZZLE_TYPE_LONG:
4096
field= new Field_long((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
4096
field= new Field_long((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4097
4097
name, 0, unsigned_flag);
4099
4099
case DRIZZLE_TYPE_LONGLONG:
4100
field= new Field_int64_t((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
4100
field= new Field_int64_t((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4101
4101
name, 0, unsigned_flag);
4103
4103
case DRIZZLE_TYPE_DOUBLE:
4104
field= new Field_double((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
4104
field= new Field_double((unsigned char*) 0, max_length, null_ptr, 0, Field::NONE,
4105
4105
name, decimals, 0, unsigned_flag);
4107
4107
case DRIZZLE_TYPE_NULL:
4108
field= new Field_null((uchar*) 0, max_length, Field::NONE,
4108
field= new Field_null((unsigned char*) 0, max_length, Field::NONE,
4109
4109
name, &my_charset_bin);
4111
4111
case DRIZZLE_TYPE_NEWDATE:
6375
6375
The field functions defines a field to be not null if null_ptr is not 0
6377
uchar *null_ptr= maybe_null ? (uchar*) "" : 0;
6377
unsigned char *null_ptr= maybe_null ? (unsigned char*) "" : 0;
6380
6380
switch (fld_type) {
6381
6381
case DRIZZLE_TYPE_ENUM:
6382
6382
assert(enum_set_typelib);
6383
field= new Field_enum((uchar *) 0, max_length, null_ptr, 0,
6383
field= new Field_enum((unsigned char *) 0, max_length, null_ptr, 0,
6384
6384
Field::NONE, name,
6385
6385
get_enum_pack_length(enum_set_typelib->count),
6386
6386
enum_set_typelib, collation.collation);