Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
3c65fba5
Commit
3c65fba5
authored
Jan 29, 2015
by
Fabio Bas
Browse files
Avoid double locking of sessions, users table
QSqlQuery already executes not-empty queries, no need to call exec()
parent
739ca6a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
servatrice/src/servatrice_database_interface.cpp
View file @
3c65fba5
...
...
@@ -330,12 +330,12 @@ void Servatrice_DatabaseInterface::clearSessionTables()
void
Servatrice_DatabaseInterface
::
lockSessionTables
()
{
QSqlQuery
(
"lock tables "
+
server
->
getDbPrefix
()
+
"_sessions write, "
+
server
->
getDbPrefix
()
+
"_users read"
,
sqlDatabase
)
.
exec
()
;
QSqlQuery
(
"lock tables "
+
server
->
getDbPrefix
()
+
"_sessions write, "
+
server
->
getDbPrefix
()
+
"_users read"
,
sqlDatabase
);
}
void
Servatrice_DatabaseInterface
::
unlockSessionTables
()
{
QSqlQuery
(
"unlock tables"
,
sqlDatabase
)
.
exec
()
;
QSqlQuery
(
"unlock tables"
,
sqlDatabase
);
}
bool
Servatrice_DatabaseInterface
::
userSessionExists
(
const
QString
&
userName
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment