mariadb/libmysqld
Mats Kindahl f8d2154c30 BUG#57108: mysqld crashes when I attempt to install plugin
If a relative path is supplied to option --defaults-file or
--defaults-extra-file, the server will crash when executing
an INSTALL PLUGIN command. The reason is that the defaults
file is initially read relative the current working directory
when the server is started, but when INSTALL PLUGIN is executed,
the server has changed working directory to the data directory.
Since there is no check that the call to my_load_defaults()
inside mysql_install_plugin(), the subsequence call to
free_defaults() will crash the server.

This patch fixes the problem by:

- Prepending the current working directory to the file name when
  a relative path is given to the --defaults-file or --defaults-
  extra-file option the first time my_load_defaults() is called,
  which is just after the server has started in main().

- Adding a check of the return value of my_load_defaults() inside
  mysql_install_plugin() and aborting command (with an error) if
  an error is returned.

- It also adds a check of the return value for load_defaults in
  lib_sql.cc for the embedded server since that was missing.

To test that the relative files for the options --defaults-file and
--defaults-extra-file is handled properly, mysql-test-run.pl is also
changed to not add a --defaults-file option if one is provided in the
tests *.opt file.
2010-11-04 11:00:59 +01:00
..
examples Patch for Bug#55854 (MySQL AB should not be AUTHOR, copyright incorrect). 2010-08-12 19:19:57 +04:00
CMakeLists.txt merge of mysql-5.5 into mysql-5.5-wl1054 2010-09-20 17:17:32 +03:00
copyright Added all changes from old 4.0 version: 2001-04-11 13:04:03 +02:00
emb_qcache.cc WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
emb_qcache.h WL#5030: Split and remove mysql_priv.h 2010-03-31 16:05:33 +02:00
embedded_priv.h WL#1054: Pluggable authentication support 2010-08-09 11:32:50 +03:00
lib_sql.cc BUG#57108: mysqld crashes when I attempt to install plugin 2010-11-04 11:00:59 +01:00
libmysqld.c WL#1054: Pluggable authentication support 2010-08-09 11:32:50 +03:00
libmysqld.def Fix build error with CMake 2.8 (mysql_stmt_next_result not exported 2009-12-22 21:49:37 +01:00
libmysqld.rc query_id and my_xid -> ulonglong 2005-01-27 22:38:56 +01:00
Makefile.am merge 2010-10-04 15:42:16 +03:00
resource.h query_id and my_xid -> ulonglong 2005-01-27 22:38:56 +01:00