Commit 8aa11f3
committed
mysql: Negative
In our outbound mysql serialization, we were intentionally failing to
write out `TIME` values that may have been negative. Mysql does allow
`TIME` calues to be in the range '-838:59:59' to '838:59:59'[0].
The prior code, at least in the serialization of data returned from a
proxied request, assumed that `TIME` must be `Duration`, and
`Duration` is always positive. This CL gets around that limitation by
just ditching `Duration` and using the existin`MySqlTime` type, which
already handles positive/negative `TIME` values.
In practice, I'd suspect negative `TIME` values to be fairly rare, but
fuzz testing stomps on this landmine oftern enough (and they are valid
values).
[0] https://dev.mysql.com/doc/refman/8.4/en/time.html
Fixes: REA-5966
Release-Note-Core: Support negative `TIME` values for mysql.
Change-Id: Ifde7e80177bd8b1bd31de532875a8ada14a8d9f2
Reviewed-on: https://gerrit.readyset.name/c/readyset/+/10330
Tested-by: Buildkite CI
Reviewed-by: Marcelo Altmann <marcelo@readyset.io>TIME values in prepared statements1 parent e85ff4e commit 8aa11f3
1 file changed
+22
-88
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
656 | 656 | | |
657 | 657 | | |
658 | 658 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
667 | | - | |
668 | | - | |
669 | | - | |
670 | | - | |
671 | | - | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | | - | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | 659 | | |
715 | 660 | | |
716 | 661 | | |
| |||
726 | 671 | | |
727 | 672 | | |
728 | 673 | | |
729 | | - | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
738 | | - | |
739 | | - | |
740 | | - | |
741 | | - | |
742 | | - | |
743 | | - | |
744 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
745 | 682 | | |
746 | 683 | | |
747 | 684 | | |
| |||
797 | 734 | | |
798 | 735 | | |
799 | 736 | | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
815 | | - | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
816 | 745 | | |
817 | 746 | | |
818 | 747 | | |
| |||
891 | 820 | | |
892 | 821 | | |
893 | 822 | | |
894 | | - | |
895 | 823 | | |
896 | 824 | | |
897 | 825 | | |
| |||
1050 | 978 | | |
1051 | 979 | | |
1052 | 980 | | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
1053 | 987 | | |
1054 | 988 | | |
1055 | 989 | | |
| |||
0 commit comments