diff options
author | unknown <heikki@donna.mysql.fi> | 2001-04-10 21:58:07 +0300 |
---|---|---|
committer | unknown <heikki@donna.mysql.fi> | 2001-04-10 21:58:07 +0300 |
commit | 0c971641774f4d06f5442ef23af5d8c7ef9058ab (patch) | |
tree | 44883f89faae8a2a77423664d9b14e8cffc617dc /innobase/srv/srv0srv.c | |
parent | 6b464d84ce58f07e1a3e4b98a1d8f5eb9146f00c (diff) | |
download | mariadb-git-0c971641774f4d06f5442ef23af5d8c7ef9058ab.tar.gz |
srv0srv.h Merging work for 3.23.37
os0thread.c Set created thread priority to QUERY_PRIOR if specified
row0mysql.c Drop table removes locks on the table, error handling changed
row0ins.c Insert now always sets a shared lock on a duplicate or suspected duplicate record
lock0lock.h Can remove locks from a table to be dropped
lock0lock.c Can remove locks from a table to be dropped
srv0srv.c Try to do log flush every second
srv0start.c No need for a slash at the end of dir
trx0trx.h Added an IGNORE option field to trx handle
trx0trx.c Added an IGNORE option field to trx handle
ha_innobase.h Added last_query_id field to handle
ha_innobase.cc Fix drop table hang, roll-forward etc.
sql/ha_innobase.cc:
Fix drop table hang, roll-forward etc.
sql/ha_innobase.h:
Added last_query_id field to handle
innobase/trx/trx0trx.c:
Added an IGNORE option field to trx handle
innobase/include/trx0trx.h:
Added an IGNORE option field to trx handle
innobase/srv/srv0start.c:
No need for a slash at the end of dir
innobase/srv/srv0srv.c:
Try to do log flush every second
innobase/lock/lock0lock.c:
Can remove locks from a table to be dropped
innobase/include/lock0lock.h:
Can remove locks from a table to be dropped
innobase/row/row0ins.c:
Insert now always sets a shared lock on a duplicate or suspected duplicate record
innobase/row/row0mysql.c:
Drop table removes locks on the table, error handling changed
innobase/os/os0thread.c:
Set created thread priority to QUERY_PRIOR if specified
innobase/include/srv0srv.h:
Merging work for 3.23.37
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'innobase/srv/srv0srv.c')
-rw-r--r-- | innobase/srv/srv0srv.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index fcb4721fefb..bb472e08573 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -87,6 +87,9 @@ ibool srv_archive_recovery = 0; dulint srv_archive_recovery_limit_lsn; ulint srv_lock_wait_timeout = 1024 * 1024 * 1024; + +ibool srv_set_thread_priorities = TRUE; +int srv_query_thread_priority = 0; /*-------------------------------------------*/ ulint srv_n_spin_wait_rounds = 20; ulint srv_spin_wait_delay = 5; @@ -1837,6 +1840,8 @@ srv_master_thread( ulint n_pages_flushed; ulint n_bytes_archived; ulint i; + time_t last_flush_time; + time_t current_time; UT_NOT_USED(arg); @@ -1861,6 +1866,12 @@ loop: for (i = 0; i < 10; i++) { os_thread_sleep(1000000); + /* We flush the log once in a second even if no commit + is issued or the we have specified in my.cnf no flush + at transaction commit */ + + log_flush_up_to(ut_dulint_max, LOG_WAIT_ONE_GROUP); + if (srv_activity_count == old_activity_count) { if (srv_print_thread_releases) { @@ -1877,10 +1888,19 @@ loop: n_pages_purged = 1; + last_flush_time = time(NULL); + while (n_pages_purged) { - n_pages_purged = trx_purge(); /* TODO: replace this by a check if we are running out of file space! */ + n_pages_purged = trx_purge(); + + current_time = time(NULL); + + if (difftime(current_time, last_flush_time) > 1) { + log_flush_up_to(ut_dulint_max, LOG_WAIT_ONE_GROUP); + last_flush_time = current_time; + } } background_loop: |