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
a77a73fd
Commit
a77a73fd
authored
Mar 31, 2014
by
Rich Prohaska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#204 print compression status variables
parent
b75eeb27
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
47 deletions
+44
-47
storage/tokudb/hatoku_hton.cc
storage/tokudb/hatoku_hton.cc
+44
-47
No files found.
storage/tokudb/hatoku_hton.cc
View file @
a77a73fd
...
@@ -1105,24 +1105,24 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) {
...
@@ -1105,24 +1105,24 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) {
case
CHARSTR
:
case
CHARSTR
:
snprintf
(
buf
,
bufsiz
,
"%s"
,
mystat
[
row
].
value
.
str
);
snprintf
(
buf
,
bufsiz
,
"%s"
,
mystat
[
row
].
value
.
str
);
break
;
break
;
case
UNIXTIME
:
case
UNIXTIME
:
{
{
time_t
t
=
mystat
[
row
].
value
.
num
;
time_t
t
=
mystat
[
row
].
value
.
num
;
char
tbuf
[
26
];
char
tbuf
[
26
];
snprintf
(
buf
,
bufsiz
,
"%.24s"
,
ctime_r
(
&
t
,
tbuf
));
snprintf
(
buf
,
bufsiz
,
"%.24s"
,
ctime_r
(
&
t
,
tbuf
));
}
break
;
break
;
case
TOKUTIME
:
}
{
case
TOKUTIME
:
{
double
t
=
tokutime_to_seconds
(
mystat
[
row
].
value
.
num
);
double
t
=
tokutime_to_seconds
(
mystat
[
row
].
value
.
num
);
snprintf
(
buf
,
bufsiz
,
"%.6f"
,
t
);
snprintf
(
buf
,
bufsiz
,
"%.6f"
,
t
);
}
break
;
break
;
case
PARCOUNT
:
}
{
case
PARCOUNT
:
{
uint64_t
v
=
read_partitioned_counter
(
mystat
[
row
].
value
.
parcount
);
uint64_t
v
=
read_partitioned_counter
(
mystat
[
row
].
value
.
parcount
);
snprintf
(
buf
,
bufsiz
,
"%"
PRIu64
,
v
);
snprintf
(
buf
,
bufsiz
,
"%"
PRIu64
,
v
);
break
;
}
}
case
DOUBLE
:
snprintf
(
buf
,
bufsiz
,
"%.6f"
,
mystat
[
row
].
value
.
dnum
);
break
;
break
;
default:
default:
snprintf
(
buf
,
bufsiz
,
"UNKNOWN STATUS TYPE: %d"
,
mystat
[
row
].
type
);
snprintf
(
buf
,
bufsiz
,
"UNKNOWN STATUS TYPE: %d"
,
mystat
[
row
].
type
);
...
@@ -2216,42 +2216,39 @@ static int show_tokudb_vars(THD *thd, SHOW_VAR *var, char *buff) {
...
@@ -2216,42 +2216,39 @@ static int show_tokudb_vars(THD *thd, SHOW_VAR *var, char *buff) {
status_var
.
type
=
SHOW_CHAR
;
status_var
.
type
=
SHOW_CHAR
;
status_var
.
value
=
(
char
*
)
status_row
.
value
.
str
;
status_var
.
value
=
(
char
*
)
status_row
.
value
.
str
;
break
;
break
;
case
UNIXTIME
:
case
UNIXTIME
:
{
{
status_var
.
type
=
SHOW_CHAR
;
status_var
.
type
=
SHOW_CHAR
;
time_t
t
=
status_row
.
value
.
num
;
time_t
t
=
status_row
.
value
.
num
;
char
tbuf
[
26
];
char
tbuf
[
26
];
// Reuse the memory in status_row. (It belongs to us).
// Reuse the memory in status_row. (It belongs to us).
snprintf
(
status_row
.
value
.
datebuf
,
sizeof
(
status_row
.
value
.
datebuf
),
"%.24s"
,
ctime_r
(
&
t
,
tbuf
));
snprintf
(
status_row
.
value
.
datebuf
,
sizeof
(
status_row
.
value
.
datebuf
),
"%.24s"
,
ctime_r
(
&
t
,
tbuf
));
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
datebuf
[
0
];
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
datebuf
[
0
];
}
break
;
break
;
}
case
TOKUTIME
:
case
TOKUTIME
:
{
status_var
.
type
=
SHOW_DOUBLE
;
status_var
.
type
=
SHOW_DOUBLE
;
double
t
=
tokutime_to_seconds
(
status_row
.
value
.
num
);
// Reuse the memory in status_row. (It belongs to us).
// Reuse the memory in status_row. (It belongs to us).
status_row
.
value
.
dnum
=
t
;
status_row
.
value
.
dnum
=
tokutime_to_seconds
(
status_row
.
value
.
num
)
;
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
dnum
;
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
dnum
;
}
break
;
break
;
case
PARCOUNT
:
case
PARCOUNT
:
{
{
status_var
.
type
=
SHOW_LONGLONG
;
status_var
.
type
=
SHOW_LONGLONG
;
uint64_t
v
=
read_partitioned_counter
(
status_row
.
value
.
parcount
);
uint64_t
v
=
read_partitioned_counter
(
status_row
.
value
.
parcount
);
// Reuse the memory in status_row. (It belongs to us).
// Reuse the memory in status_row. (It belongs to us).
status_row
.
value
.
num
=
v
;
status_row
.
value
.
num
=
v
;
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
num
;
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
num
;
break
;
}
}
case
DOUBLE
:
status_var
.
type
=
SHOW_DOUBLE
;
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
dnum
;
break
;
break
;
default:
default:
{
status_var
.
type
=
SHOW_CHAR
;
status_var
.
type
=
SHOW_CHAR
;
// Reuse the memory in status_row.datebuf. (It belongs to us).
// Reuse the memory in status_row.datebuf. (It belongs to us).
// UNKNOWN TYPE: %d fits in 26 bytes (sizeof datebuf) for any integer.
// UNKNOWN TYPE: %d fits in 26 bytes (sizeof datebuf) for any integer.
snprintf
(
status_row
.
value
.
datebuf
,
sizeof
(
status_row
.
value
.
datebuf
),
"UNKNOWN TYPE: %d"
,
status_row
.
type
);
snprintf
(
status_row
.
value
.
datebuf
,
sizeof
(
status_row
.
value
.
datebuf
),
"UNKNOWN TYPE: %d"
,
status_row
.
type
);
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
datebuf
[
0
];
status_var
.
value
=
(
char
*
)
&
status_row
.
value
.
datebuf
[
0
];
}
break
;
break
;
}
}
}
}
...
...
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