Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#34558510 : undetectable problems after upgrade from 8.0.28, crash…
… & corruption Background : When an upgraded table has INSTANT ADD columns all the new rows inserted will have all the instant default materialized and row version 0. When a row in above table is updated, if row is inserted before upgrade, we don't materialize instant columns. Reason for this is becuase earlier, INSTANT ADD column is allowed even if after adding that column, max size of a possible row may cross the row_size_limit. This creates an issue with the UPDATE/ROLLBACK. Let's say during UPDATE all INSTANT ADD COLS are materialized, updated row is fitting the row_size_limit. But if a rollback is done and INSTANT columns are kept materialised row may exceed row_size_limit. Thus ROLLBACK will fail. So for these rows, we keep the old behavior. NOTE [1] : Any new row inserted after upgrade will have all INSTANT columns materialized and have version=0. NOTE [2] : In new implementation an INSTANT ADD will fail if max possible size of a row crosses row_size_limit. So new rows with materialized INSTANT columns will always be witin row_size_limit. Issue : The check which decides if row is to be materialized or not wasn't sufficient and was considering NOTE [1] above wrongly to not to be materlized. NOTE : This issue is not caught (may be) because this "not considering a new row not to be materilized" impacts UPDATE only if last (trailing) INSTANT ADD column value is (or being changed to) it's instant default value Fix : Fix above check to consider NOTE [1]. Change-Id: Idd2580e16e4c62cdab33fde3ca70634a84ceab09
- Loading branch information
Mayank Prasad
committed
Sep 23, 2022
1 parent
9f05dac
commit 7b98304
Showing
4 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters