mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
buf0buf.c, buf0buf.ic, buf0buf.h:
Reduce memory usage of the buffer headers Many files: Merge InnoDB-4.1 with AWE support sql/mysqld.cc: Merge InnoDB-4.1 with AWE support sql/set_var.cc: Merge InnoDB-4.1 with AWE support sql/ha_innodb.h: Merge InnoDB-4.1 with AWE support sql/ha_innodb.cc: Merge InnoDB-4.1 with AWE support innobase/btr/btr0cur.c: Merge InnoDB-4.1 with AWE support innobase/btr/btr0pcur.c: Merge InnoDB-4.1 with AWE support innobase/buf/buf0flu.c: Merge InnoDB-4.1 with AWE support innobase/buf/buf0lru.c: Merge InnoDB-4.1 with AWE support innobase/buf/buf0rea.c: Merge InnoDB-4.1 with AWE support innobase/include/btr0pcur.h: Merge InnoDB-4.1 with AWE support innobase/include/buf0lru.h: Merge InnoDB-4.1 with AWE support innobase/include/log0recv.h: Merge InnoDB-4.1 with AWE support innobase/include/os0proc.h: Merge InnoDB-4.1 with AWE support innobase/include/srv0srv.h: Merge InnoDB-4.1 with AWE support innobase/log/log0log.c: Merge InnoDB-4.1 with AWE support innobase/log/log0recv.c: Merge InnoDB-4.1 with AWE support innobase/os/os0file.c: Merge InnoDB-4.1 with AWE support innobase/os/os0proc.c: Merge InnoDB-4.1 with AWE support innobase/srv/srv0srv.c: Merge InnoDB-4.1 with AWE support innobase/srv/srv0start.c: Merge InnoDB-4.1 with AWE support innobase/trx/trx0sys.c: Merge InnoDB-4.1 with AWE support innobase/trx/trx0trx.c: Merge InnoDB-4.1 with AWE support innobase/ut/ut0ut.c: Merge InnoDB-4.1 with AWE support innobase/include/buf0buf.h: Reduce memory usage of the buffer headers innobase/include/buf0buf.ic: Reduce memory usage of the buffer headers innobase/buf/buf0buf.c: Reduce memory usage of the buffer headers
This commit is contained in:
@ -935,6 +935,7 @@ innobase_start_or_create_for_mysql(void)
|
||||
/*====================================*/
|
||||
/* out: DB_SUCCESS or error code */
|
||||
{
|
||||
buf_pool_t* ret;
|
||||
ibool create_new_db;
|
||||
ibool log_file_created;
|
||||
ibool log_created = FALSE;
|
||||
@ -970,6 +971,11 @@ innobase_start_or_create_for_mysql(void)
|
||||
#ifdef UNIV_MEM_DEBUG
|
||||
fprintf(stderr,
|
||||
"InnoDB: !!!!!!!!!!!!!! UNIV_MEM_DEBUG switched on !!!!!!!!!!!!!!!\n");
|
||||
#endif
|
||||
|
||||
#ifdef UNIV_SIMULATE_AWE
|
||||
fprintf(stderr,
|
||||
"InnoDB: !!!!!!!!!!!!!! UNIV_SIMULATE_AWE switched on !!!!!!!!!!!!!!!!!\n");
|
||||
#endif
|
||||
|
||||
if (srv_sizeof_trx_t_in_ha_innodb_cc != (ulint)sizeof(trx_t)) {
|
||||
@ -1002,6 +1008,17 @@ innobase_start_or_create_for_mysql(void)
|
||||
srv_startup_is_before_trx_rollback_phase = TRUE;
|
||||
os_aio_use_native_aio = FALSE;
|
||||
|
||||
#if !defined(__NT__) && !defined(UNIV_SIMULATE_AWE)
|
||||
if (srv_use_awe) {
|
||||
|
||||
fprintf(stderr,
|
||||
"InnoDB: Error: You have specified innodb_buffer_pool_awe_mem_mb\n"
|
||||
"InnoDB: in my.cnf, but AWE can only be used in Windows 2000 and later.\n");
|
||||
|
||||
return(DB_ERROR);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __WIN__
|
||||
if (os_get_os_version() == OS_WIN95
|
||||
|| os_get_os_version() == OS_WIN31
|
||||
@ -1057,6 +1074,9 @@ innobase_start_or_create_for_mysql(void)
|
||||
return(DB_ERROR);
|
||||
}
|
||||
|
||||
/* Note that the call srv_boot() also changes the values of
|
||||
srv_pool_size etc. to the units used by InnoDB internally */
|
||||
|
||||
err = srv_boot();
|
||||
|
||||
if (err != DB_SUCCESS) {
|
||||
@ -1088,7 +1108,26 @@ innobase_start_or_create_for_mysql(void)
|
||||
|
||||
fil_init(SRV_MAX_N_OPEN_FILES);
|
||||
|
||||
buf_pool_init(srv_pool_size, srv_pool_size);
|
||||
if (srv_use_awe) {
|
||||
fprintf(stderr,
|
||||
"InnoDB: Using AWE: Memory window is %lu MB and AWE memory is %lu MB\n",
|
||||
srv_awe_window_size / ((1024 * 1024) / UNIV_PAGE_SIZE),
|
||||
srv_pool_size / ((1024 * 1024) / UNIV_PAGE_SIZE));
|
||||
|
||||
/* We must disable adaptive hash indexes because they do not
|
||||
tolerate remapping of pages in AWE */
|
||||
|
||||
srv_use_adaptive_hash_indexes = FALSE;
|
||||
ret = buf_pool_init(srv_pool_size, srv_pool_size,
|
||||
srv_awe_window_size);
|
||||
} else {
|
||||
ret = buf_pool_init(srv_pool_size, srv_pool_size,
|
||||
srv_pool_size);
|
||||
}
|
||||
|
||||
if (ret == NULL) {
|
||||
return(DB_ERROR);
|
||||
}
|
||||
|
||||
fsp_init();
|
||||
log_init();
|
||||
|
Reference in New Issue
Block a user