matrixone
matrixone copied to clipboard
[Bug]: non-accountadmin role user has no privilege to execute select statement of subscribed table
Is there an existing issue for the same bug?
- [x] I have checked the existing issues.
Branch Name
main
Commit ID
bf7ae4954
Other Environment Information
- Hardware parameters:
- OS type:
- Others:
Actual Behavior
mysql> select * from t1;
ERROR 20101 (HY000): internal error: do not have privilege to execute the statement
Expected Behavior
No response
Steps to Reproduce
# account: sys
create account acc1 ADMIN_NAME 'admin' IDENTIFIED BY '111';
create database db1;
use db1;
create table t1 (a int primary key, b int);
insert into t1 values (1, 1), (2, 2), (3, 3);
create publication pub_all database db1 account all;
# account: acc1, user: admin
create database sub2 from sys publication pub_all;
create role moi_root_role;
create user if not exists moi_root identified by '111' default role moi_root_role;
grant SHOW DATABASES, CREATE DATABASE, DROP DATABASE, CONNECT, create user, alter user, drop user, create role, alter role, drop role, manage grants on account * to moi_root_role WITH GRANT OPTION;
grant SHOW TABLES, CREATE TABLE, DROP TABLE, ALTER TABLE on database `sub2` to moi_root_role WITH GRANT OPTION;
grant SELECT, INSERT, UPDATE, TRUNCATE, DELETE, REFERENCE, INDEX on table `sub2`.* to moi_root_role WITH GRANT OPTION;
# account: acc1, user: moi_root
use sub2;
select * from t1;
Additional information
No response