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
174fc2a8
Commit
174fc2a8
authored
Sep 09, 2013
by
Andrew McDonnell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix remaining build problems caused by merge from lp:maria/10.0
parent
6d1d8847
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
93 additions
and
43 deletions
+93
-43
mysql-test/suite/oqgraph/create_attr.test
mysql-test/suite/oqgraph/create_attr.test
+8
-0
storage/oqgraph/ha_oqgraph.cc
storage/oqgraph/ha_oqgraph.cc
+80
-39
storage/oqgraph/ha_oqgraph.h
storage/oqgraph/ha_oqgraph.h
+2
-1
storage/oqgraph/oqgraph_thunk.cc
storage/oqgraph/oqgraph_thunk.cc
+3
-3
No files found.
mysql-test/suite/oqgraph/create_attr.test
View file @
174fc2a8
...
@@ -202,6 +202,14 @@ DROP TABLE IF EXISTS oqtable;
...
@@ -202,6 +202,14 @@ DROP TABLE IF EXISTS oqtable;
CREATE
TABLE
oqtable
(
latch
varchar
(
32
)
NULL
NULL
,
origid
BIGINT
UNSIGNED
NULL
,
destid
BIGINT
UNSIGNED
NULL
,
weight
DOUBLE
NULL
,
seq
BIGINT
UNSIGNED
NULL
,
linkid
BIGINT
UNSIGNED
NULL
,
KEY
(
latch
,
origid
,
destid
)
USING
HASH
,
KEY
(
latch
,
destid
,
origid
)
USING
HASH
)
ENGINE
=
OQGRAPH
,
DATA_TABLE
=
'backing'
,
ORIGID
=
'id'
,
DESTID
=
'id2'
,
WEIGHT
=
'weight'
;
CREATE
TABLE
oqtable
(
latch
varchar
(
32
)
NULL
NULL
,
origid
BIGINT
UNSIGNED
NULL
,
destid
BIGINT
UNSIGNED
NULL
,
weight
DOUBLE
NULL
,
seq
BIGINT
UNSIGNED
NULL
,
linkid
BIGINT
UNSIGNED
NULL
,
KEY
(
latch
,
origid
,
destid
)
USING
HASH
,
KEY
(
latch
,
destid
,
origid
)
USING
HASH
)
ENGINE
=
OQGRAPH
,
DATA_TABLE
=
'backing'
,
ORIGID
=
'id'
,
DESTID
=
'id2'
,
WEIGHT
=
'weight'
;
DESCRIBE
oqtable
;
DESCRIBE
oqtable
;
#-- Expect an error if we attempt to use a view as the backing store
#-- 'VIEWs are not supported for an OQGRAPH backing store.'
#-- TODO
#-- TODO - what happens if we make two tables with the same backing store?
#-- TODO - what happens if data_table is a TEMPORARY table?
# cleanup
# cleanup
--
disable_warnings
--
disable_warnings
DROP
TABLE
IF
EXISTS
oqtable
;
DROP
TABLE
IF
EXISTS
oqtable
;
...
...
storage/oqgraph/ha_oqgraph.cc
View file @
174fc2a8
This diff is collapsed.
Click to expand it.
storage/oqgraph/ha_oqgraph.h
View file @
174fc2a8
...
@@ -44,6 +44,7 @@ namespace open_query
...
@@ -44,6 +44,7 @@ namespace open_query
class
ha_oqgraph
:
public
handler
class
ha_oqgraph
:
public
handler
{
{
TABLE_SHARE
share
[
1
];
TABLE_SHARE
share
[
1
];
bool
have_table_share
;
TABLE
edges
[
1
];
TABLE
edges
[
1
];
Field
*
origid
;
Field
*
origid
;
Field
*
destid
;
Field
*
destid
;
...
@@ -62,7 +63,7 @@ class ha_oqgraph: public handler
...
@@ -62,7 +63,7 @@ class ha_oqgraph: public handler
ha_oqgraph
(
TABLE
*
table
);
ha_oqgraph
(
TABLE
*
table
);
Table_flags
table_flags
()
const
;
Table_flags
table_flags
()
const
;
#endif
#endif
~
ha_oqgraph
();
virtual
~
ha_oqgraph
();
const
char
*
index_type
(
uint
inx
)
const
char
*
index_type
(
uint
inx
)
{
{
return
"HASH"
;
return
"HASH"
;
...
...
storage/oqgraph/oqgraph_thunk.cc
View file @
174fc2a8
...
@@ -179,7 +179,7 @@ int oqgraph3::cursor::restore_position()
...
@@ -179,7 +179,7 @@ int oqgraph3::cursor::restore_position()
if
(
int
rc
=
table
.
file
->
ha_index_read_map
(
if
(
int
rc
=
table
.
file
->
ha_index_read_map
(
table
.
record
[
0
],
(
const
uchar
*
)
_key
.
data
(),
table
.
record
[
0
],
(
const
uchar
*
)
_key
.
data
(),
(
key_part_map
)(
1
<<
_parts
)
-
1
,
(
key_part_map
)(
1
<<
_parts
)
-
1
,
table
.
s
->
key_info
[
_index
].
key_parts
==
_parts
?
table
.
s
->
key_info
[
_index
].
user_defined_
key_parts
==
_parts
?
HA_READ_KEY_EXACT
:
HA_READ_KEY_OR_NEXT
))
HA_READ_KEY_EXACT
:
HA_READ_KEY_OR_NEXT
))
{
{
table
.
file
->
ha_index_end
();
table
.
file
->
ha_index_end
();
...
@@ -439,7 +439,7 @@ int oqgraph3::cursor::seek_to(
...
@@ -439,7 +439,7 @@ int oqgraph3::cursor::seek_to(
*
key_end
=
key_info
+
table
.
s
->
keys
;
*
key_end
=
key_info
+
table
.
s
->
keys
;
key_info
<
key_end
;
++
key_info
,
++
i
)
key_info
<
key_end
;
++
key_info
,
++
i
)
{
{
if
(
key_info
->
key_parts
<
2
)
if
(
key_info
->
user_defined_
key_parts
<
2
)
continue
;
continue
;
if
(
!
((
key_info
->
key_part
[
0
].
offset
==
target_fieldpos
&&
if
(
!
((
key_info
->
key_part
[
0
].
offset
==
target_fieldpos
&&
key_info
->
key_part
[
1
].
offset
==
source_fieldpos
)
||
key_info
->
key_part
[
1
].
offset
==
source_fieldpos
)
||
...
@@ -490,7 +490,7 @@ int oqgraph3::cursor::seek_to(
...
@@ -490,7 +490,7 @@ int oqgraph3::cursor::seek_to(
if
(
int
rc
=
table
.
file
->
ha_index_read_map
(
if
(
int
rc
=
table
.
file
->
ha_index_read_map
(
table
.
record
[
0
],
(
uchar
*
)
_key
.
data
(),
table
.
record
[
0
],
(
uchar
*
)
_key
.
data
(),
(
key_part_map
)
((
1U
<<
_parts
)
-
1
),
(
key_part_map
)
((
1U
<<
_parts
)
-
1
),
table
.
s
->
key_info
[
_index
].
key_parts
==
_parts
?
table
.
s
->
key_info
[
_index
].
user_defined_
key_parts
==
_parts
?
HA_READ_KEY_EXACT
:
HA_READ_KEY_OR_NEXT
))
HA_READ_KEY_EXACT
:
HA_READ_KEY_OR_NEXT
))
{
{
table
.
file
->
ha_index_end
();
table
.
file
->
ha_index_end
();
...
...
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