Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug: can not show databases after drop database (#14899) #14904

Merged
merged 2 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/vm/engine/disttae/txn_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,8 @@ func (tbl *txnTable) rangesOnePart(
return
}
//deletes in tbl.writes maybe comes from PartitionState.rows or PartitionState.blocks.
if entry.fileName == "" {
if entry.fileName == "" &&
entry.tableId != catalog.MO_DATABASE_ID && entry.tableId != catalog.MO_TABLES_ID && entry.tableId != catalog.MO_COLUMNS_ID {
vs := vector.MustFixedCol[types.Rowid](entry.bat.GetVector(0))
for _, v := range vs {
id, _ := v.Decode()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -539,3 +539,11 @@ c d
1 1
2 2
drop table if exists test_11;
create database test_drop_db;
set autocommit=0;
use test_drop_db;
drop database test_drop_db;
show databases like '%test_drop_db%';
Database
test_drop_db
set autocommit=1;
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,9 @@ select * from test_11;
-- @session}

drop table if exists test_11;
create database test_drop_db;
set autocommit=0;
use test_drop_db;
drop database test_drop_db;
show databases like '%test_drop_db%';
set autocommit=1;
Loading