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
fac710e9
Commit
fac710e9
authored
Nov 21, 2019
by
Will DeVries
Committed by
Sergei Petrunia
Mar 10, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move add_current_table_to_rpl_table_list out of ha_clustrixdb class.
parent
1de262b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
storage/clustrixdb/ha_clustrixdb.cc
storage/clustrixdb/ha_clustrixdb.cc
+12
-12
storage/clustrixdb/ha_clustrixdb.h
storage/clustrixdb/ha_clustrixdb.h
+3
-3
No files found.
storage/clustrixdb/ha_clustrixdb.cc
View file @
fac710e9
...
...
@@ -269,7 +269,6 @@ ha_clustrixdb::ha_clustrixdb(handlerton *hton, TABLE_SHARE *table_arg)
:
handler
(
hton
,
table_arg
)
{
DBUG_ENTER
(
"ha_clustrixdb::ha_clustrixdb"
);
rli
=
NULL
;
rgi
=
NULL
;
scan_cur
=
NULL
;
clustrix_table_oid
=
0
;
...
...
@@ -278,8 +277,8 @@ ha_clustrixdb::ha_clustrixdb(handlerton *hton, TABLE_SHARE *table_arg)
ha_clustrixdb
::~
ha_clustrixdb
()
{
if
(
r
l
i
)
ha_clustrixdb
::
remove_current_table_from_rpl_table_list
(
);
if
(
r
g
i
)
remove_current_table_from_rpl_table_list
(
rgi
);
}
int
ha_clustrixdb
::
create
(
const
char
*
name
,
TABLE
*
form
,
HA_CREATE_INFO
*
info
)
...
...
@@ -720,7 +719,7 @@ int ha_clustrixdb::index_init(uint idx, bool sorted)
return
error_code
;
active_index
=
idx
;
add_current_table_to_rpl_table_list
();
add_current_table_to_rpl_table_list
(
&
rgi
,
thd
,
table
);
scan_cur
=
NULL
;
/* Return all columns until there is a better understanding of
...
...
@@ -885,7 +884,7 @@ int ha_clustrixdb::rnd_init(bool scan)
if
(
!
trx
)
DBUG_RETURN
(
error_code
);
add_current_table_to_rpl_table_list
();
add_current_table_to_rpl_table_list
(
&
rgi
,
thd
,
table
);
is_scan
=
scan
;
scan_cur
=
NULL
;
...
...
@@ -1092,16 +1091,17 @@ int ha_clustrixdb::info_push(uint info_type, void *info)
return
0
;
}
void
ha_clustrixdb
::
add_current_table_to_rpl_table_list
()
void
add_current_table_to_rpl_table_list
(
rpl_group_info
**
_rgi
,
THD
*
thd
,
TABLE
*
table
)
{
if
(
rl
i
)
if
(
*
_rg
i
)
return
;
THD
*
thd
=
ha_thd
();
rli
=
new
Relay_log_info
(
FALSE
);
Relay_log_info
*
rli
=
new
Relay_log_info
(
FALSE
);
rli
->
sql_driver_thd
=
thd
;
rgi
=
new
rpl_group_info
(
rli
);
rpl_group_info
*
rgi
=
new
rpl_group_info
(
rli
);
*
_rgi
=
rgi
;
rgi
->
thd
=
thd
;
rgi
->
tables_to_lock_count
=
0
;
rgi
->
tables_to_lock
=
NULL
;
...
...
@@ -1129,7 +1129,7 @@ void ha_clustrixdb::add_current_table_to_rpl_table_list()
my_afree
(
col_type
);
}
void
ha_clustrixdb
::
remove_current_table_from_rpl_table_list
(
)
void
remove_current_table_from_rpl_table_list
(
rpl_group_info
*
rgi
)
{
if
(
!
rgi
->
tables_to_lock
)
return
;
...
...
@@ -1139,7 +1139,7 @@ void ha_clustrixdb::remove_current_table_from_rpl_table_list()
my_free
(
rgi
->
tables_to_lock
);
rgi
->
tables_to_lock_count
--
;
rgi
->
tables_to_lock
=
NULL
;
delete
rli
;
delete
r
gi
->
r
li
;
delete
rgi
;
}
...
...
storage/clustrixdb/ha_clustrixdb.h
View file @
fac710e9
...
...
@@ -23,13 +23,15 @@ Copyright (c) 2019, MariaDB Corporation.
size_t
estimate_row_size
(
TABLE
*
table
);
clustrix_connection
*
get_trx
(
THD
*
thd
,
int
*
error_code
);
bool
get_enable_sh
(
THD
*
thd
);
void
add_current_table_to_rpl_table_list
(
rpl_group_info
**
_rgi
,
THD
*
thd
,
TABLE
*
table
);
void
remove_current_table_from_rpl_table_list
(
rpl_group_info
*
rgi
);
class
ha_clustrixdb
:
public
handler
{
private:
ulonglong
clustrix_table_oid
;
rpl_group_info
*
rgi
;
Relay_log_info
*
rli
;
Field
*
auto_inc_field
;
ulonglong
auto_inc_value
;
...
...
@@ -105,8 +107,6 @@ class ha_clustrixdb : public handler
int
info_push
(
uint
info_type
,
void
*
info
);
private:
void
add_current_table_to_rpl_table_list
();
void
remove_current_table_from_rpl_table_list
();
void
build_key_packed_row
(
uint
index
,
const
uchar
*
buf
,
uchar
*
packed_key
,
size_t
*
packed_key_len
);
};
...
...
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