mariadb/mysql-test/std_data
Mats Kindahl d817b7cb8a 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
..
funcs_1
ndb_backup50
ndb_backup51
ndb_backup51_data_be
ndb_backup51_data_le
parts merge 2010-10-01 15:32:03 +02:00
14897.frm
bad_gis_data.dat
binlog_savepoint.000001
binlog_transaction.000001
bug15328.cnf
bug16266.000001
bug19371.frm
bug19371.MYD
bug19371.MYI
bug30435_5k.txt
bug30435_10k_items.txt
bug33029-slave-relay-bin.000001
bug35469.dat
bug36055.frm
bug36055.MYD
bug36055.MYI
bug37631.frm
bug37631.MYD
bug37631.MYI
bug40482-bin.000001
bug46565.ARZ
bug46565.frm
bug47012.ARM
bug47012.ARZ
bug47012.frm
bug47142_master-bin.000001
bug48265.frm
bug48449.frm
bug49823.CSM
bug49823.CSV
bug49823.frm
bug57108.cnf BUG#57108: mysqld crashes when I attempt to install plugin 2010-11-04 11:00:59 +01:00
cacert.pem
charset_utf8.txt
client-cert.pem
client-key.pem
corrupt-relay-bin.000624
corrupt_t1#P#p1.MYI
corrupt_t1.MYI
des_key_file
Index.xml
init_file.dat
intersect-bug50389.tsv
latin1.xml
loaddata1.dat
loaddata2.dat
loaddata3.dat
loaddata4.dat
loaddata5.dat
loaddata6.dat
loaddata_dq.dat
loaddata_pair.dat
loaddata_utf8.dat
loadxml.dat
loadxml2.dat
master-bin.000001
Moscow_leap
ndb_config_config.ini
ndb_config_mycnf1.cnf
ndb_config_mycnf2.cnf
numbers.txt
old_table-323.frm
rpl_bug28618.dat
rpl_loaddata.dat
rpl_loaddata2.dat
rpl_mixed.dat
rpl_timezone.dat
rpl_timezone2.dat
server-cert.pem
server-key.pem
server8k-cert.pem Bug#53463: YaSSL patch appears to be reverted 2010-07-28 12:59:19 -03:00
server8k-key.pem Bug#53463: YaSSL patch appears to be reverted 2010-07-28 12:59:19 -03:00
trunc_binlog.000001
untrusted-cacert.pem
vchar.frm
warnings_loaddata.dat
words.dat
words2.dat