Commit 77b4675
Fix CREATE TABLE enum default validation to show proper column names
- Add early validation in tableSpecToSchema to catch enum default 0 before conversion
- Prevents columndefault.go from returning "(unknown)" in error messages
- Enhanced validateDefaultExprs to handle enum defaults with proper column context
- Now matches MySQL behavior exactly: "Invalid default value for 'column_name'"
Resolves the remaining column name issue for CREATE TABLE statements
while maintaining all existing INSERT validation functionality.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 1c68478 commit 77b4675
1 file changed
+38
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1298 | 1298 | | |
1299 | 1299 | | |
1300 | 1300 | | |
1301 | | - | |
1302 | | - | |
1303 | | - | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
1310 | | - | |
1311 | | - | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
1312 | 1329 | | |
| 1330 | + | |
1313 | 1331 | | |
1314 | 1332 | | |
1315 | 1333 | | |
| |||
1418 | 1436 | | |
1419 | 1437 | | |
1420 | 1438 | | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
| 1447 | + | |
1421 | 1448 | | |
1422 | 1449 | | |
1423 | 1450 | | |
| |||
0 commit comments