Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.4.4, 10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL)
Description
There is an error when executing query with view, which uses package function.
delimiter $$
|
set sql_mode=ORACLE; |
$$
|
CREATE or replace PACKAGE test1 |
AS
|
function f_test return number; |
END test1; |
$$
|
CREATE or replace PACKAGE body test1 |
AS
|
function f_test return number |
is |
begin |
return 1; |
end; |
END test1; |
$$
|
create or replace view v_test |
as
|
select 1 where 1=test1.f_test(); |
$$
|
select * from v_test; |
$$
|
Produces error:
SQL Error [1356] [HY000]: (conn:20) View 'test.v_test' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them |
And there is no error when using standalone function, not package function:
delimiter $$
|
create or replace function f_test return number |
is
|
begin
|
return 1; |
end; |
$$
|
create or replace view v_test |
as
|
select 1 where 1=f_test(); |
$$
|
select * from v_test; |
$$
|
produces no error.
Attachments
Issue Links
- relates to
-
MDEV-19804 sql_mode=ORACLE: call procedure in packages
- Closed
-
MDEV-28166 sql_mode=ORACLE: fully qualified package function calls do not work: db.pkg.func()
- Closed