@@ -1392,6 +1392,11 @@ uint xb_client_options_count = array_elements(xb_client_options);
13921392static const char *dbug_option;
13931393#endif
13941394
1395+ #ifdef HAVE_URING
1396+ extern const char *io_uring_may_be_unsafe;
1397+ bool innodb_use_native_aio_default ();
1398+ #endif
1399+
13951400struct my_option xb_server_options[] =
13961401{
13971402 {" datadir" , ' h' , " Path to the database root." , (G_PTR*) &mysql_data_home,
@@ -1508,7 +1513,12 @@ struct my_option xb_server_options[] =
15081513 " Use native AIO if supported on this platform." ,
15091514 (G_PTR*) &srv_use_native_aio,
15101515 (G_PTR*) &srv_use_native_aio, 0 , GET_BOOL, NO_ARG,
1511- TRUE , 0 , 0 , 0 , 0 , 0 },
1516+ #ifdef HAVE_URING
1517+ innodb_use_native_aio_default (),
1518+ #else
1519+ TRUE ,
1520+ #endif
1521+ 0 , 0 , 0 , 0 , 0 },
15121522 {" innodb_page_size" , OPT_INNODB_PAGE_SIZE,
15131523 " The universal page size of the database." ,
15141524 (G_PTR*) &innobase_page_size, (G_PTR*) &innobase_page_size, 0 ,
@@ -2071,8 +2081,12 @@ static bool innodb_init_param()
20712081msg (" InnoDB: Using Linux native AIO" );
20722082}
20732083#elif defined(HAVE_URING)
2074-
2075- if (srv_use_native_aio) {
2084+ if (!srv_use_native_aio) {
2085+ } else if (io_uring_may_be_unsafe) {
2086+ msg (" InnoDB: Using liburing on this kernel %s may cause hangs;"
2087+ " see https://jira.mariadb.org/browse/MDEV-26674" ,
2088+ io_uring_may_be_unsafe);
2089+ } else {
20762090msg (" InnoDB: Using liburing" );
20772091}
20782092#else
0 commit comments