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

Fixed the bug that the database is not totally separated in partition cache #14778

Merged
merged 4 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -456,13 +456,17 @@ public void testMixedDatabase() throws SQLException {
EnvFactory.getEnv().getConnection(BaseEnv.TABLE_SQL_DIALECT);
final Statement statement = connection.createStatement()) {
statement.execute("create database test");
statement.execute("use test");
statement.execute("create table table1(id1 tag, s1 string)");
statement.execute("insert into table1 values(0, 'd1', null), (1,'d1', 1)");
}

try (final Connection connection = EnvFactory.getEnv().getConnection();
final Statement statement = connection.createStatement()) {
statement.execute("create database root.test");
statement.execute(
"alter database root.test WITH SCHEMA_REGION_GROUP_NUM=2, DATA_REGION_GROUP_NUM=3");
statement.execute("insert into root.test.d1 (s1) values(1)");
statement.execute("drop database root.test");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,9 +358,9 @@ public DatabaseSchemaResp getMatchedDatabaseSchemas(final GetDatabasePlan plan)
final List<PartialPath> matchedPaths =
mTree.getMatchedDatabases(patternPath, plan.getScope(), false);
for (final PartialPath path : matchedPaths) {
schemaMap.put(
path.getFullPath(),
mTree.getDatabaseNodeByDatabasePath(path).getAsMNode().getDatabaseSchema());
final TDatabaseSchema schema =
mTree.getDatabaseNodeByDatabasePath(path).getAsMNode().getDatabaseSchema();
schemaMap.put(schema.getName(), schema);
}
result.setSchemaMap(schemaMap);
result.setStatus(new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode()));
Expand Down
Loading