I would have expected it to be interpolated, but it is hard to say it is incorrect (especially if it was working in a test environment) without knowing what mysql_process does. Is there an eval in that routine?
There's no eval in mysql_processes. I'm coming to the conclusion that the input to mysql_processes looks like it's working because @where is empty on the test app. I'll add more for it to work on tomorrow and see what happens - but I'm betting it should be interpolated.
In the meantime, thanks everybody for looking at it and giving your input.