Commit 551288b
Aditya A
Bug#33691659 - ON DELETE CASCADE with generated column crashes in innobase_get_computed_value
ANALYSIS
========
1. A cascade delete from the parent table triggers delete
on the child table. Before a clustered index record is
deleted in the child table, a copy of row is built to
remove secondary index record, since the secondary index
is defined on the virtual column it is necessary to
materialize the virtual columns.
2. We were skipping this materialization which causes it
to fail on uninitialized template in
innobase_get_computed_value() when trying to remove
the secondary index rows defined on virtual column.
FIX
===
1. We must initialize virtual column template for
materializing virtual column if child table has
an index on a virtual column.
Change-Id: Ib2381d81aa96024ed395261650421f6318f380b81 parent 0ac1764 commit 551288b
1 file changed
+9
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1309 | 1309 | | |
1310 | 1310 | | |
1311 | 1311 | | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
1315 | 1320 | | |
1316 | 1321 | | |
| 1322 | + | |
1317 | 1323 | | |
1318 | 1324 | | |
1319 | 1325 | | |
| |||
0 commit comments