Database existence is not check before user renaming. It can throw an error if it doesn't exist :
PHP Fatal error: Uncaught Error: Call to a member function count() on bool in /usr/share/tuleap/src/common/dao/include/DataAccessObject.class.php:154
Stack trace:
#0 /usr/share/tuleap/plugins/mediawiki/include/MediawikiDao.class.php(199): DataAccessObject->retrieveCount()
#1 /usr/share/tuleap/plugins/mediawiki/include/MediawikiDao.class.php(170): MediawikiDao->UserNameAlreadyExist()
#2 /usr/share/tuleap/plugins/mediawiki/include/mediawikiPlugin.php(538): MediawikiDao->renameUser()
#3 /usr/share/tuleap/src/common/Event/EventManager.class.php(127): MediaWikiPlugin->systemevent_user_rename()
#4 /usr/share/tuleap/src/common/Plugin/PluginLoader.php(73): EventManager->eventManagerDispatch()
#5 /usr/share/tuleap/src/common/Event/EventManager.class.php(116): Tuleap\Plugin\PluginLoader->Tuleap\Plugin\{closure}()
#6 /usr/share/tuleap/src/common/Event/EventManager.class.php(104): EventManager->processEventOnListener()
#7 /usr/share/tuleap/src/common/system_event/include/SystemEvent_USER_RENAME.class.php(115): EventManager->processEvent()
#8 /usr/share/tuleap/src/utils/rename_incremented_users.php(244): SystemEvent_USER_RENAME->process()
#9 /usr/share/tuleap/src/utils/rename_incremented_users.php(227): executeSystemEvent()
#10 /usr/share/tuleap/src/utils/rename_incremented_users.php(200): updateUser()
#11 /usr/share/tuleap/src/utils/rename_incremented_users.php(98): renameAllUsers()