Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
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
Esteban Blanc
proview
Commits
c26fd98c
Commit
c26fd98c
authored
Sep 18, 2020
by
Claes
Committed by
Esteban Blanc
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sev db tree didn't work for array elements
parent
65c102df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
sev/lib/sev/src/sev_db_tree.cpp
sev/lib/sev/src/sev_db_tree.cpp
+12
-1
sev/lib/sev/src/sev_dbms.cpp
sev/lib/sev/src/sev_dbms.cpp
+0
-3
No files found.
sev/lib/sev/src/sev_db_tree.cpp
View file @
c26fd98c
...
...
@@ -48,6 +48,7 @@ pwr_tStatus sev_db::tree_update()
int
onum
;
pwr_tAName
hname
;
pwr_tAName
aname
;
pwr_tAName
attrname
;
pwr_tStatus
sts
;
pwr_tOid
oid
;
pwr_tCid
cid
=
0
;
...
...
@@ -100,7 +101,17 @@ pwr_tStatus sev_db::tree_update()
strcpy
(
aname
,
s
);
strcat
(
aname
,
"."
);
strcat
(
aname
,
m_items
[
i
].
attr
[
j
].
aname
);
strcpy
(
attrname
,
m_items
[
i
].
attr
[
j
].
aname
);
// Replace array index [x] with __x
if
((
s
=
strrchr
(
attrname
,
'['
)))
{
int
idx
;
num
=
sscanf
(
s
+
1
,
"%d"
,
&
idx
);
if
(
num
!=
1
)
continue
;
*
s
=
0
;
sprintf
(
s
,
"__%d"
,
idx
);
}
strcat
(
aname
,
attrname
);
onum
=
dcli_parse
(
aname
,
"-"
,
""
,
(
char
*
)
oname_array
,
sizeof
(
oname_array
)
/
sizeof
(
oname_array
[
0
]),
sizeof
(
oname_array
[
0
]),
0
);
...
...
sev/lib/sev/src/sev_dbms.cpp
View file @
c26fd98c
...
...
@@ -2605,8 +2605,6 @@ int sev_dbms::store_event(
else
con
=
m_env
->
con
();
printf
(
"Store event:eventstatus %u
\n
"
,
ep
->
eventstatus
);
*
sts
=
time_AtoAscii
(
&
ep
->
time
,
time_eFormat_NumDateAndTime
,
timstr
,
sizeof
(
timstr
));
if
(
EVEN
(
*
sts
))
...
...
@@ -5081,7 +5079,6 @@ int sev_dbms::get_events(pwr_tStatus *sts, void *thread, pwr_tOid oid,
sprintf
(
query
,
"select %s from %s %s order by %s %s"
,
column_part
,
item
.
tablename
,
where_part
,
orderby_part
,
limit_part
);
printf
(
"Query: %s
\n
"
,
query
);
rc
=
mysql_query
(
con
,
query
);
if
(
rc
)
{
printf
(
"In %s row %d:
\n
"
,
__FILE__
,
__LINE__
);
...
...
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