Commit 7c12b77
Guilhem Bichot
Bug#21833760 CALC_DAYNR: ASSERTION `DELSUM+(INT) Y/4-TEMP >= 0' FAILED
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.1 parent 2a876f5 commit 7c12b77
File tree
3 files changed
+77
-44
lines changed- mysql-test/suite/gcol
- r
- t
- sql
3 files changed
+77
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7460 | 7460 | | |
7461 | 7461 | | |
7462 | 7462 | | |
7463 | | - | |
7464 | | - | |
7465 | | - | |
7466 | | - | |
7467 | | - | |
7468 | | - | |
7469 | | - | |
7470 | | - | |
7471 | | - | |
7472 | | - | |
7473 | | - | |
7474 | | - | |
7475 | | - | |
7476 | | - | |
7477 | | - | |
7478 | | - | |
7479 | | - | |
7480 | | - | |
7481 | | - | |
7482 | | - | |
7483 | | - | |
7484 | | - | |
7485 | | - | |
7486 | | - | |
7487 | | - | |
7488 | | - | |
7489 | | - | |
7490 | | - | |
7491 | | - | |
7492 | | - | |
7493 | | - | |
7494 | | - | |
7495 | | - | |
7496 | 7463 | | |
7497 | 7464 | | |
7498 | 7465 | | |
| |||
7512 | 7479 | | |
7513 | 7480 | | |
7514 | 7481 | | |
7515 | | - | |
| 7482 | + | |
7516 | 7483 | | |
7517 | 7484 | | |
7518 | | - | |
| 7485 | + | |
| 7486 | + | |
7519 | 7487 | | |
7520 | 7488 | | |
7521 | 7489 | | |
7522 | | - | |
| 7490 | + | |
7523 | 7491 | | |
7524 | 7492 | | |
| 7493 | + | |
| 7494 | + | |
7525 | 7495 | | |
7526 | 7496 | | |
7527 | 7497 | | |
7528 | 7498 | | |
7529 | 7499 | | |
| 7500 | + | |
| 7501 | + | |
| 7502 | + | |
| 7503 | + | |
| 7504 | + | |
| 7505 | + | |
| 7506 | + | |
| 7507 | + | |
| 7508 | + | |
| 7509 | + | |
| 7510 | + | |
| 7511 | + | |
| 7512 | + | |
| 7513 | + | |
| 7514 | + | |
| 7515 | + | |
| 7516 | + | |
| 7517 | + | |
7530 | 7518 | | |
7531 | 7519 | | |
7532 | 7520 | | |
| |||
7541 | 7529 | | |
7542 | 7530 | | |
7543 | 7531 | | |
7544 | | - | |
| 7532 | + | |
7545 | 7533 | | |
7546 | | - | |
7547 | | - | |
7548 | | - | |
| 7534 | + | |
7549 | 7535 | | |
7550 | 7536 | | |
7551 | | - | |
7552 | | - | |
7553 | | - | |
| 7537 | + | |
7554 | 7538 | | |
7555 | | - | |
7556 | 7539 | | |
7557 | 7540 | | |
7558 | 7541 | | |
| |||
0 commit comments