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
79f8ad1b
Commit
79f8ad1b
authored
Feb 27, 2013
by
Andrew McDonnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error calculating length of underlying table name.
parent
60c7736f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+7
-2
No files found.
storage/oqgraph/ha_oqgraph.cc
View file @
79f8ad1b
...
@@ -361,10 +361,10 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
...
@@ -361,10 +361,10 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
options
->
table_name
,
""
);
options
->
table_name
,
""
);
size_t
tlen
=
strlen
(
options
->
table_name
);
size_t
tlen
=
strlen
(
options
->
table_name
);
size_t
plen
=
(
int
)(
p
-
name
)
+
tlen
;
size_t
plen
=
(
int
)(
p
-
name
)
+
tlen
+
1
;
share
->
path
.
str
=
(
char
*
)
share
->
path
.
str
=
(
char
*
)
alloc_root
(
&
share
->
mem_root
,
plen
+
1
);
alloc_root
(
&
share
->
mem_root
,
plen
);
strmov
(
strnmov
(
share
->
path
.
str
,
name
,
(
int
)(
p
-
name
)
+
1
),
options
->
table_name
);
strmov
(
strnmov
(
share
->
path
.
str
,
name
,
(
int
)(
p
-
name
)
+
1
),
options
->
table_name
);
...
@@ -373,6 +373,8 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
...
@@ -373,6 +373,8 @@ int ha_oqgraph::open(const char *name, int mode, uint test_if_locked)
origid
=
destid
=
weight
=
0
;
origid
=
destid
=
weight
=
0
;
DBUG_PRINT
(
"oq-debug"
,
(
"share:(normalized_path=%s,path.length=%zu)"
,
share
->
normalized_path
.
str
,
share
->
path
.
length
));
while
(
open_table_def
(
thd
,
share
,
0
))
while
(
open_table_def
(
thd
,
share
,
0
))
{
{
if
(
thd
->
is_error
()
&&
thd
->
stmt_da
->
sql_errno
()
!=
ER_NO_SUCH_TABLE
)
if
(
thd
->
is_error
()
&&
thd
->
stmt_da
->
sql_errno
()
!=
ER_NO_SUCH_TABLE
)
...
@@ -844,6 +846,9 @@ int ha_oqgraph::create(const char *name, TABLE *table_arg,
...
@@ -844,6 +846,9 @@ int ha_oqgraph::create(const char *name, TABLE *table_arg,
oqgraph_table_option_struct
*
options
=
oqgraph_table_option_struct
*
options
=
reinterpret_cast
<
oqgraph_table_option_struct
*>
(
table_arg
->
s
->
option_struct
);
reinterpret_cast
<
oqgraph_table_option_struct
*>
(
table_arg
->
s
->
option_struct
);
DBUG_PRINT
(
"oq-debug"
,
(
"create(name=%s)"
,
name
));
if
(
int
res
=
oqgraph_check_table_structure
(
table_arg
))
if
(
int
res
=
oqgraph_check_table_structure
(
table_arg
))
return
error_code
(
res
);
return
error_code
(
res
);
...
...
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