Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
e05883bf
Commit
e05883bf
authored
Dec 05, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-7341 mysqld_multi doesn't recognize include directive (not following includes)
parent
ef47b625
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
scripts/mysqld_multi.sh
scripts/mysqld_multi.sh
+14
-6
No files found.
scripts/mysqld_multi.sh
View file @
e05883bf
...
...
@@ -486,6 +486,7 @@ sub get_mysqladmin_options
# Return a list of option files which can be opened. Similar, but not
# identical, to behavior of my_search_option_files()
# TODO implement and use my_print_defaults --list-groups instead
sub list_defaults_files
{
my %opt;
...
...
@@ -497,9 +498,7 @@ sub list_defaults_files
return ($opt{file}) if exists $opt{file};
my %seen; # Don'
t list the same file more than once
return
grep
{
defined
$_
and not
$seen
{
$_
}
++ and
-f
$_
and
-r
$_
}
(
'/etc/my.cnf'
,
return ('
/etc/my.cnf
',
'
/etc/mysql/my.cnf
',
'
@sysconfdir@/my.cnf
',
($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef),
...
...
@@ -539,11 +538,12 @@ sub find_groups
}
}
my %seen;
my @defaults_files = list_defaults_files();
#warn "@{[sort keys %gids]} -> @defaults_files\n";
foreach my
$file
(
@defaults_files
)
while (@defaults_files)
{
next unless open CONF,
"<
$file
"
;
my $file = shift @defaults_files;
next unless defined $file and not $seen{$file}++ and open CONF, '
<
', $file;
while (<CONF>)
{
...
...
@@ -556,6 +556,14 @@ sub find_groups
push @groups, "$1$2";
}
}
elsif (/^\s*!include\s+(\S.*?)\s*$/)
{
push @defaults_files, $1;
}
elsif (/^\s*!includedir\s+(\S.*?)\s*$/)
{
push @defaults_files, <$1/*.cnf>;
}
}
close CONF;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment