mirror of
https://github.com/MariaDB/server.git
synced 2025-11-25 17:25:02 +03:00
Merge tag 'mariadb-10.0.23' into 10.0-galera
This commit is contained in:
@@ -220,7 +220,7 @@ set @had_proxies_priv_table= @@warning_count != 0;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS table_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, cardinality bigint(21) unsigned DEFAULT NULL, PRIMARY KEY (db_name,table_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Tables';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS column_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, column_name varchar(64) NOT NULL, min_value varchar(255) DEFAULT NULL, max_value varchar(255) DEFAULT NULL, nulls_ratio decimal(12,4) DEFAULT NULL, avg_length decimal(12,4) DEFAULT NULL, avg_frequency decimal(12,4) DEFAULT NULL, hist_size tinyint unsigned, hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'), histogram varbinary(255), PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
|
||||
CREATE TABLE IF NOT EXISTS column_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, column_name varchar(64) NOT NULL, min_value varbinary(255) DEFAULT NULL, max_value varbinary(255) DEFAULT NULL, nulls_ratio decimal(12,4) DEFAULT NULL, avg_length decimal(12,4) DEFAULT NULL, avg_frequency decimal(12,4) DEFAULT NULL, hist_size tinyint unsigned, hist_type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB'), histogram varbinary(255), PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
|
||||
|
||||
CREATE TABLE IF NOT EXISTS index_stats (db_name varchar(64) NOT NULL, table_name varchar(64) NOT NULL, index_name varchar(64) NOT NULL, prefix_arity int(11) unsigned NOT NULL, avg_frequency decimal(12,4) DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes';
|
||||
|
||||
|
||||
@@ -711,3 +711,5 @@ flush privileges;
|
||||
ALTER TABLE help_category MODIFY url TEXT NOT NULL;
|
||||
ALTER TABLE help_topic MODIFY url TEXT NOT NULL;
|
||||
|
||||
# MDEV-7383 - varbinary on mix/max of column_stats
|
||||
alter table column_stats modify min_value varbinary(255) DEFAULT NULL, modify max_value varbinary(255) DEFAULT NULL;
|
||||
|
||||
@@ -572,11 +572,9 @@ sub get_mysqladmin_options
|
||||
return $com;
|
||||
}
|
||||
|
||||
####
|
||||
#### Return a list of option files which can be opened. Similar, but not
|
||||
#### identical, to behavior of my_search_option_files()
|
||||
####
|
||||
|
||||
# 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;
|
||||
@@ -588,9 +586,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 $_ }
|
||||
('@sysconfdir@/my.cnf',
|
||||
return ('@sysconfdir@/my.cnf',
|
||||
'@sysconfdir@/mysql/my.cnf',
|
||||
'@prefix@/my.cnf',
|
||||
($ENV{MYSQL_HOME} ? "$ENV{MYSQL_HOME}/my.cnf" : undef),
|
||||
@@ -632,11 +628,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>)
|
||||
{
|
||||
@@ -649,6 +646,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;
|
||||
|
||||
Reference in New Issue
Block a user