Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
dcdb
dcdb
Commits
923d8efd
Commit
923d8efd
authored
Nov 03, 2020
by
Carla Guillen
Browse files
Bugfix: adding <= to begin timestamp so it finds the right table.
parent
18001cd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
analytics/operators/persystsql/MariaDB.cpp
View file @
923d8efd
...
...
@@ -200,10 +200,10 @@ bool MariaDB::getDBJobID(const std::string & job_id_string, std::string& job_db_
}
bool
MariaDB
::
getCurrentSuffixAggregateTable
(
std
::
string
&
suffix
){
if
(
_end_aggregate_timestamp
){
auto
now_uts
=
getTimestamp
();
if
(
_end_aggregate_timestamp
){
auto
now_uts
=
getTimestamp
();
if
(
now_uts
<
_end_aggregate_timestamp
)
{
//suffix found, don't do anything
suffix
=
_current_table_suffix
;
suffix
=
_current_table_suffix
;
return
true
;
}
}
...
...
@@ -212,7 +212,7 @@ bool MariaDB::getCurrentSuffixAggregateTable(std::string & suffix){
std
::
replace
(
date_time
.
begin
(),
date_time
.
end
(),
'T'
,
' '
);
std
::
stringstream
build_query
;
build_query
<<
"SELECT suffix, UNIX_TIMESTAMP(end_timestamp) FROM SuffixToAggregateTable WHERE begin_timestamp <
\'
"
;
build_query
<<
"SELECT suffix, UNIX_TIMESTAMP(end_timestamp) FROM SuffixToAggregateTable WHERE begin_timestamp <
=
\'
"
;
build_query
<<
date_time
<<
"
\'
AND end_timestamp >
\'
"
<<
date_time
<<
"
\'
"
;
auto
query
=
build_query
.
str
();
LOG
(
debug
)
<<
query
;
...
...
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