Not able to import `doltdump.sql` with default enum value into mysql
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 120
Description
I have a clone of [holywritings/bahaiwritings](https://www.dolthub.com/repositories/holywritings/bahaiwritings) that I ran `dolt dump` on. When I try to import into mysql via `mysql -u root < doltdump.sql`, I get the following error message.
```
ERROR 1067 (42000) at line 252: Invalid default value for 'term_type'
```
The error seems to be caused by this statement, specifically `DEFAULT '4'`.
```sql
CREATE TABLE `rosetta_vocab` (
`language` varchar(20) NOT NULL,
`local_term` varchar(200) NOT NULL,
`en_meaning` varchar(200) NOT NULL,
`term_type` enum('category','address','deity','keyword','phrase') DEFAULT '4',
`source_phelps` varchar(20) DEFAULT NULL,
PRIMARY KEY (`language`,`local_term`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;
```
Removing the single quotes wrapping 4 didn't make the error go away. I had to remove the `DEFAULT` clause altogether.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the report by dumping the holywritings/bahaiwritings clone and importing doltdump.sql into MySQL, focusing on the rosetta_vocab definition at line 252. Trace the dump generation path for enum defaults and verify that the generated SQL imports successfully without manually removing the DEFAULT clause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100