SOURCES (MYSQL_5_0): mysql-innodb_check_fragmentation.patch (NEW), mysql-in...
glen
glen at pld-linux.org
Fri Jan 9 12:04:59 CET 2009
Author: glen Date: Fri Jan 9 11:04:59 2009 GMT
Module: SOURCES Tag: MYSQL_5_0
---- Log message:
- for 5.0.75
---- Files affected:
SOURCES:
mysql-innodb_check_fragmentation.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_fsync_source.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_rw_lock.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_show_hashed_memory.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_io_pattern.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_locks_held.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_show_bp.patch (NONE -> 1.1.2.1) (NEW), mysql-microsec_process.patch (NONE -> 1.1.2.1) (NEW), mysql-innodb_io_patches.patch (NONE -> 1.1.2.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mysql-innodb_check_fragmentation.patch
diff -u /dev/null SOURCES/mysql-innodb_check_fragmentation.patch:1.1.2.1
--- /dev/null Fri Jan 9 12:05:00 2009
+++ SOURCES/mysql-innodb_check_fragmentation.patch Fri Jan 9 12:04:49 2009
@@ -0,0 +1,275 @@
+diff -r 936d427a9a15 innobase/btr/btr0cur.c
+--- a/innobase/btr/btr0cur.c Mon Dec 22 00:33:03 2008 -0800
++++ b/innobase/btr/btr0cur.c Mon Dec 22 00:33:11 2008 -0800
+@@ -516,6 +516,14 @@
+ == index->table->comp);
+ }
+
++ if (level == 0) {
++ /* Initializes status counters */
++ innobase_mysql_thd_init_innodb_scan_cont();
++ innobase_mysql_thd_init_innodb_scan_jump();
++ innobase_mysql_thd_init_innodb_scan_data();
++ innobase_mysql_thd_init_innodb_scan_garbage();
++ }
++
+ break;
+ }
+
+@@ -663,6 +671,12 @@
+ btr_cur_add_path_info(cursor, height,
+ root_height);
+ }
++
++ /* Initializes status counters */
++ innobase_mysql_thd_init_innodb_scan_cont();
++ innobase_mysql_thd_init_innodb_scan_jump();
++ innobase_mysql_thd_init_innodb_scan_data();
++ innobase_mysql_thd_init_innodb_scan_garbage();
+
+ break;
+ }
+diff -r 936d427a9a15 innobase/btr/btr0pcur.c
+--- a/innobase/btr/btr0pcur.c Mon Dec 22 00:33:03 2008 -0800
++++ b/innobase/btr/btr0pcur.c Mon Dec 22 00:33:11 2008 -0800
+@@ -381,6 +381,7 @@
+ last record of the current page */
+ mtr_t* mtr) /* in: mtr */
+ {
++ ulint page_no;
+ ulint next_page_no;
+ ulint space;
+ page_t* page;
+@@ -393,11 +394,22 @@
+ cursor->old_stored = BTR_PCUR_OLD_NOT_STORED;
+
+ page = btr_pcur_get_page(cursor);
++ page_no = buf_frame_get_page_no(page);
+
+ next_page_no = btr_page_get_next(page, mtr);
+ space = buf_frame_get_space_id(page);
+
+ ut_ad(next_page_no != FIL_NULL);
++
++ if (next_page_no - page_no == 1) {
++ innobase_mysql_thd_increment_innodb_scan_cont(1);
++ } else {
++ innobase_mysql_thd_increment_innodb_scan_jump(1);
++ }
++ innobase_mysql_thd_increment_innodb_scan_data(
++ page_get_data_size(page));
++ innobase_mysql_thd_increment_innodb_scan_garbage(
++ page_header_get_field(page, PAGE_GARBAGE));
+
+ next_page = btr_page_get(space, next_page_no, cursor->latch_mode, mtr);
+ ut_a(page_is_comp(next_page) == page_is_comp(page));
+@@ -427,6 +439,7 @@
+ record of the current page */
+ mtr_t* mtr) /* in: mtr */
+ {
++ ulint page_no;
+ ulint prev_page_no;
+ ulint space;
+ page_t* page;
+@@ -462,9 +475,20 @@
+ btr_pcur_restore_position(latch_mode2, cursor, mtr);
+
+ page = btr_pcur_get_page(cursor);
++ page_no = buf_frame_get_page_no(page);
+
+ prev_page_no = btr_page_get_prev(page, mtr);
+ space = buf_frame_get_space_id(page);
++
++ if (page_no - prev_page_no == 1) {
++ innobase_mysql_thd_increment_innodb_scan_cont(1);
++ } else {
++ innobase_mysql_thd_increment_innodb_scan_jump(1);
++ }
++ innobase_mysql_thd_increment_innodb_scan_data(
++ page_get_data_size(page));
++ innobase_mysql_thd_increment_innodb_scan_garbage(
++ page_header_get_field(page, PAGE_GARBAGE));
+
+ if (btr_pcur_is_before_first_on_page(cursor, mtr)
+ && (prev_page_no != FIL_NULL)) {
+diff -r 936d427a9a15 innobase/btr/btr0sea.c
+--- a/innobase/btr/btr0sea.c Mon Dec 22 00:33:03 2008 -0800
++++ b/innobase/btr/btr0sea.c Mon Dec 22 00:33:11 2008 -0800
+@@ -861,6 +861,12 @@
+
+ buf_pool->n_page_gets++;
+
++ /* Initializes status counters */
++ innobase_mysql_thd_init_innodb_scan_cont();
++ innobase_mysql_thd_init_innodb_scan_jump();
++ innobase_mysql_thd_init_innodb_scan_data();
++ innobase_mysql_thd_init_innodb_scan_garbage();
++
+ return(TRUE);
+
+ /*-------------------------------------------*/
+diff -r 936d427a9a15 innobase/include/btr0cur.h
+--- a/innobase/include/btr0cur.h Mon Dec 22 00:33:03 2008 -0800
++++ b/innobase/include/btr0cur.h Mon Dec 22 00:33:11 2008 -0800
+@@ -697,6 +697,17 @@
+ extern ulint btr_cur_n_non_sea_old;
+ extern ulint btr_cur_n_sea_old;
+
++/*--------------------------------------*/
++/* prototypes for new functions added to ha_innodb.cc */
++void innobase_mysql_thd_init_innodb_scan_cont();
++void innobase_mysql_thd_increment_innodb_scan_cont(ulong length);
++void innobase_mysql_thd_init_innodb_scan_jump();
++void innobase_mysql_thd_increment_innodb_scan_jump(ulong length);
++void innobase_mysql_thd_init_innodb_scan_data();
++void innobase_mysql_thd_increment_innodb_scan_data(ulong length);
++void innobase_mysql_thd_init_innodb_scan_garbage();
++void innobase_mysql_thd_increment_innodb_scan_garbage(ulong length);
++
+ #ifndef UNIV_NONINL
+ #include "btr0cur.ic"
+ #endif
+diff -r 936d427a9a15 patch_info/innodb_check_fragmentation.info
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ b/patch_info/innodb_check_fragmentation.info Mon Dec 22 00:33:11 2008 -0800
+@@ -0,0 +1,6 @@
++File=innodb_check_fragmentation.patch
++Name=Session status to check fragmentation of the last InnoDB scan
++Version=1.0
++Author=Percona <info at percona.com>
++License=GPL
++Comment=The names are Innodb_scan_*
+diff -r 936d427a9a15 sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc Mon Dec 22 00:33:03 2008 -0800
++++ b/sql/ha_innodb.cc Mon Dec 22 00:33:11 2008 -0800
+@@ -760,6 +760,102 @@
+ }
+
+ /*************************************************************************
++Initializes Innodb_scan_blocks_contiguous. */
++extern "C"
++void
++innobase_mysql_thd_init_innodb_scan_cont()
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_cont = 0;
++ }
++}
++
++/*************************************************************************
++Increments Innodb_scan_blocks_contiguous. */
++extern "C"
++void
++innobase_mysql_thd_increment_innodb_scan_cont(ulong length)
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_cont+= length;
++ }
++}
++
++/*************************************************************************
++Initializes Innodb_scan_blocks_jumpy. */
++extern "C"
++void
++innobase_mysql_thd_init_innodb_scan_jump()
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_jump = 0;
++ }
++}
++
++/*************************************************************************
++Increments Innodb_scan_blocks_jumpy. */
++extern "C"
++void
++innobase_mysql_thd_increment_innodb_scan_jump(ulong length)
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_jump+= length;
++ }
++}
++
++/*************************************************************************
++Initializes Innodb_scan_data_in_pages. */
++extern "C"
++void
++innobase_mysql_thd_init_innodb_scan_data()
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_data = 0;
++ }
++}
++
++/*************************************************************************
++Increments Innodb_scan_data_in_pages. */
++extern "C"
++void
++innobase_mysql_thd_increment_innodb_scan_data(ulong length)
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_data+= length;
++ }
++}
++
++/*************************************************************************
++Initializes Innodb_scan_garbages_in_pages. */
++extern "C"
++void
++innobase_mysql_thd_init_innodb_scan_garbage()
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_garbage = 0;
++ }
++}
++
++/*************************************************************************
++Increments Innodb_scan_garbages_in_pages. */
++extern "C"
++void
++innobase_mysql_thd_increment_innodb_scan_garbage(ulong length)
++{
++ THD *thd=current_thd;
++ if (likely(thd != 0)) {
++ thd->status_var.innodb_scan_garbage+= length;
++ }
++}
++
++/*************************************************************************
+ Gets the InnoDB transaction handle for a MySQL handler object, creates
+ an InnoDB transaction struct if the corresponding MySQL thread struct still
+ lacks one. */
+diff -r 936d427a9a15 sql/mysqld.cc
+--- a/sql/mysqld.cc Mon Dec 22 00:33:03 2008 -0800
++++ b/sql/mysqld.cc Mon Dec 22 00:33:11 2008 -0800
+@@ -6673,6 +6673,10 @@
+ {"Handler_write", (char*) offsetof(STATUS_VAR, ha_write_count), SHOW_LONG_STATUS},
+ #ifdef HAVE_INNOBASE_DB
+ {"Innodb_", (char*) &innodb_status_variables, SHOW_VARS},
++ {"Innodb_scan_pages_contiguous",(char*) offsetof(STATUS_VAR, innodb_scan_cont), SHOW_LONGLONG_STATUS},
++ {"Innodb_scan_pages_jumpy", (char*) offsetof(STATUS_VAR, innodb_scan_jump), SHOW_LONGLONG_STATUS},
++ {"Innodb_scan_data_in_pages",(char*) offsetof(STATUS_VAR, innodb_scan_data), SHOW_LONGLONG_STATUS},
++ {"Innodb_scan_garbages_in_pages",(char*) offsetof(STATUS_VAR, innodb_scan_garbage), SHOW_LONGLONG_STATUS},
+ #endif /*HAVE_INNOBASE_DB*/
+ {"Key_blocks_not_flushed", (char*) &dflt_key_cache_var.global_blocks_changed, SHOW_KEY_CACHE_LONG},
+ {"Key_blocks_unused", (char*) &dflt_key_cache_var.blocks_unused, SHOW_KEY_CACHE_CONST_LONG},
+diff -r 936d427a9a15 sql/sql_class.h
+--- a/sql/sql_class.h Mon Dec 22 00:33:03 2008 -0800
++++ b/sql/sql_class.h Mon Dec 22 00:33:11 2008 -0800
+@@ -729,6 +729,10 @@
+ sense to add to the /global/ status variable counter.
+ */
+ double last_query_cost;
++ ulonglong innodb_scan_cont;
++ ulonglong innodb_scan_jump;
++ ulonglong innodb_scan_data;
++ ulonglong innodb_scan_garbage;
+ } STATUS_VAR;
+
+ /*
================================================================
Index: SOURCES/mysql-innodb_fsync_source.patch
diff -u /dev/null SOURCES/mysql-innodb_fsync_source.patch:1.1.2.1
--- /dev/null Fri Jan 9 12:05:00 2009
+++ SOURCES/mysql-innodb_fsync_source.patch Fri Jan 9 12:04:49 2009
@@ -0,0 +1,594 @@
+diff -r 61031ebb48ce innobase/buf/buf0flu.c
+--- a/innobase/buf/buf0flu.c Mon Nov 03 05:07:46 2008 -0800
++++ b/innobase/buf/buf0flu.c Mon Nov 03 05:07:56 2008 -0800
+@@ -341,7 +341,7 @@
+
+ /* Now flush the doublewrite buffer data to disk */
+
+- fil_flush(TRX_SYS_SPACE);
++ fil_flush(TRX_SYS_SPACE, FLUSH_FROM_DIRTY_BUFFER);
+
+ /* We know that the writes have been flushed to disk now
+ and in recovery we will find them in the doublewrite buffer
+@@ -381,7 +381,7 @@
+
+ /* Now we flush the data to disk (for example, with fsync) */
+
+- fil_flush_file_spaces(FIL_TABLESPACE);
++ fil_flush_file_spaces(FIL_TABLESPACE, FLUSH_FROM_DIRTY_BUFFER);
+
+ /* We can now reuse the doublewrite memory buffer: */
+
+@@ -501,7 +501,8 @@
+ }
+ #else
+ /* Force the log to the disk before writing the modified block */
+- log_write_up_to(block->newest_modification, LOG_WAIT_ALL_GROUPS, TRUE);
++ log_write_up_to(block->newest_modification, LOG_WAIT_ALL_GROUPS, TRUE,
++ LOG_WRITE_FROM_DIRTY_BUFFER);
+ #endif
+ buf_flush_init_for_writing(block->frame, block->newest_modification,
+ block->space, block->offset);
+diff -r 61031ebb48ce innobase/fil/fil0fil.c
+--- a/innobase/fil/fil0fil.c Mon Nov 03 05:07:46 2008 -0800
++++ b/innobase/fil/fil0fil.c Mon Nov 03 05:07:56 2008 -0800
+@@ -245,6 +245,7 @@
+ request */
+ UT_LIST_BASE_NODE_T(fil_space_t) space_list;
+ /* list of all file spaces */
++ ulint flush_types[FLUSH_FROM_NUMBER];/* calls to fil_flush by caller */
+ };
+
+ /* The tablespace memory cache. This variable is NULL before the module is
+@@ -849,7 +850,7 @@
+ /* Flush tablespaces so that we can close modified files in the LRU
+ list */
+
+- fil_flush_file_spaces(FIL_TABLESPACE);
++ fil_flush_file_spaces(FIL_TABLESPACE, FLUSH_FROM_OTHER);
+
+ count++;
+
+@@ -1309,7 +1310,10 @@
+
+ UT_LIST_INIT(system->unflushed_spaces);
+ UT_LIST_INIT(system->space_list);
+-
++ {
++ int x;
++ for (x = 0; x < FLUSH_FROM_NUMBER; ++x) system->flush_types[x] = 0;
++ }
+ return(system);
+ }
+
+@@ -1437,6 +1441,23 @@
+ }
+
+ mutex_exit(&(system->mutex));
++}
++
++/********************************************************************
++Prints internal counters */
++
++void
++fil_print(FILE *file)
++{
++ fprintf(file,
++ "fsync callers: %lu buffer pool, %lu other, %lu checkpoint, "
++ "%lu log aio, %lu log sync, %lu archive\n",
++ fil_system->flush_types[FLUSH_FROM_DIRTY_BUFFER],
++ fil_system->flush_types[FLUSH_FROM_OTHER],
++ fil_system->flush_types[FLUSH_FROM_CHECKPOINT],
++ fil_system->flush_types[FLUSH_FROM_LOG_IO_COMPLETE],
++ fil_system->flush_types[FLUSH_FROM_LOG_WRITE_UP_TO],
++ fil_system->flush_types[FLUSH_FROM_ARCHIVE]);
+ }
+
+ /********************************************************************
+@@ -2256,7 +2277,7 @@
+
+ os_thread_sleep(20000);
+
+- fil_flush(id);
++ fil_flush(id, FLUSH_FROM_OTHER);
+
+ goto retry;
+
+@@ -3574,7 +3595,7 @@
+ size_after_extend, *actual_size); */
+ mutex_exit(&(system->mutex));
+
+- fil_flush(space_id);
++ fil_flush(space_id, FLUSH_FROM_OTHER);
+
+ return(success);
+ }
+@@ -4166,8 +4187,9 @@
+ void
+ fil_flush(
+ /*======*/
+- ulint space_id) /* in: file space id (this can be a group of
++ ulint space_id, /* in: file space id (this can be a group of
+ log files or a tablespace of the database) */
++ flush_from_type flush_type)/* in: identifies the caller */
+ {
+ fil_system_t* system = fil_system;
+ fil_space_t* space;
+@@ -4176,7 +4198,7 @@
+ ib_longlong old_mod_counter;
+
+ mutex_enter(&(system->mutex));
+-
++ system->flush_types[flush_type]++;
+ HASH_SEARCH(hash, system->spaces, space_id, space,
+ space->id == space_id);
+ if (!space || space->is_being_deleted) {
+@@ -4281,7 +4303,8 @@
+ void
+ fil_flush_file_spaces(
+ /*==================*/
+- ulint purpose) /* in: FIL_TABLESPACE, FIL_LOG */
++ ulint purpose, /* in: FIL_TABLESPACE, FIL_LOG */
++ flush_from_type flush_type)/* in: identifies the caller */
+ {
+ fil_system_t* system = fil_system;
+ fil_space_t* space;
+@@ -4322,7 +4345,7 @@
+ a non-existing space id. */
+ for (i = 0; i < n_space_ids; i++) {
+
+- fil_flush(space_ids[i]);
++ fil_flush(space_ids[i], flush_type);
+ }
+
+ mem_free(space_ids);
+diff -r 61031ebb48ce innobase/include/fil0fil.h
+--- a/innobase/include/fil0fil.h Mon Nov 03 05:07:46 2008 -0800
++++ b/innobase/include/fil0fil.h Mon Nov 03 05:07:56 2008 -0800
+@@ -197,6 +197,13 @@
+ fil_init(
+ /*=====*/
+ ulint max_n_open); /* in: max number of open files */
++/********************************************************************
++ * Prints internal counters. */
++
++void
++fil_print(
++ /*=====*/
++ FILE* file); /* in: output stream */
+ /***********************************************************************
+ Opens all log files and system tablespace data files. They stay open until the
+ database server shutdown. This should be called at a server startup after the
+@@ -621,14 +628,26 @@
+ ulint segment); /* in: the number of the segment in the aio
+ array to wait for */
+ /**************************************************************************
++Identifies the caller of fil_flush. */
++typedef enum {
++ FLUSH_FROM_DIRTY_BUFFER,
++ FLUSH_FROM_OTHER,
++ FLUSH_FROM_CHECKPOINT,
++ FLUSH_FROM_LOG_IO_COMPLETE,
++ FLUSH_FROM_LOG_WRITE_UP_TO,
++ FLUSH_FROM_ARCHIVE,
++ FLUSH_FROM_NUMBER
++} flush_from_type;
++/**************************************************************************
+ Flushes to disk possible writes cached by the OS. If the space does not exist
+ or is being dropped, does not do anything. */
+
+ void
+ fil_flush(
+ /*======*/
+- ulint space_id); /* in: file space id (this can be a group of
++ ulint space_id, /* in: file space id (this can be a group of
+ log files or a tablespace of the database) */
++ flush_from_type flush_type);/* in: identifies the caller */
+ /**************************************************************************
+ Flushes to disk writes in file spaces of the given type possibly cached by
+ the OS. */
+@@ -636,7 +655,8 @@
+ void
+ fil_flush_file_spaces(
+ /*==================*/
+- ulint purpose); /* in: FIL_TABLESPACE, FIL_LOG */
++ ulint purpose, /* in: FIL_TABLESPACE, FIL_LOG */
++ flush_from_type flush_type);/* in: identifies the caller */
+ /**********************************************************************
+ Checks the consistency of the tablespace cache. */
+
+diff -r 61031ebb48ce innobase/include/log0log.h
+--- a/innobase/include/log0log.h Mon Nov 03 05:07:46 2008 -0800
++++ b/innobase/include/log0log.h Mon Nov 03 05:07:56 2008 -0800
+@@ -146,6 +146,22 @@
+ log_io_complete(
+ /*============*/
+ log_group_t* group); /* in: log group */
++
++/**********************************************************
++Describes the caller of log_write_up_to. */
++
++typedef enum {
++ LOG_WRITE_FROM_DIRTY_BUFFER,
++ LOG_WRITE_FROM_BACKGROUND_SYNC,
++ LOG_WRITE_FROM_BACKGROUND_ASYNC,
++ LOG_WRITE_FROM_INTERNAL,
++ LOG_WRITE_FROM_CHECKPOINT_SYNC,
++ LOG_WRITE_FROM_CHECKPOINT_ASYNC,
++ LOG_WRITE_FROM_LOG_ARCHIVE,
++ LOG_WRITE_FROM_COMMIT_SYNC,
++ LOG_WRITE_FROM_COMMIT_ASYNC,
++ LOG_WRITE_FROM_NUMBER
++} log_sync_type;
+ /**********************************************************
+ This function is called, e.g., when a transaction wants to commit. It checks
+ that the log has been written to the log file up to the last log entry written
+@@ -159,14 +175,21 @@
+ be written, ut_dulint_max if not specified */
+ ulint wait, /* in: LOG_NO_WAIT, LOG_WAIT_ONE_GROUP,
+ or LOG_WAIT_ALL_GROUPS */
+- ibool flush_to_disk);
+- /* in: TRUE if we want the written log also to be
+- flushed to disk */
++ ibool flush_to_disk,
++ /* in: TRUE if we want the written log also to be flushed to disk */
++ log_sync_type caller);/* in: identifies the caller */
+ /********************************************************************
+ Does a syncronous flush of the log buffer to disk. */
+
+ void
+ log_buffer_flush_to_disk(void);
++/*==========================*/
++/********************************************************************
++Flushes the log buffer. Forces it to disk depending on the value of
++the configuration parameter innodb_flush_log_at_trx_commit. */
++
++void
++log_buffer_flush_maybe_sync(void);
+ /*==========================*/
+ /********************************************************************
+ Advances the smallest lsn for which there are unflushed dirty blocks in the
+@@ -744,6 +767,12 @@
+ AND flushed to disk */
+ ulint n_pending_writes;/* number of currently pending flushes
+ or writes */
++ ulint log_sync_callers[LOG_WRITE_FROM_NUMBER];
++ /* counts calls to log_write_up_to */
++ ulint log_sync_syncers[LOG_WRITE_FROM_NUMBER];
++ /* counts calls to log_write_up_to when log file is sync'd */
++ ulint n_syncs; /* number of fsyncs done for log file */
++ ulint n_checkpoints; /* number of calls to log_checkpoint */
+ /* NOTE on the 'flush' in names of the fields below: starting from
+ 4.0.14, we separate the write of the log file and the actual fsync()
+ or other method to flush it to disk. The names below shhould really
+diff -r 61031ebb48ce innobase/log/log0log.c
+--- a/innobase/log/log0log.c Mon Nov 03 05:07:46 2008 -0800
++++ b/innobase/log/log0log.c Mon Nov 03 05:07:56 2008 -0800
+@@ -782,6 +782,15 @@
+ log_sys->written_to_all_lsn = log_sys->lsn;
+
+ log_sys->n_pending_writes = 0;
++ {
++ int x;
++ for (x = 0; x < LOG_WRITE_FROM_NUMBER; ++x) {
++ log_sys->log_sync_callers[x] = 0;
++ log_sys->log_sync_syncers[x] = 0;
++ }
++ }
++ log_sys->n_syncs = 0;
++ log_sys->n_checkpoints = 0;
+
+ log_sys->no_flush_event = os_event_create(NULL);
+
+@@ -1066,7 +1075,7 @@
+ if (srv_unix_file_flush_method != SRV_UNIX_O_DSYNC
+ && srv_unix_file_flush_method != SRV_UNIX_NOSYNC) {
+
+- fil_flush(group->space_id);
++ fil_flush(group->space_id, FLUSH_FROM_LOG_IO_COMPLETE);
+ }
+
+ #ifdef UNIV_DEBUG
+@@ -1088,7 +1097,7 @@
+ && srv_unix_file_flush_method != SRV_UNIX_NOSYNC
+ && srv_flush_log_at_trx_commit != 2) {
+
+- fil_flush(group->space_id);
++ fil_flush(group->space_id, FLUSH_FROM_LOG_IO_COMPLETE);
+ }
+
+ mutex_enter(&(log_sys->mutex));
+@@ -1303,9 +1312,10 @@
+ be written, ut_dulint_max if not specified */
+ ulint wait, /* in: LOG_NO_WAIT, LOG_WAIT_ONE_GROUP,
+ or LOG_WAIT_ALL_GROUPS */
+- ibool flush_to_disk)
++ ibool flush_to_disk,
+ /* in: TRUE if we want the written log also to be
+ flushed to disk */
++ log_sync_type caller) /* in: identifies caller */
+ {
<<Diff was trimmed, longer than 597 lines>>
More information about the pld-cvs-commit
mailing list