Commit 7713fe64 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge mysql-5.1 to mysql-5.5.

parents 60bdbc61 dd0610e1
......@@ -4847,11 +4847,15 @@ 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);
data = rec_get_nth_field(rec, offsets, col_no, &len);
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;
}
ut_a(len != UNIV_SQL_NULL);
data = rec_get_nth_field(rec, offsets, col_no, &len);
switch (mtype) {
case DATA_INT:
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment