diff --git a/storage/innobase/row/row0row.cc b/storage/innobase/row/row0row.cc index f08d33a06a0..c44055072f4 100644 --- a/storage/innobase/row/row0row.cc +++ b/storage/innobase/row/row0row.cc @@ -904,17 +904,16 @@ or 2) the field is null. @return the integer value read from the field, 0 for negative signed int or NULL field */ uint64_t row_parse_int_from_field(const dfield_t *field) { + if (dfield_is_null(field)) { + return (0); + } const dtype_t *dtype = dfield_get_type(field); ulint len = dfield_get_len(field); const byte *data = static_cast(dfield_get_data(field)); ulint mtype = dtype_get_mtype(dtype); bool unsigned_type = dtype->prtype & DATA_UNSIGNED; - if (dfield_is_null(field)) { - return (0); - } else { - return (row_parse_int(data, len, mtype, unsigned_type)); - } + return (row_parse_int(data, len, mtype, unsigned_type)); } /** Read the autoinc counter from the clustered index row.