MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / set_root

Function set_root

sql/mysqld.cc:1309–1319  ·  view source on GitHub ↗

Change root user if started with @c --chroot . */

Source from the content-addressed store, hash-verified

1307
1308/** Change root user if started with @c --chroot . */
1309static void set_root(const char *path)
1310{
1311#if !defined(__WIN__)
1312 if (chroot(path) == -1)
1313 {
1314 sql_perror("chroot");
1315 unireg_abort(1);
1316 }
1317 my_setwd("/", MYF(0));
1318#endif
1319}
1320
1321
1322#endif /*!EMBEDDED_LIBRARY*/

Callers

nothing calls this directly

Calls 3

sql_perrorFunction · 0.85
unireg_abortFunction · 0.85
my_setwdFunction · 0.85

Tested by

no test coverage detected