Thanks, @julianhyde. Would you mind adding a couple of unit tests to QueryDatabaseMetaDataTest so we make sure we don't regress on these improvements?