diff options
author | Michael Widenius <monty@askmonty.org> | 2013-06-05 13:51:28 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-06-05 13:51:28 +0300 |
commit | fab9a55d077b4f2a511b273d5f51272f1e3dc1ff (patch) | |
tree | c0a7ad19ea9dd038a1537269780a9591674ae2fb | |
parent | 58926b5e1990d3245b55081ba511fbabe2604e17 (diff) | |
download | mariadb-git-fab9a55d077b4f2a511b273d5f51272f1e3dc1ff.tar.gz |
- 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
-rw-r--r-- | sql/mdl.cc | 2 | ||||
-rw-r--r-- | storage/innobase/os/os0file.cc | 23 |
2 files changed, 18 insertions, 7 deletions
diff --git a/sql/mdl.cc b/sql/mdl.cc index 9402de02c36..03593f150bd 100644 --- a/sql/mdl.cc +++ b/sql/mdl.cc @@ -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 event metadata 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 diff --git a/storage/innobase/os/os0file.cc b/storage/innobase/os/os0file.cc index 6d1b3aacf41..49d6b00d271 100644 --- a/storage/innobase/os/os0file.cc +++ b/storage/innobase/os/os0file.cc @@ -3434,12 +3434,23 @@ os_aio_array_create( if (!os_aio_linux_create_io_ctx(n/n_segments, &array->aio_ctx[i])) { /* If something bad happened during aio setup - we should call it a day and return right away. - We don't care about any leaks because a failure - to initialize the io subsystem means that the - server (or atleast the innodb storage engine) - is not going to startup. */ - return(NULL); + we disable linux native aio. + The disadvantage will be a small memory leak + at shutdown but that's ok compared to a crash + or a not working server. + This frequently happens when running the test suite + 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; } } |