You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we have a re-initialization of a variable in a function in MySQL using the set statement, the variable gets declared twice with different datatypes in the exported schema. This is due to the uncommenting of data-type mappings in our underlying tool's config file.
Sample source function:
drop function if exists xyz;
delimiter //
create function xyz()
returns varchar(10)
reads sql data
begin
declare max_date date;
set max_date=(SELECT CURRENT_DATE()
);
set @max_date=max_date;
return max_date;
end //
delimiter ;
select xyz();
Exported schema:
CREATE OR REPLACE FUNCTION xyz () RETURNS varchar AS $body$
DECLARE
max_date timestamp;max_date date;
BEGIN
max_date = (SELECT CURRENT_DATE
);
max_date:=max_date;
return max_date;
end;
$body$
LANGUAGE PLPGSQL
SECURITY DEFINER
;
Workaround:
Remove the extra variable declaration from the exported files
The text was updated successfully, but these errors were encountered:
If we have a re-initialization of a variable in a function in MySQL using the
set
statement, the variable gets declared twice with different datatypes in the exported schema. This is due to the uncommenting of data-type mappings in our underlying tool's config file.Sample source function:
Exported schema:
Workaround:
Remove the extra variable declaration from the exported files
The text was updated successfully, but these errors were encountered: