zxs / tungsten-replicator

Automatically exported from code.google.com/p/tungsten-replicator
0 stars 0 forks source link

the example truncatetext.js script does not process all row change data #1117

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1.setup replication to MySQL with more than one DBMSData events in one 
ReplDBMSEvent

What is the expected output?
All DBMSData events will be processed

What do you see instead?
only some of them are processed

What version of the product are you using?
4.0.0.18

On what operating system?
Amazon linux

Please provide any additional information below.

Notes:
The issue comes from the fact that we are not declaring the i variable in the 
for loop as a local variable. One of the nested calls in that main loop also 
makes use of the i variable as a global variable. The 2 loop variables end up 
corrupting each other.

Resolution:

Add  "var i;" before each loop in those 2 functions in the script:

function filter(event)
function byteArrayToString(byteArray)

Original issue reported on code.google.com by g...@vessere.com on 25 May 2015 at 6:56