mariadb/client
Praveenkumar Hulakund ff4040eeb3 Bug#14117012 - CHILD PROCESS MYSQL UTILITIES PICKING UP LOCAL
CONFIG FILES CAUSES TEST

Utility as "mysql_upgrade" forks "mysql"/"mysqlcheck". Attaching
"mysql_upgrade" shows following calls after forking "mysql" or
"mysql_check" when configuration file information is passed as
first argument to "mysql_upgrade".

strace -f ./mysql_upgrade --defaults-file=../pdb/my.cnf --socket=../pdb/mysql.sock -f

[pid  6254] stat("/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/etc/mysql/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/usr/local/mysql/etc/my.cnf", 0x7fff8e772680) = -1 ENOENT (No such file or directory)
[pid  6254] stat("/home/user_name/.my.cnf", {st_mode=S_IFREG|0664, st_size=19, ...}) = 0
[pid  6254] open("/home/user_name/.my.cnf", O_RDONLY) = 3


But when tool forks "mysqlcheck"/"mysql", "--no-defaults" is passed
as first argument. Before forking, in function "find_tool" of
"mysql_upgrade", check is made to verify whether tool can be
executable or not by calling "mysqlcheck --help" and "mysql --help".
But argument "--no-defaults", "--defaults-file" or
"defaults-extra-file" is not passed to "mysql" and "mysqlcheck".
So my.cnf is searched in default paths.

Fix:
------
Modified code to pass "--no-defaults" as first argument to "mysql"
and "mysqlcheck" while checking tool can be executed or not.
2014-01-31 09:19:12 +05:30
..
client_priv.h Updated/added copyright headers 2013-02-26 06:35:17 +01:00
CMakeLists.txt Updated/added copyright headers 2012-02-16 10:48:16 +01:00
completion_hash.cc Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
completion_hash.h Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
echo.c Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
get_password.c Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
my_readline.h Updated/added copyright headers 2011-06-30 17:46:53 +02:00
mysql.cc Merge of patch for bug#14685362 from mysql-5.1. 2013-03-18 12:46:06 +05:30
mysql_plugin.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mysql_upgrade.c Bug#14117012 - CHILD PROCESS MYSQL UTILITIES PICKING UP LOCAL 2014-01-31 09:19:12 +05:30
mysqladmin.cc Fix for Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 15:53:48 +01:00
mysqlbinlog.cc Bug#16607258 :Linker Errors Due To Inclusion Of An Implementation File 2013-05-14 22:52:42 +05:30
mysqlcheck.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mysqldump.c BUG#15844882: MYSQLDUMP FROM 5.5 FAILS WITH AN ERROR WHEN TRYING 2013-07-18 11:44:00 +05:30
mysqlimport.c Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
mysqlshow.c Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
mysqlslap.c Merge of patch for Bug#13928675 from mysql-5.1. 2012-08-07 19:07:13 +05:30
mysqltest.cc Bug #16402124 - MTR PROCESSES CERTAIN ASSIGNED VARDIR VALUES WRONG 2013-03-29 16:33:33 +05:30
readline.cc Build broken for gcc 4.5.1 in optimized mode. 2011-11-29 15:52:47 +01:00
sql_string.cc Updated/added copyright headers 2013-02-26 06:35:17 +01:00
sql_string.h BUG#14593883-REPLICATION BREAKS WHEN SET DATA TYPE 2013-03-13 16:29:11 +05:30