Fix last_err value in MysqlDatabase::nextid()
Fix last_err value in sqlitedataset.cpp
Merge pull request #5281 from maksqwe/db_error_value_fix

Dbwrappers return error value fix