SENTRY-392: fix a bug when execute use db;