diff options
author | Marko Mäkelä <marko.makela@oracle.com> | 2011-09-01 21:48:04 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@oracle.com> | 2011-09-01 21:48:04 +0300 |
commit | 247ada63afcceaaea93e2565f06f62356ccb04ac (patch) | |
tree | f23783cbf008becd34d3bcef7c41fcb6a9446981 /include | |
parent | 6e3cee780cfacd9f812fb30d6cb5766e750e11f2 (diff) | |
download | mariadb-git-247ada63afcceaaea93e2565f06f62356ccb04ac.tar.gz |
Bug#12547647 UPDATE LOGGING COULD EXCEED LOG PAGE SIZE
This fix was accidentally pushed to mysql-5.1 after the 5.1.59 clone-off in
bzr revision id marko.makela@oracle.com-20110829081642-z0w992a0mrc62s6w
with the fix of Bug#12704861 Corruption after a crash during BLOB update
but not merged to mysql-5.5 and upwards.
In the Barracuda formats, the clustered index record no longer
contains a prefix of off-page columns. Because of this, the undo log
must contain these prefixes, so that purge and multi-versioning will
continue to work. However, this also means that an undo log record can
become too big to fit in an undo log page. (It is a limitation of the
undo log that undo records cannot span across multiple pages.)
In case the checks for undo log size fail when CREATE TABLE or CREATE
INDEX is executed, we need a fallback that blocks a modification
operation when the undo log record would exceed the maximum size.
trx_undo_free_last_page_func(): Renamed from trx_undo_free_page_in_rollback().
Define the trx_t parameter only in debug builds.
trx_undo_free_last_page(): Wrapper for trx_undo_free_last_page_func().
Pass the trx_t parameter only in debug builds.
trx_undo_truncate_end_func(): Renamed from trx_undo_truncate_end().
Define the trx_t parameter only in debug builds. Rewrite a for(;;) loop
as a while loop for clarity.
trx_undo_truncate_end(): Wrapper for from trx_undo_truncate_end_func().
Pass the trx_t parameter only in debug builds.
trx_undo_erase_page_end(): Return TRUE if the page was non-empty
to begin with. Refuse to erase empty pages.
trx_undo_report_row_operation(): If the page for which the undo log
was too big was empty, free the undo page and return DB_TOO_BIG_RECORD.
rb:749 approved by Inaam Rana
Diffstat (limited to 'include')
-rw-r--r-- | include/my_base.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/my_base.h b/include/my_base.h index cc02b0080d9..d9f08a3c467 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -448,7 +448,8 @@ enum ha_base_keytype { #define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */ #define HA_ERR_INDEX_COL_TOO_LONG 178 /* Index column length exceeds limit */ #define HA_ERR_INDEX_CORRUPT 179 /* Index corrupted */ -#define HA_ERR_LAST 179 /* Copy of last error nr */ +#define HA_ERR_UNDO_REC_TOO_BIG 180 /* Undo log record too big */ +#define HA_ERR_LAST 180 /* Copy of last error nr */ /* Number of different errors */ #define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1) |