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.
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.