MDL-44251 DB helper to reorder rows without violating a unique index.
MDL-44251 fix typo in DML unit tests.