Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
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
nexedi
MariaDB
Commits
ce46146b
Commit
ce46146b
authored
Feb 28, 2013
by
Andrew McDonnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix segfaults caused by invalid origid, destid, weight attributes
parent
eccf20b5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+18
-4
No files found.
storage/oqgraph/ha_oqgraph.cc
View file @
ce46146b
...
...
@@ -455,6 +455,14 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
break
;
}
if
(
!
origid
)
{
fprint_error
(
"Invalid OQGRAPH backing store ('%s'.origid attribute not set to a valid column of '%s')"
,
p
,
options
->
table_name
);
closefrm
(
edges
,
0
);
free_table_share
(
share
);
return
-
1
;
}
for
(
Field
**
field
=
edges
->
field
;
*
field
;
++
field
)
{
if
(
strcmp
(
options
->
destid
,
(
*
field
)
->
field_name
))
...
...
@@ -472,6 +480,13 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
break
;
}
if
(
!
destid
)
{
fprint_error
(
"Invalid OQGRAPH backing store ('%s'.destid attribute not set to a valid column of '%s')"
,
p
,
options
->
table_name
);
closefrm
(
edges
,
0
);
free_table_share
(
share
);
return
-
1
;
}
for
(
Field
**
field
=
edges
->
field
;
options
->
weight
&&
*
field
;
++
field
)
{
if
(
strcmp
(
options
->
weight
,
(
*
field
)
->
field_name
))
...
...
@@ -489,9 +504,8 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
break
;
}
if
(
!
origid
||
!
destid
||
(
!
weight
&&
options
->
weight
))
{
fprint_error
(
"Data columns missing on table '%s'"
,
options
->
table_name
);
if
(
!
weight
&&
options
->
weight
)
{
fprint_error
(
"Invalid OQGRAPH backing store ('%s'.weight attribute not set to a valid column of '%s')"
,
p
,
options
->
table_name
);
closefrm
(
edges
,
0
);
free_table_share
(
share
);
return
-
1
;
...
...
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