Hi,

if I run this on my unsorted users table I will get an error about duplicated keys. It seems mysql uses the order from select * from users. So uid 6 is updated before 5 and 5 twice in the table is not accepted.

I added an "ORDER BY uid" to the end of your select in line 140 and everything runs fine now.

CommentFileSizeAuthor
simpletest_clone.test.patch1.12 KBkars-t

Comments

Pedro Lozano’s picture

I got this same problem and came up with the same patch. Works fine.

jhedstrom’s picture

Status: Needs review » Fixed

Thanks, committed to head and 6.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.