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
dba93629
Commit
dba93629
authored
Apr 01, 2015
by
Rik Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DB-834 check table reports the corrupt index name
parent
b5764141
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
storage/tokudb/ha_tokudb_admin.cc
storage/tokudb/ha_tokudb_admin.cc
+13
-5
No files found.
storage/tokudb/ha_tokudb_admin.cc
View file @
dba93629
...
...
@@ -121,9 +121,10 @@ static int analyze_progress(void *v_extra, uint64_t rows) {
progress_time
=
(
float
)
(
t_now
-
t_start
)
/
(
float
)
t_limit
;
char
*
write_status_msg
=
extra
->
write_status_msg
;
TABLE_SHARE
*
table_share
=
extra
->
table_share
;
sprintf
(
write_status_msg
,
"%s.%s.%s %u of %u %.lf%% rows %.lf%% time"
,
table_share
->
db
.
str
,
table_share
->
table_name
.
str
,
extra
->
key_name
,
extra
->
key_i
,
table_share
->
keys
,
progress_rows
*
100.0
,
progress_time
*
100.0
);
sprintf
(
write_status_msg
,
"%.*s.%.*s.%s %u of %u %.lf%% rows %.lf%% time"
,
(
int
)
table_share
->
db
.
length
,
table_share
->
db
.
str
,
(
int
)
table_share
->
table_name
.
length
,
table_share
->
table_name
.
str
,
extra
->
key_name
,
extra
->
key_i
,
table_share
->
keys
,
progress_rows
*
100.0
,
progress_time
*
100.0
);
thd_proc_info
(
thd
,
write_status_msg
);
return
0
;
}
...
...
@@ -338,8 +339,10 @@ static int ha_tokudb_check_progress(void *extra, float progress) {
static
void
ha_tokudb_check_info
(
THD
*
thd
,
TABLE
*
table
,
const
char
*
msg
)
{
if
(
thd
->
vio_ok
())
{
char
tablename
[
256
];
snprintf
(
tablename
,
sizeof
tablename
,
"%s.%s"
,
table
->
s
->
db
.
str
,
table
->
s
->
table_name
.
str
);
char
tablename
[
table
->
s
->
db
.
length
+
1
+
table
->
s
->
table_name
.
length
+
1
];
snprintf
(
tablename
,
sizeof
tablename
,
"%.*s.%.*s"
,
(
int
)
table
->
s
->
db
.
length
,
table
->
s
->
db
.
str
,
(
int
)
table
->
s
->
table_name
.
length
,
table
->
s
->
table_name
.
str
);
thd
->
protocol
->
prepare_for_resend
();
thd
->
protocol
->
store
(
tablename
,
strlen
(
tablename
),
system_charset_info
);
thd
->
protocol
->
store
(
"check"
,
5
,
system_charset_info
);
...
...
@@ -388,6 +391,11 @@ int ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) {
}
struct
check_context
check_context
=
{
thd
};
r
=
db
->
verify_with_progress
(
db
,
ha_tokudb_check_progress
,
&
check_context
,
(
tokudb_debug
&
TOKUDB_DEBUG_CHECK
)
!=
0
,
keep_going
);
if
(
r
!=
0
)
{
char
msg
[
32
+
strlen
(
kname
)];
sprintf
(
msg
,
"Corrupt %s"
,
kname
);
ha_tokudb_check_info
(
thd
,
table
,
msg
);
}
snprintf
(
write_status_msg
,
sizeof
write_status_msg
,
"%s key=%s %u result=%d"
,
share
->
table_name
,
kname
,
i
,
r
);
thd_proc_info
(
thd
,
write_status_msg
);
if
(
tokudb_debug
&
TOKUDB_DEBUG_CHECK
)
{
...
...
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