dolthub / dolt

Dolt – Git for Data
Apache License 2.0
17.41k stars 488 forks source link

`dolt sql` suppresses warnings. #8016

Open nicktobey opened 1 month ago

nicktobey commented 1 month ago

The server calls the clearWarnings method after each command, which removes the list of warnings from the session if the last command didn't emit any new ones.

So, warnings accumulate until you have a command with no warnings, then they all get removed.

dolt sql is a builtin client, which has a feature where we display the db name and branch name on the prompt.

We get this info by running select database() as db, active_branch() as branch after each command.

This query emits no warnings

Thus, dolt sql is accidentally clearing the warnings after each command.