Closed heni02 closed 1 year ago
再操做一遍,无法复现该问题。
according to the above statements and steps, tried:
but can not repo.
this is not a proxy problem. when an internal query with the prefix __++__internal_cmd_field_list
has been executed, these codes will be invoked (in pkg/frotend/session.go::getSqlType
):
if tenant == nil || strings.HasPrefix(sql, cmdFieldListSql) {
if tenant != nil {
tenant.SetUser("")
}
ses.sqlSourceType = append(ses.sqlSourceType, intereSql)
return
}
and the tenant.user
, which has been set to "", will be cached and valid in subsequent queries until re-establish SQL connection.
0. open a terminal
1. mysql -h127.0.0.1 -udump -P6001 -p111;
2. create account acc1 admin_name 'root' identified by '111';
3. open a new terminal
4. mysql -h127.0.0.1 -uacc1:root -P6009 -p111;
5. launch some queries
6. select node_uuid,statement,account,user from system.statement_info where account='acc1' ;
7. __++__internal_cmd_field_list ; -- this will occur panic err, but it doesn't matter.
8. launch some queries
9. select node_uuid,statement,account,user from system.statement_info where account='acc1' ;
then you will see that some statement records have lost the user info
but I have no idea about why and when this internal query will be executed yet.
put on hold, give priority to #10089
1. Reason:
this is not a proxy problem. when an internal query with the prefix
__++__internal_cmd_field_list
has been executed, these codes will be invoked (inpkg/frotend/session.go::getSqlType
):if tenant == nil || strings.HasPrefix(sql, cmdFieldListSql) { if tenant != nil { tenant.SetUser("") } ses.sqlSourceType = append(ses.sqlSourceType, intereSql) return }
and the
tenant.user
, which has been set to "", will be cached and valid in subsequent queries until re-establish SQL connection.2. Steps to Repo:
0. open a terminal 1. mysql -h127.0.0.1 -udump -P6001 -p111; 2. create account acc1 admin_name 'root' identified by '111'; 3. open a new terminal 4. mysql -h127.0.0.1 -uacc1:root -P6009 -p111; 5. launch some queries 6. select node_uuid,statement,account,user from system.statement_info where account='acc1' ; 7. __++__internal_cmd_field_list ; -- this will occur panic err, but it doesn't matter. 8. launch some queries 9. select node_uuid,statement,account,user from system.statement_info where account='acc1' ; then you will see that some statement records have lost the user info
but I have no idea about why and when this internal query will be executed yet.
发起 cmdFieldList
query 是因为使用 TAB
键补全表名
@xzxiong confirmed ,it is same issue as #10542 ,so closed
@xzxiong confirmed ,it is same issue as #10542 ,so closed
confirmed
Is there an existing issue for the same bug?
Environment
Actual Behavior
When cn groups label is empty, any account who is not in the group login mo, execute SQL, and statement_info not found the account user information
Expected Behavior
No response
Steps to Reproduce
Additional information
No response