diff options
Diffstat (limited to 'storage/innobase/include/row0upd.h')
-rw-r--r-- | storage/innobase/include/row0upd.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/storage/innobase/include/row0upd.h b/storage/innobase/include/row0upd.h index 677af76c561..a367ae7d3eb 100644 --- a/storage/innobase/include/row0upd.h +++ b/storage/innobase/include/row0upd.h @@ -429,6 +429,28 @@ struct upd_t{ fields[n_fields++] = field; } + void remove_element(ulint i) + { + ut_ad(n_fields > 0); + ut_ad(i < n_fields); + while (i < n_fields - 1) { + fields[i] = fields[i + 1]; + i++; + } + n_fields--; + } + + bool remove(const ulint field_no) + { + for (ulint i = 0; i < n_fields; ++i) { + if (field_no == fields[i].field_no) { + remove_element(i); + return true; + } + } + return false; + } + /** Determine if the given field_no is modified. @return true if modified, false otherwise. */ bool is_modified(const ulint field_no) const |