You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "xiaozhihong (Jira)" <ji...@apache.org> on 2022/12/29 08:48:00 UTC
[jira] [Commented] (IOTDB-5217) [CQ]General user query CQ is abnormal
[ https://issues.apache.org/jira/browse/IOTDB-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17652771#comment-17652771 ]
xiaozhihong commented on IOTDB-5217:
------------------------------------
master branch
commit 08f924c707abae0b10491363b3d8e040864f5b2e
I verified.
> [CQ]General user query CQ is abnormal
> -------------------------------------
>
> Key: IOTDB-5217
> URL: https://issues.apache.org/jira/browse/IOTDB-5217
> Project: Apache IoTDB
> Issue Type: Bug
> Components: mpp-cluster
> Affects Versions: 1.0.0, 1.0.1
> Reporter: xiaozhihong
> Assignee: Yuan Tian
> Priority: Major
> Attachments: image-2022-12-14-20-31-20-088.png
>
>
> commit 4dcd255ae86485f4d3e019ab622e5af42d324340
> Default conf file, start 1C1D.
> Enter CLi, Execute sql;
> user : root
> {code:java}
> IoTDB> CREATE CONTINUOUS QUERY cq1 RESAMPLE EVERY 20s BOUNDARY 2022-01-14T23:00:00.000+08:00 RANGE 20s BEGIN SELECT avg(temperature) INTO root.ln_cq.${2}(temperature_avg) FROM root.ln.*.* GROUP BY time(10s), level=2 END;
> Msg: The statement is executed successfully.
> IoTDB> CREATE USER user01 'pass1234';
> > GRANT USER user01 PRIVILEGES READ_TIMESERIES on root.**;
> Msg: The statement is executed successfully.
> Msg: The statement is executed successfully.
> IoTDB> SHOW CONTINUOUS QUERIES;
> +----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+
> |CQId| Query| State|
> +----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+
> | cq1|CREATE CONTINUOUS QUERY cq1 RESAMPLE EVERY 20s BOUNDARY 2022-01-14T23:00:00.000+08:00 RANGE 20s BEGIN SELECT avg(temperature) INTO root.ln_cq.${2}(temperature_avg) FROM root.ln.*.* GROUP BY time(10s), level=2 END|ACTIVE|
> +----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+
> Total line number = 1
> It costs 0.003s
> IoTDB> show cqs;
> +----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+
> |CQId| Query| State|
> +----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+
> | cq1|CREATE CONTINUOUS QUERY cq1 RESAMPLE EVERY 20s BOUNDARY 2022-01-14T23:00:00.000+08:00 RANGE 20s BEGIN SELECT avg(temperature) INTO root.ln_cq.${2}(temperature_avg) FROM root.ln.*.* GROUP BY time(10s), level=2 END|ACTIVE|
> +----+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------+
> Total line number = 1
> It costs 0.003s
> {code}
> user : user01
> {code:java}
> [xzh@i-ipza09nr apache-iotdb-1.0.1-SNAPSHOT-all-bin]$ ./sbin/start-cli.sh -u user01 -pw pass1234
> ---------------------
> Starting IoTDB Cli
> ---------------------
> _____ _________ ______ ______
> |_ _| | _ _ ||_ _ `.|_ _ \
> | | .--.|_/ | | \_| | | `. \ | |_) |
> | | / .'`\ \ | | | | | | | __'.
> _| |_| \__. | _| |_ _| |_.' /_| |__) |
> |_____|'.__.' |_____| |______.'|_______/ version 1.0.1-SNAPSHOT (Build: 4dcd255) Successfully login at 127.0.0.1:6667 IoTDB> CREATE CONTINUOUS QUERY cq4 RESAMPLE EVERY 20s BOUNDARY 2022-01-14T23:00:00.000+08:00 RANGE 20s BEGIN SELECT avg(temperature) INTO root.ln_cq.${2}(temperature_avg) FROM root.ln.*.*
> GROUP BY time(10s), level=2 END;
> Msg: 803: No permissions for this operation, please add privilege CREATE_CONTINUOUS_QUERY
> IoTDB> SHOW CONTINUOUS QUERIES;
> Msg: 301: [EXECUTE_STATEMENT_ERROR(301)] Exception occurred: checkAuthority failed. Index -1 out of bounds for length 34
> IoTDB> show cqs;
> Msg: 301: [EXECUTE_STATEMENT_ERROR(301)] Exception occurred: checkAuthority failed. Index -1 out of bounds for length 34{code}
> The log is:
> !image-2022-12-14-20-31-20-088.png|width=1111,height=213!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)