Commit c33a07d
Fix mixed string type foreign key constraints
Fixes dolthub/dolt#9494
MySQL allows mixed string types in foreign key constraints:
- CHAR can reference VARCHAR and vice versa
- BINARY can reference VARBINARY and vice versa
This change updates the foreignKeyComparableTypes function to allow these
mixed type combinations by adding a new compatibleStringTypes helper function
that follows existing codebase naming patterns and includes proper nil safety checks.
The fix enables 6 previously skipped tests that validate the mixed string
type functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 21301de commit c33a07d
File tree
2 files changed
+37
-7
lines changed- enginetest/queries
- sql/plan
2 files changed
+37
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2807 | 2807 | | |
2808 | 2808 | | |
2809 | 2809 | | |
2810 | | - | |
2811 | 2810 | | |
2812 | 2811 | | |
2813 | 2812 | | |
2814 | 2813 | | |
2815 | 2814 | | |
2816 | 2815 | | |
2817 | | - | |
2818 | 2816 | | |
2819 | 2817 | | |
2820 | 2818 | | |
2821 | 2819 | | |
2822 | 2820 | | |
2823 | 2821 | | |
2824 | | - | |
2825 | 2822 | | |
2826 | 2823 | | |
2827 | 2824 | | |
| |||
2850 | 2847 | | |
2851 | 2848 | | |
2852 | 2849 | | |
2853 | | - | |
2854 | 2850 | | |
2855 | 2851 | | |
2856 | 2852 | | |
2857 | 2853 | | |
2858 | 2854 | | |
2859 | 2855 | | |
2860 | | - | |
2861 | 2856 | | |
2862 | 2857 | | |
2863 | 2858 | | |
2864 | 2859 | | |
2865 | 2860 | | |
2866 | 2861 | | |
2867 | | - | |
2868 | 2862 | | |
2869 | 2863 | | |
2870 | 2864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
670 | 670 | | |
671 | 671 | | |
672 | 672 | | |
673 | | - | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
674 | 685 | | |
675 | 686 | | |
676 | 687 | | |
677 | 688 | | |
678 | 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 | + | |
679 | 715 | | |
680 | 716 | | |
681 | 717 | | |
| |||
0 commit comments