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
ad0ee8cd
Commit
ad0ee8cd
authored
Jun 25, 2024
by
Yuchen Pei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-33746 [fixup] Add suggested overrides in oqgraph
parent
01289dac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
42 deletions
+42
-42
storage/oqgraph/graphcore.cc
storage/oqgraph/graphcore.cc
+9
-9
storage/oqgraph/ha_oqgraph.h
storage/oqgraph/ha_oqgraph.h
+33
-33
No files found.
storage/oqgraph/graphcore.cc
View file @
ad0ee8cd
...
@@ -266,10 +266,10 @@ namespace open_query {
...
@@ -266,10 +266,10 @@ namespace open_query {
:
oqgraph_cursor
(
arg
),
no_weight
(),
sequence
(
0
),
results
(),
last
()
:
oqgraph_cursor
(
arg
),
no_weight
(),
sequence
(
0
),
results
(),
last
()
{
}
{
}
int
fetch_row
(
const
row
&
,
row
&
);
int
fetch_row
(
const
row
&
,
row
&
)
override
;
int
fetch_row
(
const
row
&
,
row
&
,
const
reference
&
);
int
fetch_row
(
const
row
&
,
row
&
,
const
reference
&
)
override
;
void
current
(
reference
&
ref
)
const
void
current
(
reference
&
ref
)
const
override
{
{
ref
=
last
;
ref
=
last
;
}
}
...
@@ -286,10 +286,10 @@ namespace open_query {
...
@@ -286,10 +286,10 @@ namespace open_query {
:
oqgraph_cursor
(
arg
),
position
(
0
)
:
oqgraph_cursor
(
arg
),
position
(
0
)
{
}
{
}
int
fetch_row
(
const
row
&
,
row
&
);
int
fetch_row
(
const
row
&
,
row
&
)
override
;
int
fetch_row
(
const
row
&
,
row
&
,
const
reference
&
);
int
fetch_row
(
const
row
&
,
row
&
,
const
reference
&
)
override
;
void
current
(
reference
&
ref
)
const
void
current
(
reference
&
ref
)
const
override
{
{
ref
=
last
;
ref
=
last
;
}
}
...
@@ -308,10 +308,10 @@ namespace open_query {
...
@@ -308,10 +308,10 @@ namespace open_query {
:
oqgraph_cursor
(
arg
),
position
(
0
),
last
()
:
oqgraph_cursor
(
arg
),
position
(
0
),
last
()
{
}
{
}
int
fetch_row
(
const
row
&
,
row
&
);
int
fetch_row
(
const
row
&
,
row
&
)
override
;
int
fetch_row
(
const
row
&
,
row
&
,
const
reference
&
);
int
fetch_row
(
const
row
&
,
row
&
,
const
reference
&
)
override
;
void
current
(
reference
&
ref
)
const
void
current
(
reference
&
ref
)
const
override
{
{
ref
=
last
;
ref
=
last
;
}
}
...
...
storage/oqgraph/ha_oqgraph.h
View file @
ad0ee8cd
...
@@ -58,59 +58,59 @@ class ha_oqgraph: public handler
...
@@ -58,59 +58,59 @@ class ha_oqgraph: public handler
public:
public:
#if MYSQL_VERSION_ID >= 50100
#if MYSQL_VERSION_ID >= 50100
ha_oqgraph
(
handlerton
*
hton
,
TABLE_SHARE
*
table
);
ha_oqgraph
(
handlerton
*
hton
,
TABLE_SHARE
*
table
);
ulonglong
table_flags
()
const
;
ulonglong
table_flags
()
const
override
;
#else
#else
ha_oqgraph
(
TABLE
*
table
);
ha_oqgraph
(
TABLE
*
table
);
Table_flags
table_flags
()
const
;
Table_flags
table_flags
()
const
;
#endif
#endif
virtual
~
ha_oqgraph
();
virtual
~
ha_oqgraph
();
const
char
*
index_type
(
uint
inx
)
const
char
*
index_type
(
uint
inx
)
override
{
{
return
"HASH"
;
return
"HASH"
;
}
}
/* Rows also use a fixed-size format */
/* Rows also use a fixed-size format */
enum
row_type
get_row_type
()
const
{
return
ROW_TYPE_FIXED
;
}
enum
row_type
get_row_type
()
const
override
{
return
ROW_TYPE_FIXED
;
}
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
;
ulong
index_flags
(
uint
inx
,
uint
part
,
bool
all_parts
)
const
override
;
const
char
**
bas_ext
()
const
;
const
char
**
bas_ext
()
const
;
uint
max_supported_keys
()
const
{
return
MAX_KEY
;
}
uint
max_supported_keys
()
const
override
{
return
MAX_KEY
;
}
uint
max_supported_key_part_length
()
const
{
return
MAX_KEY_LENGTH
;
}
uint
max_supported_key_part_length
()
const
override
{
return
MAX_KEY_LENGTH
;
}
double
scan_time
()
{
return
(
double
)
1000000000
;
}
double
scan_time
()
override
{
return
(
double
)
1000000000
;
}
double
read_time
(
uint
index
,
uint
ranges
,
ha_rows
rows
)
double
read_time
(
uint
,
uint
,
ha_rows
)
override
{
return
1
;
}
{
return
1
;
}
// Doesn't make sense to change the engine on a virtual table.
// Doesn't make sense to change the engine on a virtual table.
virtual
bool
can_switch_engines
()
{
return
false
;
}
virtual
bool
can_switch_engines
()
override
{
return
false
;
}
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
);
int
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
override
;
int
close
(
void
);
int
close
(
void
)
override
;
int
write_row
(
const
byte
*
buf
);
int
write_row
(
const
byte
*
buf
)
override
;
int
update_row
(
const
uchar
*
old_data
,
const
uchar
*
new_data
);
int
update_row
(
const
uchar
*
old_data
,
const
uchar
*
new_data
)
override
;
int
delete_row
(
const
byte
*
buf
);
int
delete_row
(
const
byte
*
buf
)
override
;
int
index_read
(
byte
*
buf
,
const
byte
*
key
,
int
index_read
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
);
uint
key_len
,
enum
ha_rkey_function
find_flag
)
override
;
int
index_read_idx
(
byte
*
buf
,
uint
idx
,
const
byte
*
key
,
int
index_read_idx
(
byte
*
buf
,
uint
idx
,
const
byte
*
key
,
uint
key_len
,
enum
ha_rkey_function
find_flag
);
uint
key_len
,
enum
ha_rkey_function
find_flag
);
int
index_next_same
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
);
int
index_next_same
(
byte
*
buf
,
const
byte
*
key
,
uint
key_len
)
override
;
int
rnd_init
(
bool
scan
);
int
rnd_init
(
bool
scan
)
override
;
int
rnd_next
(
byte
*
buf
);
int
rnd_next
(
byte
*
buf
)
override
;
int
rnd_pos
(
byte
*
buf
,
byte
*
pos
);
int
rnd_pos
(
byte
*
buf
,
byte
*
pos
)
override
;
void
position
(
const
byte
*
record
);
void
position
(
const
byte
*
record
)
override
;
int
info
(
uint
);
int
info
(
uint
)
override
;
int
extra
(
enum
ha_extra_function
operation
);
int
extra
(
enum
ha_extra_function
operation
)
override
;
int
external_lock
(
THD
*
thd
,
int
lock_type
);
int
external_lock
(
THD
*
thd
,
int
lock_type
)
override
;
int
delete_all_rows
(
void
);
int
delete_all_rows
(
void
)
override
;
ha_rows
records_in_range
(
uint
inx
,
const
key_range
*
min_key
,
ha_rows
records_in_range
(
uint
inx
,
const
key_range
*
min_key
,
const
key_range
*
max_key
,
page_range
*
pages
);
const
key_range
*
max_key
,
page_range
*
pages
)
override
;
int
delete_table
(
const
char
*
from
);
int
delete_table
(
const
char
*
from
)
override
;
int
rename_table
(
const
char
*
from
,
const
char
*
to
);
int
rename_table
(
const
char
*
from
,
const
char
*
to
)
override
;
int
create
(
const
char
*
name
,
TABLE
*
form
,
HA_CREATE_INFO
*
create_info
);
int
create
(
const
char
*
name
,
TABLE
*
form
,
HA_CREATE_INFO
*
create_info
)
override
;
void
update_create_info
(
HA_CREATE_INFO
*
create_info
);
void
update_create_info
(
HA_CREATE_INFO
*
create_info
)
override
;
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
THR_LOCK_DATA
**
store_lock
(
THD
*
thd
,
THR_LOCK_DATA
**
to
,
enum
thr_lock_type
lock_type
);
enum
thr_lock_type
lock_type
)
override
;
int
cmp_ref
(
const
byte
*
ref1
,
const
byte
*
ref2
);
int
cmp_ref
(
const
byte
*
ref1
,
const
byte
*
ref2
)
override
;
bool
get_error_message
(
int
error
,
String
*
buf
);
bool
get_error_message
(
int
error
,
String
*
buf
)
override
;
void
fprint_error
(
const
char
*
fmt
,
...);
void
fprint_error
(
const
char
*
fmt
,
...);
...
@@ -123,7 +123,7 @@ class ha_oqgraph: public handler
...
@@ -123,7 +123,7 @@ class ha_oqgraph: public handler
uint
key_length
,
uint
key_length
,
qc_engine_callback
qc_engine_callback
*
engine_callback
,
*
engine_callback
,
ulonglong
*
engine_data
)
ulonglong
*
engine_data
)
override
{
{
/*
/*
Do not put data from OQGRAPH tables into query cache (because there
Do not put data from OQGRAPH tables into query cache (because there
...
...
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