Commit 19bc4dc
Fix enum foreign key constraints to match MySQL behavior
- Allow enum types to reference each other in foreign keys regardless of string values
- MySQL allows enum foreign keys to match based on underlying numeric values
- Modified foreignKeyComparableTypes to handle enum types specially
- Updated test expectations to use correct error types (ErrForeignKeyChildViolation)
- Removed Skip flag from 'enums with foreign keys' test
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 53f1886 commit 19bc4dc
File tree
2 files changed
+12
-8
lines changed- enginetest/queries
- sql/plan
2 files changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9164 | 9164 | | |
9165 | 9165 | | |
9166 | 9166 | | |
9167 | | - | |
| 9167 | + | |
9168 | 9168 | | |
9169 | 9169 | | |
9170 | 9170 | | |
| |||
9207 | 9207 | | |
9208 | 9208 | | |
9209 | 9209 | | |
9210 | | - | |
| 9210 | + | |
9211 | 9211 | | |
9212 | 9212 | | |
9213 | 9213 | | |
| |||
9217 | 9217 | | |
9218 | 9218 | | |
9219 | 9219 | | |
9220 | | - | |
| 9220 | + | |
9221 | 9221 | | |
9222 | 9222 | | |
9223 | 9223 | | |
| |||
9247 | 9247 | | |
9248 | 9248 | | |
9249 | 9249 | | |
9250 | | - | |
| 9250 | + | |
9251 | 9251 | | |
9252 | 9252 | | |
9253 | 9253 | | |
| |||
9257 | 9257 | | |
9258 | 9258 | | |
9259 | 9259 | | |
9260 | | - | |
| 9260 | + | |
9261 | 9261 | | |
9262 | 9262 | | |
9263 | 9263 | | |
| |||
9282 | 9282 | | |
9283 | 9283 | | |
9284 | 9284 | | |
9285 | | - | |
| 9285 | + | |
9286 | 9286 | | |
9287 | 9287 | | |
9288 | 9288 | | |
| |||
9292 | 9292 | | |
9293 | 9293 | | |
9294 | 9294 | | |
9295 | | - | |
| 9295 | + | |
9296 | 9296 | | |
9297 | 9297 | | |
9298 | 9298 | | |
9299 | | - | |
| 9299 | + | |
9300 | 9300 | | |
9301 | 9301 | | |
9302 | 9302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
655 | 655 | | |
656 | 656 | | |
657 | 657 | | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
658 | 662 | | |
659 | 663 | | |
660 | 664 | | |
| |||
0 commit comments