Commit fab9a55d authored by Michael Widenius's avatar Michael Widenius

- Fixed compiler warning

- Don't abort InnoDB if one can't allocate resources for AIO
  (this patch was in 5.5 and 10.0-base but was missing in 10.0)


sql/mdl.cc:
  Fixed compiler warning
storage/innobase/os/os0file.cc:
  Don't abort InnoDB if one can't allocate resources for AIO
parent 58926b5e
...@@ -86,7 +86,7 @@ PSI_stage_info MDL_key::m_namespace_to_wait_state_name[NAMESPACE_END]= ...@@ -86,7 +86,7 @@ PSI_stage_info MDL_key::m_namespace_to_wait_state_name[NAMESPACE_END]=
{0, "Waiting for trigger metadata lock", 0}, {0, "Waiting for trigger metadata lock", 0},
{0, "Waiting for event metadata lock", 0}, {0, "Waiting for event metadata lock", 0},
{0, "Waiting for commit lock", 0}, {0, "Waiting for commit lock", 0},
{0, "User lock"} /* Be compatible with old status. */ {0, "User lock", 0} /* Be compatible with old status. */
}; };
#ifdef HAVE_PSI_INTERFACE #ifdef HAVE_PSI_INTERFACE
......
...@@ -3434,12 +3434,23 @@ os_aio_array_create( ...@@ -3434,12 +3434,23 @@ os_aio_array_create(
if (!os_aio_linux_create_io_ctx(n/n_segments, if (!os_aio_linux_create_io_ctx(n/n_segments,
&array->aio_ctx[i])) { &array->aio_ctx[i])) {
/* If something bad happened during aio setup /* If something bad happened during aio setup
we should call it a day and return right away. we disable linux native aio.
We don't care about any leaks because a failure The disadvantage will be a small memory leak
to initialize the io subsystem means that the at shutdown but that's ok compared to a crash
server (or atleast the innodb storage engine) or a not working server.
is not going to startup. */ This frequently happens when running the test suite
return(NULL); with many threads on a system with low fs.aio-max-nr!
*/
fprintf(stderr,
" InnoDB: Warning: Linux Native AIO disabled "
"because os_aio_linux_create_io_ctx() "
"failed. To get rid of this warning you can "
"try increasing system "
"fs.aio-max-nr to 1048576 or larger or "
"setting innodb_use_native_aio = 0 in my.cnf\n");
srv_use_native_aio = FALSE;
goto skip_native_aio;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment