neo4j/neo4j — pull request #1628 by chrisvest (2013-12-05 12:31:22+00:00)
Title: Constraint crash - Allow recreate of indexes and constraints in 1 tx.

This is not an important feature, but recreation, the way the code handled
it before lead to the database becoming unusable, and supporting recreate
is easier than detecting and disallowing it.

This is implemented by making sure that the add/create operations check
for prior removes before actually doing add. In the case of constraints we
also check for the background creation of the index to ensure that this
does not happen again.

More thorough testing for index/constraint creation has been added where
each test case asserts
* that: Create+Recreate: results in creation.
* that: Recreate: results in nothing changing.
* that: Recreate+Drop: results in removal.

Each test case also asserts that recreation in each transaction can be
repeated multiple times. Running this all in a single test cases asserts
that the recreation on the "high level" also works.