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
3d7e06d4
Commit
3d7e06d4
authored
May 02, 2019
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup: remove dead code
parent
ffb83ba6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
103 deletions
+1
-103
sql/ha_partition.h
sql/ha_partition.h
+0
-11
storage/maria/ha_maria.cc
storage/maria/ha_maria.cc
+1
-86
storage/maria/ha_maria.h
storage/maria/ha_maria.h
+0
-6
No files found.
sql/ha_partition.h
View file @
3d7e06d4
...
...
@@ -1443,17 +1443,6 @@ class ha_partition :public handler
void
append_row_to_str
(
String
&
str
);
public:
/*
-------------------------------------------------------------------------
Admin commands not supported currently (almost purely MyISAM routines)
This means that the following methods are not implemented:
-------------------------------------------------------------------------
virtual int backup(TD* thd, HA_CHECK_OPT *check_opt);
virtual int restore(THD* thd, HA_CHECK_OPT *check_opt);
virtual int dump(THD* thd, int fd = -1);
virtual int net_read_dump(NET* net);
*/
/* Enabled keycache for performance reasons, WL#4571 */
virtual
int
assign_to_keycache
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
virtual
int
preload_keys
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
...
...
storage/maria/ha_maria.cc
View file @
3d7e06d4
...
...
@@ -1081,92 +1081,7 @@ uint ha_maria::max_supported_key_length() const
return
maria_max_key_length
();
}
#ifdef HAVE_REPLICATION
int
ha_maria
::
net_read_dump
(
NET
*
net
)
{
int
data_fd
=
file
->
dfile
.
file
;
int
error
=
0
;
mysql_file_seek
(
data_fd
,
0L
,
MY_SEEK_SET
,
MYF
(
MY_WME
));
for
(;;)
{
ulong
packet_len
=
my_net_read
(
net
);
if
(
!
packet_len
)
break
;
// end of file
if
(
packet_len
==
packet_error
)
{
sql_print_error
(
"ha_maria::net_read_dump - read error "
);
error
=
-
1
;
goto
err
;
}
if
(
mysql_file_write
(
data_fd
,
(
uchar
*
)
net
->
read_pos
,
(
uint
)
packet_len
,
MYF
(
MY_WME
|
MY_FNABP
)))
{
error
=
errno
;
goto
err
;
}
}
err:
return
error
;
}
int
ha_maria
::
dump
(
THD
*
thd
,
int
fd
)
{
MARIA_SHARE
*
share
=
file
->
s
;
NET
*
net
=
&
thd
->
net
;
uint
block_size
=
share
->
block_size
;
my_off_t
bytes_to_read
=
share
->
state
.
state
.
data_file_length
;
int
data_fd
=
file
->
dfile
.
file
;
uchar
*
buf
=
(
uchar
*
)
my_malloc
(
block_size
,
MYF
(
MY_WME
));
if
(
!
buf
)
return
ENOMEM
;
int
error
=
0
;
mysql_file_seek
(
data_fd
,
0L
,
MY_SEEK_SET
,
MYF
(
MY_WME
));
for
(;
bytes_to_read
>
0
;)
{
size_t
bytes
=
mysql_file_read
(
data_fd
,
buf
,
block_size
,
MYF
(
MY_WME
));
if
(
bytes
==
MY_FILE_ERROR
)
{
error
=
errno
;
goto
err
;
}
if
(
fd
>=
0
)
{
if
(
mysql_file_write
(
fd
,
buf
,
bytes
,
MYF
(
MY_WME
|
MY_FNABP
)))
{
error
=
errno
?
errno
:
EPIPE
;
goto
err
;
}
}
else
{
if
(
my_net_write
(
net
,
buf
,
bytes
))
{
error
=
errno
?
errno
:
EPIPE
;
goto
err
;
}
}
bytes_to_read
-=
bytes
;
}
if
(
fd
<
0
)
{
if
(
my_net_write
(
net
,
(
uchar
*
)
""
,
0
))
error
=
errno
?
errno
:
EPIPE
;
net_flush
(
net
);
}
err:
my_free
(
buf
);
return
error
;
}
#endif
/* HAVE_REPLICATION */
/* Name is here without an extension */
/* Name is here without an extension */
int
ha_maria
::
open
(
const
char
*
name
,
int
mode
,
uint
test_if_locked
)
{
...
...
storage/maria/ha_maria.h
View file @
3d7e06d4
...
...
@@ -151,15 +151,9 @@ class ha_maria :public handler
}
int
optimize
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
int
restore
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
int
backup
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
int
assign_to_keycache
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
int
preload_keys
(
THD
*
thd
,
HA_CHECK_OPT
*
check_opt
);
bool
check_if_incompatible_data
(
HA_CREATE_INFO
*
info
,
uint
table_changes
);
#ifdef HAVE_REPLICATION
int
dump
(
THD
*
thd
,
int
fd
);
int
net_read_dump
(
NET
*
net
);
#endif
#ifdef HAVE_QUERY_CACHE
my_bool
register_query_cache_table
(
THD
*
thd
,
const
char
*
table_key
,
uint
key_length
,
...
...
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