Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xavier Thompson
neoppod
Commits
eb3a3937
Commit
eb3a3937
authored
Jul 08, 2024
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql: add missing spaces in SQL + tiny optimization
The spaces are optional so it's cosmetics.
parent
dc257fc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
neo/storage/database/mysql.py
neo/storage/database/mysql.py
+5
-5
No files found.
neo/storage/database/mysql.py
View file @
eb3a3937
...
...
@@ -458,16 +458,16 @@ class MySQLDatabaseManager(MVCCDatabaseManager):
return
self
.
query
(
"SELECT * FROM pt"
)
def
_getLastTID
(
self
,
partition
,
max_tid
=
None
):
x
=
"WHERE `partition`=%s"
%
partition
sql
=
(
"SELECT MAX(tid) as t FROM trans FORCE INDEX (PRIMARY)"
" WHERE `partition`=%s"
)
%
partition
if
max_tid
:
x
+=
" AND tid<=%s"
%
max_tid
(
tid
,),
=
self
.
query
(
"SELECT MAX(tid) as t FROM trans FORCE INDEX (PRIMARY)"
+
x
)
sql
+=
" AND tid<=%s"
%
max_tid
(
tid
,),
=
self
.
query
(
sql
)
return
tid
def
_getLastIDs
(
self
,
partition
):
q
=
self
.
query
x
=
"WHERE `partition`=%s"
%
partition
x
=
"
WHERE `partition`=%s"
%
partition
(
oid
,),
=
q
(
"SELECT MAX(oid) FROM obj FORCE INDEX (PRIMARY)"
+
x
)
(
tid
,),
=
q
(
"SELECT MAX(tid) FROM obj FORCE INDEX (tid)"
+
x
)
return
tid
,
oid
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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