Toad changes double quotes around strings in SP dynamic sql in compare sync script

When generating a Sync script Toad changes double quotes to single in SP dynamic SQL which fails the script:

Original:

CREATE PROCEDURE my_sp ()
BEGIN
DECLARE i int;

SET i = 1;

SET @s = concat(‘select ‘‘my sp:’, i,’’’’);

PREPARE stmt FROM @s;

EXECUTE stmt;

DEALLOCATE PREPARE stmt;
END;


Sync Script:

CREATE PROCEDURE my_sp () LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER BEGIN
DECLARE i int;

SET i = 1;

SET @s = concat(‘select ‘my sp:’, i,’’’);

PREPARE stmt FROM @s;

EXECUTE stmt;

DEALLOCATE PREPARE stmt;
END;

Hi Yoni,

Thank you for reporting this, we have reproduced the issue and logged it under TE-8750. I’m afraid the fix won’t make it into the upcoming release, but rather into the next one.

Regards,

Lukas

Hi Yoni,

to add to Lukas’ response we are already looking into the issue and are confident that it will be part of release that is to come in about 2 months.

For now you just have to be aware that quotes that need escaping within functions, procedures, triggers and events need to have it done manually before executing sync script.

Regards

Petr Ch.