summaryrefslogtreecommitdiff
path: root/storage/xtradb/trx/trx0rec.c
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2011-05-10 18:17:43 +0300
committerMichael Widenius <monty@askmonty.org>2011-05-10 18:17:43 +0300
commitf34be1893892745b5b1a7a099eab4ad8e9ac8641 (patch)
treed7eed818fd8b648e5eabe0dbad53e61665d8dc37 /storage/xtradb/trx/trx0rec.c
parente843297d128b165125d17aab8958f7ca91808923 (diff)
parent8882d71f3f1dd03ef98d072def39b29e6a03f5b8 (diff)
downloadmariadb-git-f34be1893892745b5b1a7a099eab4ad8e9ac8641.tar.gz
Merge with MariaDB 5.2
Diffstat (limited to 'storage/xtradb/trx/trx0rec.c')
-rw-r--r--storage/xtradb/trx/trx0rec.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/storage/xtradb/trx/trx0rec.c b/storage/xtradb/trx/trx0rec.c
index f50e10ed756..71629f01d73 100644
--- a/storage/xtradb/trx/trx0rec.c
+++ b/storage/xtradb/trx/trx0rec.c
@@ -665,14 +665,27 @@ trx_undo_page_report_modify(
/* Save to the undo log the old values of the columns to be updated. */
if (update) {
+ ulint extended = 0;
+
if (trx_undo_left(undo_page, ptr) < 5) {
return(0);
}
- ptr += mach_write_compressed(ptr, upd_get_n_fields(update));
+ if (srv_use_sys_stats_table
+ && index == UT_LIST_GET_FIRST(dict_sys->sys_stats->indexes)) {
+ for (i = 0; i < upd_get_n_fields(update); i++) {
+ ulint pos = upd_get_nth_field(update, i)->field_no;
+
+ if (pos >= rec_offs_n_fields(offsets)) {
+ extended++;
+ }
+ }
+ }
+
+ ptr += mach_write_compressed(ptr, upd_get_n_fields(update) - extended);
- for (i = 0; i < upd_get_n_fields(update); i++) {
+ for (i = 0; i < upd_get_n_fields(update) - extended; i++) {
ulint pos = upd_get_nth_field(update, i)->field_no;