Skip to content

Commit

Permalink
Merge branch 'ps-5.6-bugps3937-non_instrumented_file_operations' into…
Browse files Browse the repository at this point in the history
… ps-5.7-bugps3937-non_instrumented_file_operations

Modified 'rpl.rpl_binlog_sender_fseek' MTR test case - changed the number
of expected IO events.
  • Loading branch information
percona-ysorokin committed Apr 2, 2018
2 parents 56da30b + fbdd844 commit b9deeac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions mysql-test/suite/perfschema/r/relaylog.result
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
master-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
master-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE
select * from performance_schema.file_summary_by_instance
where file_name like "%slave-%" order by file_name;
FILE_NAME EVENT_NAME OBJECT_INSTANCE_BEGIN COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT COUNT_READ SUM_TIMER_READ MIN_TIMER_READ AVG_TIMER_READ MAX_TIMER_READ SUM_NUMBER_OF_BYTES_READ COUNT_WRITE SUM_TIMER_WRITE MIN_TIMER_WRITE AVG_TIMER_WRITE MAX_TIMER_WRITE SUM_NUMBER_OF_BYTES_WRITE COUNT_MISC SUM_TIMER_MISC MIN_TIMER_MISC AVG_TIMER_MISC MAX_TIMER_MISC
Expand All @@ -39,7 +39,7 @@ from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
master-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
master-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
Expand All @@ -51,7 +51,7 @@ where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
wait/io/file/sql/binlog_cache NONE NONE NONE NONE
wait/io/file/sql/binlog_index MANY NONE NONE NONE
wait/io/file/sql/binlog_index MANY NONE MANY NONE
wait/io/file/sql/binlog_index_cache NONE NONE NONE NONE
select
EVENT_NAME,
Expand Down Expand Up @@ -119,10 +119,10 @@ where file_name like "%slave-%"
order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
slave-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
slave-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE
slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
slave-relay-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE
"Expect a slave binlog + binlog_index"
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
Expand All @@ -135,8 +135,8 @@ from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
slave-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
slave-relay-bin.index wait/io/file/sql/binlog_index NONE NONE NONE NONE
slave-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE
slave-relay-bin.index wait/io/file/sql/binlog_index MANY NONE MANY NONE
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
Expand Down
12 changes: 6 additions & 6 deletions mysql-test/suite/rpl/t/rpl_binlog_sender_fseek.test
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
# sometimes, cross the IO_CACHE block size. After running the workload, the test
# case will verify the P_S counter COUNT_MISC for "wait/io/file/sql/binlog"
# EVENT_NAME at performance_schema.file_summary_by_event_name. In a single
# binary log file case, the counter should not be more than 5 (as there are some
# binary log file case, the counter should not be more than 6 (as there are some
# real file operations opening the binary log file and pointing it to the first
# event position) or 8 in the case of GTIDs be enabled with auto positioning.
# event position) or 9 in the case of GTIDs be enabled with auto positioning.
#
# ==== Related Bugs and Worklogs ====
#
Expand Down Expand Up @@ -106,21 +106,21 @@ TRUNCATE performance_schema.file_summary_by_event_name;

# Check the COUNT_MISC counter
--source include/rpl_connection_master.inc
# In a first run, the counter tops 5 without GTIDs, and tops 8 when GTIDs are
# In a first run, the counter tops 6 without GTIDs, and tops 9 when GTIDs are
# enabled, because of the process of searching the binary log file that
# contains the first GTID not yet retrieved/executed by the slave.
--let $expected_count_misc= 5
--let $expected_count_misc= 6
if ($use_gtids)
{
--let $expected_count_misc= 8
--let $expected_count_misc= 9
}

--let $current_count_misc=`SELECT COUNT_MISC FROM performance_schema.file_summary_by_event_name WHERE EVENT_NAME = "wait/io/file/sql/binlog"`

--let $assert_text= COUNT_MISC for "wait/io/file/sql/binlog" should be minimal
--let $assert_cond= $current_count_misc = $expected_count_misc
--let $extra_debug_eval= $current_count_misc AS current_count_misc, $expected_count_misc as expected_count_misc
--let $extra_debug_info= COUNT_MISC should be 5 for non-GTID and 8 for GTID enabled servers
--let $extra_debug_info= COUNT_MISC should be 6 for non-GTID and 9 for GTID enabled servers
--source include/assert.inc

# Cleanup
Expand Down
14 changes: 7 additions & 7 deletions mysys/mf_iocache2.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ my_off_t my_b_append_tell(IO_CACHE* info)
*/
{
volatile my_off_t save_pos;
save_pos = my_tell(info->file,MYF(0));
my_seek(info->file,(my_off_t)0,MY_SEEK_END,MYF(0));
save_pos= mysql_file_tell(info->file, MYF(0));
mysql_file_seek(info->file, (my_off_t)0, MY_SEEK_END,MYF(0));
/*
Save the value of my_tell in res so we can see it when studying coredump
*/
DBUG_ASSERT(info->end_of_file - (info->append_read_pos-info->write_buffer)
== (res=my_tell(info->file,MYF(0))));
my_seek(info->file,save_pos,MY_SEEK_SET,MYF(0));
== (res= mysql_file_tell(info->file, MYF(0))));
mysql_file_seek(info->file, save_pos, MY_SEEK_SET,MYF(0));
}
#endif
res = info->end_of_file + (info->write_pos-info->append_read_pos);
Expand Down Expand Up @@ -204,7 +204,7 @@ size_t my_b_fill(IO_CACHE *info)

if (info->seek_not_done)
{ /* File touched, do seek */
if (my_seek(info->file,pos_in_file,MY_SEEK_SET,MYF(0)) ==
if (mysql_file_seek(info->file, pos_in_file, MY_SEEK_SET,MYF(0)) ==
MY_FILEPOS_ERROR)
{
info->error= 0;
Expand All @@ -224,7 +224,7 @@ size_t my_b_fill(IO_CACHE *info)
}
DBUG_EXECUTE_IF ("simulate_my_b_fill_error",
{DBUG_SET("+d,simulate_file_read_error");});
if ((length= my_read(info->file,info->buffer,max_length,
if ((length= mysql_file_read(info->file, info->buffer, max_length,
info->myflags)) == (size_t) -1)
{
info->error= -1;
Expand Down Expand Up @@ -288,7 +288,7 @@ my_off_t my_b_filelength(IO_CACHE *info)
return my_b_tell(info);

info->seek_not_done= 1;
return my_seek(info->file, 0L, MY_SEEK_END, MYF(0));
return mysql_file_seek(info->file, 0L, MY_SEEK_END, MYF(0));
}


Expand Down

0 comments on commit b9deeac

Please sign in to comment.