You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/08/02 04:13:42 UTC
[doris] 02/02: [cherry-pick][fix](catalog)fix bug for lower case when rename table name #11403
This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch dev-1.1.2
in repository https://gitbox.apache.org/repos/asf/doris.git
commit dbf793c321d43bfd7f4071e0d643188f3f9d215a
Author: yiguolei <yi...@gmail.com>
AuthorDate: Tue Aug 2 11:51:56 2022 +0800
[cherry-pick][fix](catalog)fix bug for lower case when rename table name #11403
---
fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
index 3ae89e10e2..7e66247723 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
@@ -5379,6 +5379,9 @@ public class Catalog {
String oldTableName = table.getName();
String newTableName = tableRenameClause.getNewTableName();
+ if (Catalog.isStoredTableNamesLowerCase() && !Strings.isNullOrEmpty(newTableName)) {
+ newTableName = newTableName.toLowerCase();
+ }
if (oldTableName.equals(newTableName)) {
throw new DdlException("Same table name");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org