问题现象
OceanBase 数据库 Oracle 模式下用 SYS 用户授予 test1 用户访问 test 用户视图 TTAFLOWLOG 的权限报如下错误。
grant select on test.TTAFLOWLOG to test1;
ORA-00600: internal error code, arguments: -5231, View 'test.TTAFLOWLOG' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
问题原因
分析视图定义的时候没有考虑包含 pl function 的情况。
解决方法
grant select any table test1 绕过。
适用版本
OceanBase 数据库 V2.x 和 V3.x 版本。