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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
310584a8
Commit
310584a8
authored
Oct 29, 2010
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Plain Diff
merge w/ 5.1
parents
716f7843
c6b19ea0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
6 deletions
+23
-6
client/mysqltest.cc
client/mysqltest.cc
+10
-5
include/keycache.h
include/keycache.h
+1
-0
mysql-test/r/key_cache.result
mysql-test/r/key_cache.result
+3
-0
mysql-test/r/ps_ddl.result
mysql-test/r/ps_ddl.result
+1
-0
mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
+1
-1
mysql-test/t/ps_ddl.test
mysql-test/t/ps_ddl.test
+4
-0
mysys/mf_keycache.c
mysys/mf_keycache.c
+2
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-0
No files found.
client/mysqltest.cc
View file @
310584a8
...
...
@@ -610,14 +610,14 @@ public:
lines
++
;
int
show_offset
=
0
;
char
buf
[
256
];
char
buf
[
256
+
1
];
/* + zero termination for DBUG_PRINT */
size_t
bytes
;
bool
found_bof
=
false
;
/* Search backward in file until "lines" newline has been found */
while
(
lines
&&
!
found_bof
)
{
show_offset
-=
sizeof
(
buf
);
show_offset
-=
sizeof
(
buf
)
-
1
;
while
(
fseek
(
m_file
,
show_offset
,
SEEK_END
)
!=
0
&&
show_offset
<
0
)
{
found_bof
=
true
;
...
...
@@ -625,7 +625,7 @@ public:
show_offset
++
;
}
if
((
bytes
=
fread
(
buf
,
1
,
sizeof
(
buf
),
m_file
))
<=
0
)
if
((
bytes
=
fread
(
buf
,
1
,
sizeof
(
buf
)
-
1
,
m_file
))
<=
0
)
{
// ferror=0 will happen here if no queries executed yet
if
(
ferror
(
m_file
))
...
...
@@ -635,6 +635,7 @@ public:
DBUG_VOID_RETURN
;
}
IF_DBUG
(
buf
[
bytes
]
=
'\0'
;)
DBUG_PRINT
(
"info"
,
(
"Read %lu bytes from file, buf: %s"
,
(
unsigned
long
)
bytes
,
buf
));
...
...
@@ -679,8 +680,8 @@ public:
}
}
while
((
bytes
=
fread
(
buf
,
1
,
sizeof
(
buf
),
m_file
))
>
0
)
if
(
fwrite
(
buf
,
1
,
bytes
,
stderr
))
while
((
bytes
=
fread
(
buf
,
1
,
sizeof
(
buf
)
-
1
,
m_file
))
>
0
)
if
(
bytes
!=
fwrite
(
buf
,
1
,
bytes
,
stderr
))
die
(
"Failed to write to '%s', errno: %d"
,
m_file_name
,
errno
);
...
...
@@ -723,6 +724,10 @@ void handle_no_error(struct st_command*);
#ifdef EMBEDDED_LIBRARY
/* workaround for MySQL BUG#57491 */
#undef MY_WME
#define MY_WME 0
/* attributes of the query thread */
pthread_attr_t
cn_thd_attrib
;
...
...
include/keycache.h
View file @
310584a8
...
...
@@ -46,6 +46,7 @@ typedef struct st_key_cache_statistics
ulonglong
blocks_used
;
/* maximum number of used blocks/buffers */
ulonglong
blocks_unused
;
/* number of currently unused blocks */
ulonglong
blocks_changed
;
/* number of currently dirty blocks */
ulonglong
blocks_warm
;
/* number of blocks in warm sub-chain */
ulonglong
read_requests
;
/* number of read requests (read hits) */
ulonglong
reads
;
/* number of actual reads from files into buffers */
ulonglong
write_requests
;
/* number of write requests (write hits) */
...
...
mysql-test/r/key_cache.result
View file @
310584a8
...
...
@@ -412,6 +412,7 @@ Variable_name Value
Key_blocks_not_flushed 0
Key_blocks_unused KEY_BLOCKS_UNUSED
Key_blocks_used 4
Key_blocks_warm 0
Key_read_requests 22
Key_reads 0
Key_write_requests 26
...
...
@@ -459,6 +460,7 @@ Variable_name Value
Key_blocks_not_flushed 0
Key_blocks_unused KEY_BLOCKS_UNUSED
Key_blocks_used 4
Key_blocks_warm 0
Key_read_requests 22
Key_reads 0
Key_write_requests 26
...
...
@@ -501,6 +503,7 @@ Variable_name Value
Key_blocks_not_flushed 0
Key_blocks_unused KEY_BLOCKS_UNUSED
Key_blocks_used 4
Key_blocks_warm 0
Key_read_requests 22
Key_reads 0
Key_write_requests 26
...
...
mysql-test/r/ps_ddl.result
View file @
310584a8
...
...
@@ -4,6 +4,7 @@ drop procedure if exists p_verify_reprepare_count;
drop procedure if exists p1;
drop function if exists f1;
drop view if exists v1, v2;
TRUNCATE TABLE mysql.general_log;
create procedure p_verify_reprepare_count(expected int)
begin
declare old_reprepare_count int default @reprepare_count;
...
...
mysql-test/suite/rpl/t/rpl_loaddata_symlink.test
View file @
310584a8
...
...
@@ -3,8 +3,8 @@
# This test verifies if loading data infile will work fine
# if the path of the load data file is a symbolic link.
#
--
source
include
/
master
-
slave
.
inc
--
source
include
/
not_windows
.
inc
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_binlog_format_statement
.
inc
create
table
t1
(
a
int
not
null
auto_increment
,
b
int
,
primary
key
(
a
)
);
...
...
mysql-test/t/ps_ddl.test
View file @
310584a8
...
...
@@ -58,6 +58,10 @@ drop function if exists f1;
drop
view
if
exists
v1
,
v2
;
--
enable_warnings
# Avoid selecting from a huge table possibly left over from previous tests,
# as this really hurts --valgrind testing.
TRUNCATE
TABLE
mysql
.
general_log
;
delimiter
|
;
create
procedure
p_verify_reprepare_count
(
expected
int
)
begin
...
...
mysys/mf_keycache.c
View file @
310584a8
...
...
@@ -4906,6 +4906,7 @@ void get_simple_key_cache_statistics(SIMPLE_KEY_CACHE_CB *keycache,
keycache_stats
->
blocks_used
=
keycache
->
blocks_used
;
keycache_stats
->
blocks_unused
=
keycache
->
blocks_unused
;
keycache_stats
->
blocks_changed
=
keycache
->
global_blocks_changed
;
keycache_stats
->
blocks_warm
=
keycache
->
warm_blocks
;
keycache_stats
->
read_requests
=
keycache
->
global_cache_r_requests
;
keycache_stats
->
reads
=
keycache
->
global_cache_read
;
keycache_stats
->
write_requests
=
keycache
->
global_cache_w_requests
;
...
...
@@ -5797,6 +5798,7 @@ get_partitioned_key_cache_statistics(PARTITIONED_KEY_CACHE_CB *keycache,
keycache_stats
->
blocks_used
+=
partition
->
blocks_used
;
keycache_stats
->
blocks_unused
+=
partition
->
blocks_unused
;
keycache_stats
->
blocks_changed
+=
partition
->
global_blocks_changed
;
keycache_stats
->
blocks_warm
+=
partition
->
warm_blocks
;
keycache_stats
->
read_requests
+=
partition
->
global_cache_r_requests
;
keycache_stats
->
reads
+=
partition
->
global_cache_read
;
keycache_stats
->
write_requests
+=
partition
->
global_cache_w_requests
;
...
...
sql/mysqld.cc
View file @
310584a8
...
...
@@ -7973,6 +7973,7 @@ static int show_default_keycache(THD *thd, SHOW_VAR *var, char *buff)
set_one_keycache_var
(
"blocks_not_flushed"
,
blocks_changed
);
set_one_keycache_var
(
"blocks_unused"
,
blocks_unused
);
set_one_keycache_var
(
"blocks_used"
,
blocks_used
);
set_one_keycache_var
(
"blocks_warm"
,
blocks_warm
);
set_one_keycache_var
(
"read_requests"
,
read_requests
);
set_one_keycache_var
(
"reads"
,
reads
);
set_one_keycache_var
(
"write_requests"
,
write_requests
);
...
...
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