=== modified file 'sql/mysqld.cc' --- sql/mysqld.cc 2012-02-21 19:51:56 +0000 +++ sql/mysqld.cc 2012-07-13 09:35:35 +0000 @@ -2017,14 +2017,6 @@ sql_print_error("Fatal error: Can't change to run as user '%s' ; Please check that the user exists!\n",user); unireg_abort(1); -#ifdef PR_SET_DUMPABLE - if (test_flags & TEST_CORE_ON_SIGNAL) - { - /* inform kernel that process is dumpable */ - (void) prctl(PR_SET_DUMPABLE, 1); - } -#endif - #endif return NULL; } @@ -2055,6 +2047,13 @@ sql_perror("setuid"); unireg_abort(1); } +#ifdef PR_SET_DUMPABLE + if (test_flags & TEST_CORE_ON_SIGNAL) + { + /* inform kernel that process is dumpable */ + (void) prctl(PR_SET_DUMPABLE, 1); + } +#endif #endif /* purecov: end */ } @@ -2074,6 +2073,13 @@ sql_perror("setreuid"); unireg_abort(1); } +#ifdef PR_SET_DUMPABLE + if (test_flags & TEST_CORE_ON_SIGNAL) + { + /* inform kernel that process is dumpable */ + (void) prctl(PR_SET_DUMPABLE, 1); + } +#endif #endif }