Sqlite: Make selects even a little bit more random

Returning selects in the reverse order can find hidden bugs.

Change-Id: If06c0de368de3277e5cca02fadfd6ea3fa323847
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2021-05-13 00:50:29 +02:00
parent b9ea367769
commit 6fa399eccf

View File

@@ -77,7 +77,9 @@ Database::Database(Utils::PathString databaseFilePath,
open(std::move(databaseFilePath), lockingMode);
#ifndef QT_NO_DEBUG
execute("PRAGMA reverse_unordered_selects=1");
if (std::rand() % 2)
execute("PRAGMA reverse_unordered_selects=1");
#endif
}