`dolt dump` only works when there are tables
- Dominant language
- Go
- Stars
- 24.4k
- Forks
- 873
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 108
Description
On a brand new database with no tables, I can create a procedure, but I can't dump the results unless there's a table.
The same applies for events.
```sql
tmp/main> create procedure proc() begin select 1; end;
Query OK, 0 rows affected (0.01 sec)
tmp/main*> exit
Bye
james@Mac tmp % dolt diff
diff --dolt a/dolt_procedures b/dolt_procedures
added table
+CREATE TABLE `dolt_procedures` (
+ `name` varchar(1023) NOT NULL,
+ `create_stmt` varchar(8191),
+ `created_at` datetime(6),
+ `modified_at` datetime(6),
+ `sql_mode` varchar(1023),
+ PRIMARY KEY (`name`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin;
+---+------+---------------------------------------------+----------------------------+----------------------------+---------------------------------------------------------------+
| | name | create_stmt | created_at | modified_at | sql_mode |
+---+------+---------------------------------------------+----------------------------+----------------------------+---------------------------------------------------------------+
| + | proc | create procedure proc() begin select 1; end | 2026-09-03 00:08:04.503595 | 2026-09-03 00:08:04.503595 | NO_ENGINE_SUBSTITUTION,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES |
+---+------+---------------------------------------------+----------------------------+----------------------------+---------------------------------------------------------------+
james@Mac tmp % dolt status
On branch main
Untracked tables:
(use "dolt add " to include in what will be committed)
new table: dolt_procedures
james@Mac tmp % dolt dump --file-name procedures.sql
No tables to export.
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the implementation of the `dolt dump` command and trace the check that reports “No tables to export.” Reproduce the case with a new database containing only a procedure or event, then verify that the dump includes those objects without requiring a regular table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- cli, database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100