diff options
author | Jimmy Yang <jimmy.yang@oracle.com> | 2010-11-10 21:27:10 -0800 |
---|---|---|
committer | Jimmy Yang <jimmy.yang@oracle.com> | 2010-11-10 21:27:10 -0800 |
commit | 7ade161589cd1f7c6c245a3e6b2b297fcd828f04 (patch) | |
tree | 6c50ccb86e4ebd48ecbe4c8c01f869537b1a3fb1 /storage | |
parent | ce782ee2c2648ccd84c14d2d2716d01b03b9ae87 (diff) | |
download | mariadb-git-7ade161589cd1f7c6c245a3e6b2b297fcd828f04.tar.gz |
Port fix for Bug #48026 to 5.1 built-in and plugin: Log start and end
of InnoDB buffer pool initialization to the error log
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/srv/srv0start.c | 22 | ||||
-rw-r--r-- | storage/innodb_plugin/ChangeLog | 6 | ||||
-rw-r--r-- | storage/innodb_plugin/srv/srv0start.c | 20 |
3 files changed, 48 insertions, 0 deletions
diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index 9d057110d11..4c4360f819e 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -1247,6 +1247,23 @@ innobase_start_or_create_for_mysql(void) fil_init(srv_max_n_open_files); + /* Print time to initialize the buffer pool */ + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Initializing buffer pool, size ="); + + if (srv_pool_size * UNIV_PAGE_SIZE >= 1024 * 1024 * 1024) { + fprintf(stderr, + " %.1fG\n", + ((double) (srv_pool_size * UNIV_PAGE_SIZE)) + / (1024 * 1024 * 1024)); + } else { + fprintf(stderr, + " %.1fM\n", + ((double) (srv_pool_size * UNIV_PAGE_SIZE)) + / (1024 * 1024)); + } + if (srv_use_awe) { fprintf(stderr, "InnoDB: Using AWE: Memory window is %lu MB" @@ -1267,6 +1284,8 @@ innobase_start_or_create_for_mysql(void) srv_pool_size); } + ut_print_timestamp(stderr); + if (ret == NULL) { fprintf(stderr, "InnoDB: Fatal error: cannot allocate the memory" @@ -1275,6 +1294,9 @@ innobase_start_or_create_for_mysql(void) return(DB_ERROR); } + fprintf(stderr, + " InnoDB: Completed initialization of buffer pool\n"); + fsp_init(); log_init(); diff --git a/storage/innodb_plugin/ChangeLog b/storage/innodb_plugin/ChangeLog index f99c49d63f6..eaf16a923da 100644 --- a/storage/innodb_plugin/ChangeLog +++ b/storage/innodb_plugin/ChangeLog @@ -1,3 +1,9 @@ +2010-11-10 The InnoDB Team + + * srv/srv0start.c: + Fix Bug #48026 Log start and end of InnoDB buffer pool + initialization to the error log + 2010-11-03 The InnoDB Team * include/btr0btr.h, include/btr0btr.ic, dict/dict0crea.c: diff --git a/storage/innodb_plugin/srv/srv0start.c b/storage/innodb_plugin/srv/srv0start.c index f823b72fbc1..73f8f319704 100644 --- a/storage/innodb_plugin/srv/srv0start.c +++ b/storage/innodb_plugin/srv/srv0start.c @@ -1286,8 +1286,25 @@ innobase_start_or_create_for_mysql(void) fil_init(srv_file_per_table ? 50000 : 5000, srv_max_n_open_files); + /* Print time to initialize the buffer pool */ + ut_print_timestamp(stderr); + fprintf(stderr, + " InnoDB: Initializing buffer pool, size ="); + + if (srv_buf_pool_size >= 1024 * 1024 * 1024) { + fprintf(stderr, + " %.1fG\n", + ((double) srv_buf_pool_size) / (1024 * 1024 * 1024)); + } else { + fprintf(stderr, + " %.1fM\n", + ((double) srv_buf_pool_size) / (1024 * 1024)); + } + ret = buf_pool_init(); + ut_print_timestamp(stderr); + if (ret == NULL) { fprintf(stderr, "InnoDB: Fatal error: cannot allocate the memory" @@ -1296,6 +1313,9 @@ innobase_start_or_create_for_mysql(void) return(DB_ERROR); } + fprintf(stderr, + " InnoDB: Completed initialization of buffer pool\n"); + #ifdef UNIV_DEBUG /* We have observed deadlocks with a 5MB buffer pool but the actual lower limit could very well be a little higher. */ |