FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.23k stars 213 forks source link

Conflict resolution code uses constraint name instead of index name #8139

Open aafemt opened 3 months ago

aafemt commented 3 months ago

https://github.com/FirebirdSQL/firebird/blame/95442bdfff76d22aafb57b58894047be2a89c6ea/src/jrd/replication/Applier.cpp#L637

If these names are different debug build consistently throw assertion error during execution of test_blob_not_found_in_rw_replica_if_target_row_exists.py.

hvlad commented 3 months ago

Where do you see uninitialized variables ?

aafemt commented 3 months ago

Oops, my bad, sorry. I looked at wrong MET_lookup_index_name() overload.

hvlad commented 3 months ago

The issue makes no real problem: if code can't find index - it works as before #8042. The only visible problem is assertions in DEBUG build.

Anyway, I'll look how to better handle the case when index and constraint names are not the same.

hvlad commented 3 months ago

Read the code and stop speculate:

https://github.com/FirebirdSQL/firebird/blame/95442bdfff76d22aafb57b58894047be2a89c6ea/src/jrd/replication/Applier.cpp#L1111

hvlad commented 3 months ago

Read the code and stop speculate:

It was the reply on (lost, deleted ?) comment by aafemt: "I wonder what could happen if there is index with name matched constraint's one but on different table..."