Merge mysql-5.1 to mysql-5.5.
This commit is contained in:
commit
2c3baab8f8
@ -4847,12 +4847,16 @@ row_search_autoinc_read_column(
|
||||
|
||||
rec_offs_init(offsets_);
|
||||
|
||||
offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap);
|
||||
offsets = rec_get_offsets(rec, index, offsets, col_no + 1, &heap);
|
||||
|
||||
if (rec_offs_nth_sql_null(offsets, col_no)) {
|
||||
/* There is no non-NULL value in the auto-increment column. */
|
||||
value = 0;
|
||||
goto func_exit;
|
||||
}
|
||||
|
||||
data = rec_get_nth_field(rec, offsets, col_no, &len);
|
||||
|
||||
ut_a(len != UNIV_SQL_NULL);
|
||||
|
||||
switch (mtype) {
|
||||
case DATA_INT:
|
||||
ut_a(len <= sizeof value);
|
||||
@ -4873,14 +4877,15 @@ row_search_autoinc_read_column(
|
||||
ut_error;
|
||||
}
|
||||
|
||||
if (UNIV_LIKELY_NULL(heap)) {
|
||||
mem_heap_free(heap);
|
||||
}
|
||||
|
||||
if (!unsigned_type && (ib_int64_t) value < 0) {
|
||||
value = 0;
|
||||
}
|
||||
|
||||
func_exit:
|
||||
if (UNIV_LIKELY_NULL(heap)) {
|
||||
mem_heap_free(heap);
|
||||
}
|
||||
|
||||
return(value);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user