switch (packlength) {
case 1:
return ((int64_t) ptr[0]) + 1; /* SQL is from 1, we store from 0 */
case 2:
{
uint16_t tmp;
#ifdef WORDS_BIGENDIAN
if (getTable()->s->db_low_byte_first)
tmp=sint2korr(ptr);
else
#endif
shortget(tmp,ptr);
return ((int64_t) tmp) + 1; /* SQL is from 1, we store from 0 */
}
default:
assert(packlength <= 2);
}
return 0; // impossible
}
I think the correct fix for this probably is to rework the null handling in transaction_services.cc (again) from:
This looks to be happening now and not before, because of the enum rework in val_int() adding the 1 to the return value.
int64_t Field_enum: :val_int( void) COLUMN_ MARKED_ FOR_READ;
{
ASSERT_
switch (packlength) { )->s->db_ low_byte_ first) sint2korr( ptr); tmp,ptr) ; packlength <= 2);
case 1:
return ((int64_t) ptr[0]) + 1; /* SQL is from 1, we store from 0 */
case 2:
{
uint16_t tmp;
#ifdef WORDS_BIGENDIAN
if (getTable(
tmp=
else
#endif
shortget(
return ((int64_t) tmp) + 1; /* SQL is from 1, we store from 0 */
}
default:
assert(
}
return 0; // impossible
}
I think the correct fix for this probably is to rework the null handling in transaction_ services. cc (again) from:
while ((current_field= *table_fields++) != NULL) field-> val_str( string_ value); >add_is_ null(current_ field-> is_null( )); >add_insert_ value(string_ value-> c_ptr() , string_ value-> length( )); value-> free();
{
string_value= current_
record-
record-
string_
}
to:
while ((current_field= *table_fields++) != NULL) field-> is_null( )) >add_is_ null(true) ; >add_insert_ value(NULL, 0); field-> val_str( string_ value); >add_is_ null(false) ; >add_insert_ value(string_ value-> c_ptr() , string_ value-> length( )); value-> free();
{
if (current_
{
record-
record-
}
else
{
string_value= current_
record-
record-
string_
}
}