This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch rel/0.13
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rel/0.13 by this push:
     new b763ba1ea0 [IOTDB-3168][To rel/0.13] Fix the path with * could be 
executed successfully when inserting (#6051)
b763ba1ea0 is described below

commit b763ba1ea06be5cb17d37ce481ebecbc28cda948
Author: 23931017wu <[email protected]>
AuthorDate: Tue May 31 13:30:36 2022 +0800

    [IOTDB-3168][To rel/0.13] Fix the path with * could be executed 
successfully when inserting (#6051)
---
 .../test/java/org/apache/iotdb/db/integration/IOTDBInsertIT.java    | 6 ++++++
 .../java/org/apache/iotdb/db/metadata/utils/MetaFormatUtils.java    | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git 
a/integration/src/test/java/org/apache/iotdb/db/integration/IOTDBInsertIT.java 
b/integration/src/test/java/org/apache/iotdb/db/integration/IOTDBInsertIT.java
index 9d26d4bfe9..bc86a95a40 100644
--- 
a/integration/src/test/java/org/apache/iotdb/db/integration/IOTDBInsertIT.java
+++ 
b/integration/src/test/java/org/apache/iotdb/db/integration/IOTDBInsertIT.java
@@ -157,6 +157,12 @@ public class IOTDBInsertIT {
     st1.execute("insert into root.t1.wf01.wt01(status, temperature) 
values(true, 20.1, false)");
   }
 
+  @Test(expected = Exception.class)
+  public void testInsertWithException6() throws SQLException {
+    Statement st1 = connection.createStatement();
+    st1.execute(" insert into root.t1.*.a(timestamp, b) values(1509465600000, 
true)");
+  }
+
   @Test
   public void testInsertWithDuplicatedMeasurements() {
     try (Statement st1 = connection.createStatement()) {
diff --git 
a/server/src/main/java/org/apache/iotdb/db/metadata/utils/MetaFormatUtils.java 
b/server/src/main/java/org/apache/iotdb/db/metadata/utils/MetaFormatUtils.java
index ed37eddaa1..8e1d5c48c8 100644
--- 
a/server/src/main/java/org/apache/iotdb/db/metadata/utils/MetaFormatUtils.java
+++ 
b/server/src/main/java/org/apache/iotdb/db/metadata/utils/MetaFormatUtils.java
@@ -82,7 +82,7 @@ public class MetaFormatUtils {
   private static void checkNameFormat(String name) throws MetadataException {
     if (!((name.startsWith("'") && name.endsWith("'"))
             || (name.startsWith("\"") && name.endsWith("\"")))
-        && name.contains(".")) {
+        && (name.contains(".") || name.contains("*"))) {
       throw new MetadataException(String.format("%s is an illegal name.", 
name));
     }
   }

Reply via email to