cherry-pick from 3_1_x_release to 3.1_opensource_release

This commit is contained in:
obdev
2021-07-15 14:21:14 +08:00
committed by wangzelin.wzl
parent ad7be27692
commit 20c0cae3dd
21 changed files with 269 additions and 174 deletions

View File

@ -689,7 +689,7 @@ bool ObSQLSessionInfo::has_user_process_privilege() const
int ObSQLSessionInfo::check_global_read_only_privilege(const bool read_only, const ObSqlTraits& sql_traits)
{
int ret = OB_SUCCESS;
if (!has_user_super_privilege() && read_only) {
if (!has_user_super_privilege() && !is_tenant_changed() && read_only) {
/** session1 session2
* insert into xxx;
* set @@global.read_only = 1;