You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Virtual generated column ("vgcol") c13 depends on vgcol c11 which
depends on base columns c8 and c9. A query reads c13.
Thus c11, and thus c8, c9, are added to read_set.
An index-only scan on c13 is used. It reads only c13
from the engine.
update_generated_read_fields() sees that c11 is in read_set,
and is not in the index, so it calculates it, based on an uninitialized
value of c8, c9; DATE/TIME functions don't support really abnormal
values of arguments, and this causes problems. If using INT columns
and simpler generation expressions, we still get Valgrind warnings.
Fix: if the Optimizer said "index-only scan" (table->keyread=true)
it means it knows that the index provides everything; so, if keyread=true
don't try to calculate anything.
Note that this logic may have to be reconsidered when we fix
Bug 21815348, see the @todo in code.
(cherry picked from commit 283aa2f6c8eaf20ab5be19f04e900d17571db4f6)
Conflicts:
mysql-test/suite/gcol/r/gcol_bugfixes.result
mysql-test/suite/gcol/t/gcol_bugfixes.test
0 commit comments