[ 
https://forge.continuent.org/jira/browse/SEQUOIA-1031?page=comments#action_14661
 ] 

Emmanuel Cecchet commented on SEQUOIA-1031:
-------------------------------------------

Note that the replacement of rand() is a bad idea anyway.
If you consider a statement like: UPDATE t SET x=rand() WHERE y=10
Trying to replace rand() by a value like 'UPDATE t SET x=2 WHERE y=10' will set 
all rows matching 'y=10' to 2 whereas the original statement will assign a 
different random value to each row matching 'y=10'.

A potential workaround for the rand() issue would be to deterministically set 
the seed on all backends. For example in PostgreSQL this can be done by 
invoking 'SELECT setseed(value);' where value could be the random value 
generated by the middleware. Note that a specific lock on the seed would be 
needed to prevent concurrent execution of queries trying to set the seed to use 
random.

> Macro parser can get confused by SQL containing "Math.random()" as text
> -----------------------------------------------------------------------
>
>          Key: SEQUOIA-1031
>          URL: https://forge.continuent.org/jira/browse/SEQUOIA-1031
>      Project: Sequoia
>         Type: Bug

>   Components: Core
>     Reporter: Gilles Rayrat

>
>
> While inserting contents from an xml file into a CLOB column using prepared 
> statement, a piece of Javascript  containing the string 'Math.random()' is 
> replaced by an actual value.
> Note that this is not fully reproducible, it might be linked to quotes (') 
> existing within the entered data

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   https://forge.continuent.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
Sequoia mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/sequoia

Reply via email to