-
Bug
-
Resolution: Won't Do
-
Minor
-
None
-
2.3.3
-
Any
-
MOODLE_23_STABLE
There's five tests relating to adding or dropping keys in ddl_tests.php that appear to be passing by accident.
testAddUniqueKey
testAddForeignUniqueKey
testAddForeignKey
testDropKey
testDropForeignKey
When they add keys the command is being silently dropped because a key with that name already exists.
Spotted while looking at http://tracker.moodle.org/browse/MDL-36930 (SQLite unit test failure: duplicate keys when adding Foreign Keys)
Note the tests don't actually test for the presence (or absence) of the keys they add or drop, yet there's a test in the same file called testFindKeyName that (mostly) does exactly that. Perhaps that could be re-used to make these a bit stricter?
- has been marked as being related by
-
MDL-36920 SQLite support for 3.9+
-
- Closed
-