已关闭
[Bug]: B库同时存在'test'和'test@%'用户时,后者失效 #8383
Zero创建于  8月10日关闭于  23 天前
Zero
Zero
8月10日 创建

测试类型

SQL功能

测试版本

7.0.0LTS

问题描述

B库同时存在'test'和' test@ %'用户时,后者失效,无法以host方式登陆
问题疑似引入自pr 9061,该pr改变了鉴权顺序导致只要存在同名,host用户登陆就失效了,将代码回退到此单之前是可以的。请确认此修改是否符合预期
https://gitcode.com/opengauss/openGauss-server/pull/9061

操作系统和硬件信息

CentOS Linux release 7.9.2009 (Core)
Linux zero 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

测试环境

企业版单机

被测功能

预置条件

操作步骤

create database test_b with dbcompatibility 'B';
\c test_b
CREATE USER test IDENTIFIED BY 'PlainPass123';
CREATE USER 'test'@'%' IDENTIFIED BY 'HostPass456';
\q

-- 连接不上
gsql -dtest_b -r -p17432 -h localhost -U test -W HostPass456

-- 删除test用户之后就可以连

预期输出

能连接上

实际输出

image.png

删除用户test之后就可以用host连
image.png

日志信息

image.png

提单组织

联合伙伴

测试代码

likedislike
opengauss_bot
opengauss_bot成员
8月10日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月10日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
8月10日 添加了label:sig/StorageEngine,sig/AI,sig/CM,sig/CloudNative,sig/SecurityTechnology,sig/SQLEngine
opengauss_bot
opengauss_bot成员
8月10日 评论:

Welcome To openGauss Community

Hey @Coder_Zero1 , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .

likedislike
sungang14sungang14成员
8月13日 issue优先级由 无优先级 改变为 次要
sungang14sungang14成员
8月13日 关联了看板:openGauss 7.0.0-LTS
ywzq1161327784ywzq1161327784成员
8月15日 移除了负责人 TestManager
opengauss_bot
opengauss_bot成员
8月15日 评论:

This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.

likedislike
opengauss_botopengauss_bot成员
8月15日 将 TestManager 设为负责人
ywzq1161327784ywzq1161327784成员
8月15日 将 superlchf 设为负责人,移除负责人 TestManager
ywzq1161327784ywzq1161327784成员
8月15日 修改了issue 的描述
Ssuperlchf成员
8月20日 关联了pull request:【6.0.0回合】修复b_compatibility_user_host_auth=on原本逻辑
ywzq1161327784ywzq1161327784成员
27 天前 issue状态由 待办的 改变为 已完成
superlchf成员
25 天前 评论:

image.png

likedislike
Ssuperlchf成员
25 天前 issue状态由 已完成 改变为 待回归
lvlintao666
lvlintao666成员
23 天前 评论:

回归时间:2026.8.28
回归版本:7.0.0 B020
回归结论:通过
回归步骤:按上述步骤执行SQL语句
image.png

likedislike
lvlintao666lvlintao666成员
23 天前 issue状态由 待回归 改变为 已验收
lvlintao666lvlintao666成员
23 天前 关闭了 issue