mariadb/scripts
Shishir Jaiswal 32d6db3bfa Bug#19920049 - MYSQLD_MULTI MISLEADING WHEN MY_PRINT_DEFAULTS
IS NOT FOUND

DESCRIPTION
===========
If script mysqld_multi and utility my_print_defaults are in
the same folder (not included in $PATH) and the former is
made to run, it complaints that the mysqld binary is absent
eventhough the binary exists.

ANALYSIS
========
We've a subroutine my_which() mimicking the behaviour of
POSIX "which" command. Its current behaviour is to check
for a given argument as follows:
- Step 1: Assume the argument to be a command having full
fledged absolute path. If it exists "as-is", return the
argument (which will be pathname), else proceed to Step 2.
- Step 2: Assume the argument to be a plain command with no
aboslute path. Try locating it in all of the paths
(mentioned in $PATH) one by one. If found return the
pathname. If found nowhere, return NULL.

Currently when my_which(my_print_defaults) is called, it
returns from Step 1 (since utlity exists in current
folder) and doesn't proceed to Step 2. This is wrong since
the returned value is same as the argument i.e.
'my_print_default' which defies the purpose of this
subroutine whose job is to return a pathname either in Step
1 or Step 2.

Later when the utility is executed in subroutine
defaults_for_group(), it evaluates to NULL and returns the
same. This is because the plain command 'my_print_defaults
{options} ...' would execute properly only if
my_print_defaults exists in one of the paths (in $PATH). In
such a case, in the course of the flow it looks onto the
variable $mysqld_found which comes out to be NULL and
hence ethe error.

In this case, call to my_which should fail resulting in
script being aborted and thus avoiding this mess.

FIX
===
This utility my_print_defaults should be tested only in
Step 2 since it does not have an absolute path. Thus added
a condition in Step 1 so that is gets executed iff not
called for my_print_defaults thus bypassing it to proceed
to Step 2 where the check is made for various paths (in
$PATH)
2016-03-01 13:05:14 +05:30
..
CMakeLists.txt Bug#17633291: SET PROPER COMPILE OPTIONS FOR CLANG 2014-10-13 09:52:28 +02:00
comp_sql.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
dheadgen.pl Updated/added copyright headers 2011-06-30 17:46:53 +02:00
fill_help_tables.sql Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
msql2mysql.sh Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mysql_config.pl.in Bug#18235669 MYSQL_CONFIG TO PROVIDE R FLAG ON SOLARIS 2014-02-25 09:07:44 +01:00
mysql_config.sh Backport from trunk: 2014-05-12 15:21:23 +02:00
mysql_convert_table_format.sh Updated/added copyright headers 2011-06-30 17:37:13 +02:00
mysql_find_rows.sh
mysql_fix_extensions.sh
mysql_install_db.pl.in Bug #18957951 RPMBUILD DEPENDENCY SCANNER ADDS DEPENDENCY ON NON-EXISTING PERL "HOSTNAMES" 2014-11-06 10:12:13 +01:00
mysql_install_db.sh Bug #18957951 RPMBUILD DEPENDENCY SCANNER ADDS DEPENDENCY ON NON-EXISTING PERL "HOSTNAMES" 2014-11-06 10:12:13 +01:00
mysql_secure_installation.pl.in Bug#13741677 MYSQL_SECURE_INSTALLATION DOES NOT 2012-07-26 21:47:03 +05:30
mysql_secure_installation.sh Bug#13741677 MYSQL_SECURE_INSTALLATION DOES NOT 2012-07-26 21:47:03 +05:30
mysql_setpermission.sh Bug #14486004 MYSQL_SETPERMISSION DOES NOT QUOTE USER NAMES 2014-10-17 11:14:26 +05:30
mysql_system_tables.sql Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mysql_system_tables_data.sql Bug #12917164 DROP USER CAN'T DROP USERS WITH LEGACY 2013-10-31 23:14:33 +05:30
mysql_system_tables_fix.sql Bug #18415196 MYSQL_UPGRADE DUPLICATE KEY ERROR FOR MYSQL.USER FOR 5.5.35+, 5.6.15+, 5.7.3+ 2014-08-01 17:09:55 +05:30
mysql_test_data_timezone.sql Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mysql_zap.sh Updated/added copyright headers 2011-06-30 17:37:13 +02:00
mysqlaccess.conf Bug #19361402 - ADD --MANUAL-LLDB OPTION TO MYSQL-TEST-RUN.PL, contributed 2014-09-02 15:12:55 +05:30
mysqlaccess.sh Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mysqlbug.sh Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mysqld_multi.sh Bug#19920049 - MYSQLD_MULTI MISLEADING WHEN MY_PRINT_DEFAULTS 2016-03-01 13:05:14 +05:30
mysqld_safe.sh Bug#17619241 SERVICE OR MYSQLD_SAFE STARTS PICKING WRONG PLUGIN DIRECTORY 2015-01-16 07:27:01 +01:00
mysqldumpslow.sh Updated/added copyright headers 2011-06-30 17:37:13 +02:00
mysqlhotcopy.sh Bug #12992993 MYSQLHOTCOPY FAILS IF VIEW EXISTS 2012-08-14 15:13:30 +05:30