Hi Sergei!
I traced out the problem I faced with refs comparison -- It's in key_copy implementation, which uses field->get_key_image, which in turn copied data to the buffer passed, but from `field->ptr`. The latter is important -- it means, current key_copy implementation always copies data from table->record[0].
I have already came across it while implementing FKs, and have fixed the implementation in the separate commit (see key_copy: use from_record argument to copy the data from). That fixes 'innodb' test combination.
I think now everything you wanted so far is in the branch, so am waiting now for your comments on the new code!