Remove unused code
Merge pull request #5804 from lucasmichot/dead-code

[4.2] Database : remove unused code