This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 0e6e103bc8a [fix](temp_table) temp table should not present in sys
tables (#55334)
0e6e103bc8a is described below
commit 0e6e103bc8a16335d82f46f94099e128b67bed53
Author: morrySnow <[email protected]>
AuthorDate: Thu Aug 28 15:30:40 2025 +0800
[fix](temp_table) temp table should not present in sys tables (#55334)
---
.../src/main/java/org/apache/doris/service/FrontendServiceImpl.java | 6 ++++++
regression-test/suites/temp_table_p0/test_temp_table.groovy | 6 ++++++
2 files changed, 12 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index c120271d63a..339df7c8fb3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -666,6 +666,9 @@ public class FrontendServiceImpl implements
FrontendService.Iface {
}
}
for (TableIf table : tables) {
+ if (table.isTemporary()) {
+ continue;
+ }
if (!Env.getCurrentEnv().getAccessManager()
.checkTblPriv(currentUser, catalogName, dbName,
table.getName(), PrivPredicate.SHOW)) {
@@ -905,6 +908,9 @@ public class FrontendServiceImpl implements
FrontendService.Iface {
if (db != null) {
for (String tableName : tables) {
TableIf table = db.getTableNullableIfException(tableName);
+ if (table.isTemporary()) {
+ continue;
+ }
if (table != null) {
table.readLock();
try {
diff --git a/regression-test/suites/temp_table_p0/test_temp_table.groovy
b/regression-test/suites/temp_table_p0/test_temp_table.groovy
index fe6699c3cf0..b09875c96a8 100644
--- a/regression-test/suites/temp_table_p0/test_temp_table.groovy
+++ b/regression-test/suites/temp_table_p0/test_temp_table.groovy
@@ -122,6 +122,12 @@ suite('test_temp_table', 'p0') {
}
assertFalse(hasTempTable)
+ def info_tables = "select * from information_schema.tables where
table_name = 't_test_temp_table2'"
+ assertEquals(0, info_tables.size())
+ def info_columns = "select * from information_schema.columns where
table_name = 't_test_temp_table2'"
+ assertEquals(0, info_columns.size())
+
+
// will create a normal olap table, not temporary table, even if source
table is temporary
sql "drop table if exists t_test_table3_0"
sql "create table t_test_table3_0 like t_test_temp_table3"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]