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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
eb3a3937
Commit
eb3a3937
authored
Jul 08, 2024
by
Julien Muchembled
1
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
Show 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):
...
@@ -458,16 +458,16 @@ class MySQLDatabaseManager(MVCCDatabaseManager):
return
self
.
query
(
"SELECT * FROM pt"
)
return
self
.
query
(
"SELECT * FROM pt"
)
def
_getLastTID
(
self
,
partition
,
max_tid
=
None
):
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
:
if
max_tid
:
x
+=
" AND tid<=%s"
%
max_tid
sql
+=
" AND tid<=%s"
%
max_tid
(
tid
,),
=
self
.
query
(
(
tid
,),
=
self
.
query
(
sql
)
"SELECT MAX(tid) as t FROM trans FORCE INDEX (PRIMARY)"
+
x
)
return
tid
return
tid
def
_getLastIDs
(
self
,
partition
):
def
_getLastIDs
(
self
,
partition
):
q
=
self
.
query
q
=
self
.
query
x
=
"WHERE `partition`=%s"
%
partition
x
=
"
WHERE `partition`=%s"
%
partition
(
oid
,),
=
q
(
"SELECT MAX(oid) FROM obj FORCE INDEX (PRIMARY)"
+
x
)
(
oid
,),
=
q
(
"SELECT MAX(oid) FROM obj FORCE INDEX (PRIMARY)"
+
x
)
(
tid
,),
=
q
(
"SELECT MAX(tid) FROM obj FORCE INDEX (tid)"
+
x
)
(
tid
,),
=
q
(
"SELECT MAX(tid) FROM obj FORCE INDEX (tid)"
+
x
)
return
tid
,
oid
return
tid
,
oid
...
...
Julien Muchembled
@jm
mentioned in merge request
!23 (closed)
·
Jul 08, 2024
mentioned in merge request
!23 (closed)
mentioned in merge request !23
Toggle commit list
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