diff options
author | Igor Babaev <igor@askmonty.org> | 2013-01-10 22:33:23 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2013-01-10 22:33:23 -0800 |
commit | 1ef07d0845300ad200671f9809dcd9ee8b2ff837 (patch) | |
tree | 5c22187a94c73c7f8099a5d366ab3fd425f8e578 /scripts/mysql_system_tables.sql | |
parent | 421bbdcf1004806ccbee7b45d55e90ddc15c76ae (diff) | |
parent | f853333e09b222f6d6d76d9343b6202b4769ffab (diff) | |
download | mariadb-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/mysql_system_tables.sql')
-rw-r--r-- | scripts/mysql_system_tables.sql | 6 |
1 files changed, 6 insertions, 0 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'; |