summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2013-01-10 22:33:23 -0800
committerIgor Babaev <igor@askmonty.org>2013-01-10 22:33:23 -0800
commit1ef07d0845300ad200671f9809dcd9ee8b2ff837 (patch)
tree5c22187a94c73c7f8099a5d366ab3fd425f8e578 /scripts
parent421bbdcf1004806ccbee7b45d55e90ddc15c76ae (diff)
parentf853333e09b222f6d6d76d9343b6202b4769ffab (diff)
downloadmariadb-git-1ef07d0845300ad200671f9809dcd9ee8b2ff837.tar.gz
Merge 10.0-base -> 10.0.
Also fixed a bug in sql_update.cc: the code of mysql_update() lacked a call of set_statistics_for_table().
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_system_tables.sql6
-rw-r--r--scripts/mysqlaccess.sh8
2 files changed, 10 insertions, 4 deletions
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
index 81121a9a42e..b822a164614 100644
--- a/scripts/mysql_system_tables.sql
+++ b/scripts/mysql_system_tables.sql
@@ -1595,3 +1595,9 @@ CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NUL
-- Remember for later if proxies_priv table already existed
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, 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';
diff --git a/scripts/mysqlaccess.sh b/scripts/mysqlaccess.sh
index bab0dbf5b87..9fb9e78e753 100644
--- a/scripts/mysqlaccess.sh
+++ b/scripts/mysqlaccess.sh
@@ -118,10 +118,10 @@ Usage: $script [host [user [db]]] OPTIONS
--rollback undo the last changes to the grant-tables.
Note:
- + At least the user and the db must be given (even with wildcards)
- + If no host is given, `localhost' is assumed
- + Wilcards (*,?,%,_) are allowed for host, user and db, but be sure
- to escape them from your shell!! (ie type \\* or '*')
+ At least the user and the db must be given (even with wildcards)
+ If no host is given, `localhost' is assumed
+ Wilcards (*,?,%,_) are allowed for host, user and db, but be sure
+ to escape them from your shell!! (ie type \\* or '*')
_OPTIONS
$RELEASE = <<'_RELEASE';