Commit ccee665
committed
MDEV-38734: Virtual columns wrongly included in binlog_row_image=MINIMAL
The original symptom of this was an assertion 'marked_for_read()' failing in
RBR with unique blobs and binlog_row_image=MINIMAL. The problem was that the
hidden DB_ROW_HASH_1 virtual column was included in the after-image of the
update, but the underlying blob column was not being updated, so it was not
in the read_set/write_set.
It seems clearly wrong to include the DB_ROW_HASH_1 in the after-image when
the underlying blob isn't even being updated. The cause of this is the
following commit:
Author: Monty <[email protected]>
Date: Wed May 23 22:42:29 2018 +0300
MDEV-15243 Crash with virtual fields and row based binary logging
That patch removed a check for if the underlying fields of a virtual column
were being updated, and just added them unconditionally. This seems wrong.
So revert that part of the commit, restoring the logic to only add a virtual
column if any underlying field is actually in the write_set.
Also fix a typo in that commit where a code reformat accidentally reversed a
condition.
Also fix an assertion when InnoDB goes to update secondary indexes: If any
part of the primary key is being updated, then add all virtual columns that
are part of secondary indexes to the read_set.
Signed-off-by: Kristian Nielsen <[email protected]>1 parent ec58c02 commit ccee665
File tree
4 files changed
+84
-8
lines changed- mysql-test/suite/rpl
- r
- t
- sql
- storage/innobase/handler
4 files changed
+84
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8186 | 8186 | | |
8187 | 8187 | | |
8188 | 8188 | | |
8189 | | - | |
8190 | | - | |
| 8189 | + | |
8191 | 8190 | | |
8192 | 8191 | | |
8193 | 8192 | | |
| |||
8202 | 8201 | | |
8203 | 8202 | | |
8204 | 8203 | | |
8205 | | - | |
8206 | | - | |
8207 | | - | |
| 8204 | + | |
| 8205 | + | |
| 8206 | + | |
| 8207 | + | |
| 8208 | + | |
| 8209 | + | |
| 8210 | + | |
| 8211 | + | |
| 8212 | + | |
| 8213 | + | |
| 8214 | + | |
| 8215 | + | |
| 8216 | + | |
| 8217 | + | |
| 8218 | + | |
| 8219 | + | |
| 8220 | + | |
| 8221 | + | |
| 8222 | + | |
| 8223 | + | |
| 8224 | + | |
| 8225 | + | |
| 8226 | + | |
8208 | 8227 | | |
8209 | 8228 | | |
8210 | 8229 | | |
| |||
9267 | 9286 | | |
9268 | 9287 | | |
9269 | 9288 | | |
9270 | | - | |
| 9289 | + | |
9271 | 9290 | | |
9272 | 9291 | | |
9273 | 9292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5046 | 5046 | | |
5047 | 5047 | | |
5048 | 5048 | | |
| 5049 | + | |
5049 | 5050 | | |
5050 | 5051 | | |
5051 | 5052 | | |
5052 | 5053 | | |
5053 | 5054 | | |
5054 | 5055 | | |
5055 | 5056 | | |
5056 | | - | |
| 5057 | + | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
| 5063 | + | |
| 5064 | + | |
| 5065 | + | |
| 5066 | + | |
| 5067 | + | |
| 5068 | + | |
| 5069 | + | |
| 5070 | + | |
| 5071 | + | |
| 5072 | + | |
| 5073 | + | |
| 5074 | + | |
| 5075 | + | |
5057 | 5076 | | |
5058 | 5077 | | |
5059 | 5078 | | |
| |||
5064 | 5083 | | |
5065 | 5084 | | |
5066 | 5085 | | |
5067 | | - | |
| 5086 | + | |
5068 | 5087 | | |
5069 | 5088 | | |
5070 | 5089 | | |
| |||
0 commit comments