Community forum

Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
Offline bweston  
#1 Posted : Friday, April 28, 2017 8:33:36 PM(UTC)
bweston

Rank: Paid support

Joined: 12/14/2012(UTC)
Posts: 78

Thanks: 2 times
Was thanked: 16 time(s) in 13 post(s)
I upgraded to version 8.2.6 last week, and have just discovered a change that caused some of my jobs not to work correctly.

One of the key tasks of the job was a SQL task with the following as its execute text:
Code:

/*{TASK(PrevTask,StdOut)}
--*/


The preceding task was a Powershell script that built the query in a variable and then printed it to StdOut at the end, preceded by a
Code:
*/
. That way if the code that created the output ever caused any output of its own for some reason, it would be commented out in the query.

After the upgrade, as best I can tell from the tests that I have run, the
Code:
{TASK(PrevTask,StdOut)}
no longer gets replaced before the query is sent to SQL, which prevented this task from doing what it was supposed to do for about a week before I realized what was happening. If I remove the comment from around it, it does get replaced. As best I've been able to determine so far, this behavior seems specific to SQL tasks.

If I remember correctly, I actually put this approach in place originally because there was a VisualCron version quite some time ago in which the output of Powershell tasks was being preceded by a bunch of VisualCron powershell internals information, and that had broken the task because it resulted in SQL syntax errors; that was why I didn't just do the entire comment-wrapping of any unexpected output inside the Powershell task itself.

Was this change unintentional, was it announced somewhere in the changelogs that I'm not seeing, or was it intentional but not announced because it was expected to be inconsequential?

As a side note, it appears that the task variable
Code:
{TASK(PrevTask,Query)}
from a SQL task is not, as I'd expected/hoped, the query that was actually executed on the last run, but rather the content of the query text box, and if that variable is output via a Powershell task, any Visualcron variables (inside SQL comments or not) that are in that text will get evaluated THEN. This had me barking up the wrong tree for a couple of hours convinced that somehow my SQL task was considering itself to be its own PrevTask.

Edited by moderator Thursday, August 1, 2019 4:44:25 PM(UTC)  | Reason: Not specified

Offline Support  
#2 Posted : Tuesday, May 2, 2017 9:04:24 AM(UTC)
Support

Rank: Official support

Joined: 2/23/2008(UTC)
Posts: 11,203

Thanks: 871 times
Was thanked: 446 time(s) in 424 post(s)
I do not recall which exact version but we added support for having SQL comments in code. By support we mean that we strip out before executing and then avoiding problems when executing. So, in your case you cannot have Variables inside comments as they will be removed.

Edited by user Tuesday, May 2, 2017 9:05:33 AM(UTC)  | Reason: Not specified

Henrik
Support
http://www.visualcron.com
Please like VisualCron on facebook!
Offline mnp  
#3 Posted : Thursday, August 1, 2019 10:34:39 AM(UTC)
mnp

Rank: Paid support

Joined: 4/23/2019(UTC)
Posts: 2

Hi, sorry for necroing this thread but this change also made it so it is no longer possible to pass hints to the optimizer.
Is there some way to make visualcron not strip the comments?
Offline Support  
#4 Posted : Thursday, August 1, 2019 11:56:22 AM(UTC)
Support

Rank: Official support

Joined: 12/1/2015(UTC)
Posts: 217

Thanks: 24 times
Was thanked: 12 time(s) in 11 post(s)
Originally Posted by: mnp Go to Quoted Post
Hi, sorry for necroing this thread but this change also made it so it is no longer possible to pass hints to the optimizer.
Is there some way to make visualcron not strip the comments?


Hi mnp. This is currently not possible. I suggest that you make a feature request for this here:
https://www.visualcron.c...;name=Feature%20requests
Michael
Support
http://www.visualcron.com

Please like VisualCron on facebook!
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Scroll to Top