Commit b1101325 authored by Igor Babaev's avatar Igor Babaev

Changed the names of the system tables for statistical data:

  table_stat  -> table_stats
  column_stat -> column_stats
  index_stat  -> index_stats
to be in line with the names of innodb statistical tables 
from mysql-5.6: innodb_table_stats and innodb_index_stats.
parent f8bfb65b
if (`select count(*) < 3 from information_schema.tables if (`select count(*) < 3 from information_schema.tables
where table_schema = 'mysql' and table_name in ('table_stat','column_stat','index_stat')`) where table_schema = 'mysql' and table_name in ('table_stats','column_stats','index_stats')`)
{ {
--skip Needs stat tables --skip Needs stat tables
} }
...@@ -16,6 +16,6 @@ show create table proc; ...@@ -16,6 +16,6 @@ show create table proc;
show create table event; show create table event;
show create table general_log; show create table general_log;
show create table slow_log; show create table slow_log;
show create table table_stat; show create table table_stats;
show create table column_stat; show create table column_stats;
show create table index_stat; show create table index_stats;
...@@ -7,7 +7,7 @@ performance_schema ...@@ -7,7 +7,7 @@ performance_schema
test test
show tables in mysql; show tables in mysql;
Tables_in_mysql Tables_in_mysql
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -18,7 +18,7 @@ help_keyword ...@@ -18,7 +18,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -26,7 +26,7 @@ procs_priv ...@@ -26,7 +26,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
......
drop table if exists t1,t2; drop table if exists t1,t2;
show tables; show tables;
Tables_in_mysql Tables_in_mysql
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -12,7 +12,7 @@ help_keyword ...@@ -12,7 +12,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -20,7 +20,7 @@ procs_priv ...@@ -20,7 +20,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -38,7 +38,7 @@ grant ALL on *.* to test@localhost identified by "gambling"; ...@@ -38,7 +38,7 @@ grant ALL on *.* to test@localhost identified by "gambling";
grant ALL on *.* to test@127.0.0.1 identified by "gambling"; grant ALL on *.* to test@127.0.0.1 identified by "gambling";
show tables; show tables;
Tables_in_mysql Tables_in_mysql
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -49,7 +49,7 @@ help_keyword ...@@ -49,7 +49,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -57,7 +57,7 @@ procs_priv ...@@ -57,7 +57,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -83,7 +83,7 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number ...@@ -83,7 +83,7 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number
set password=old_password('gambling3'); set password=old_password('gambling3');
show tables; show tables;
Tables_in_mysql Tables_in_mysql
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -94,7 +94,7 @@ help_keyword ...@@ -94,7 +94,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -102,7 +102,7 @@ procs_priv ...@@ -102,7 +102,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
......
...@@ -81,7 +81,7 @@ TRIGGERS ...@@ -81,7 +81,7 @@ TRIGGERS
USER_PRIVILEGES USER_PRIVILEGES
USER_STATISTICS USER_STATISTICS
VIEWS VIEWS
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -92,7 +92,7 @@ help_keyword ...@@ -92,7 +92,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
plugin plugin
proc proc
procs_priv procs_priv
...@@ -104,7 +104,7 @@ t2 ...@@ -104,7 +104,7 @@ t2
t3 t3
t4 t4
t5 t5
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -123,7 +123,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS ...@@ -123,7 +123,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_STATISTICS TABLE_STATISTICS TABLE_STATISTICS TABLE_STATISTICS
TRIGGERS TRIGGERS TRIGGERS TRIGGERS
table_stat table_stat table_stats table_stats
tables_priv tables_priv tables_priv tables_priv
time_zone time_zone time_zone time_zone
time_zone_leap_second time_zone_leap_second time_zone_leap_second time_zone_leap_second
...@@ -145,7 +145,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS ...@@ -145,7 +145,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_STATISTICS TABLE_STATISTICS TABLE_STATISTICS TABLE_STATISTICS
TRIGGERS TRIGGERS TRIGGERS TRIGGERS
table_stat table_stat table_stats table_stats
tables_priv tables_priv tables_priv tables_priv
time_zone time_zone time_zone time_zone
time_zone_leap_second time_zone_leap_second time_zone_leap_second time_zone_leap_second
...@@ -167,7 +167,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS ...@@ -167,7 +167,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_STATISTICS TABLE_STATISTICS TABLE_STATISTICS TABLE_STATISTICS
TRIGGERS TRIGGERS TRIGGERS TRIGGERS
table_stat table_stat table_stats table_stats
tables_priv tables_priv tables_priv tables_priv
time_zone time_zone time_zone time_zone
time_zone_leap_second time_zone_leap_second time_zone_leap_second time_zone_leap_second
......
...@@ -19,7 +19,7 @@ mtr ...@@ -19,7 +19,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -29,7 +29,7 @@ mysql.help_keyword OK ...@@ -29,7 +29,7 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
...@@ -37,7 +37,7 @@ mysql.procs_priv OK ...@@ -37,7 +37,7 @@ mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.renamed_general_log OK mysql.renamed_general_log OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
......
...@@ -7,7 +7,7 @@ mtr ...@@ -7,7 +7,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -17,14 +17,14 @@ mysql.help_keyword OK ...@@ -17,14 +17,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -47,7 +47,7 @@ mtr ...@@ -47,7 +47,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -57,14 +57,14 @@ mysql.help_keyword OK ...@@ -57,14 +57,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -87,7 +87,7 @@ mtr ...@@ -87,7 +87,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -97,14 +97,14 @@ mysql.help_keyword OK ...@@ -97,14 +97,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -130,7 +130,7 @@ mtr ...@@ -130,7 +130,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -140,14 +140,14 @@ mysql.help_keyword OK ...@@ -140,14 +140,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -176,7 +176,7 @@ mtr ...@@ -176,7 +176,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -186,14 +186,14 @@ mysql.help_keyword OK ...@@ -186,14 +186,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -225,7 +225,7 @@ mtr ...@@ -225,7 +225,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -235,14 +235,14 @@ mysql.help_keyword OK ...@@ -235,14 +235,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -277,7 +277,7 @@ mtr ...@@ -277,7 +277,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -287,14 +287,14 @@ mysql.help_keyword OK ...@@ -287,14 +287,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
......
...@@ -9,7 +9,7 @@ mtr ...@@ -9,7 +9,7 @@ mtr
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql mysql
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -19,14 +19,14 @@ mysql.help_keyword OK ...@@ -19,14 +19,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
......
...@@ -3,7 +3,7 @@ drop view if exists v1; ...@@ -3,7 +3,7 @@ drop view if exists v1;
drop database if exists client_test_db; drop database if exists client_test_db;
mtr.global_suppressions OK mtr.global_suppressions OK
mtr.test_suppressions OK mtr.test_suppressions OK
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -13,14 +13,14 @@ mysql.help_keyword OK ...@@ -13,14 +13,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -30,7 +30,7 @@ mysql.time_zone_transition_type OK ...@@ -30,7 +30,7 @@ mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mtr.global_suppressions Table is already up to date mtr.global_suppressions Table is already up to date
mtr.test_suppressions Table is already up to date mtr.test_suppressions Table is already up to date
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -40,14 +40,14 @@ mysql.help_keyword OK ...@@ -40,14 +40,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -55,7 +55,7 @@ mysql.time_zone_name OK ...@@ -55,7 +55,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.column_stat OK mysql.column_stats OK
mysql.columns_priv OK mysql.columns_priv OK
mysql.db OK mysql.db OK
mysql.event OK mysql.event OK
...@@ -65,14 +65,14 @@ mysql.help_keyword OK ...@@ -65,14 +65,14 @@ mysql.help_keyword OK
mysql.help_relation OK mysql.help_relation OK
mysql.help_topic OK mysql.help_topic OK
mysql.host OK mysql.host OK
mysql.index_stat OK mysql.index_stats OK
mysql.ndb_binlog_index OK mysql.ndb_binlog_index OK
mysql.plugin OK mysql.plugin OK
mysql.proc OK mysql.proc OK
mysql.procs_priv OK mysql.procs_priv OK
mysql.proxies_priv OK mysql.proxies_priv OK
mysql.servers OK mysql.servers OK
mysql.table_stat OK mysql.table_stats OK
mysql.tables_priv OK mysql.tables_priv OK
mysql.time_zone OK mysql.time_zone OK
mysql.time_zone_leap_second OK mysql.time_zone_leap_second OK
...@@ -80,7 +80,7 @@ mysql.time_zone_name OK ...@@ -80,7 +80,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.user OK mysql.user OK
mysql.column_stat Table is already up to date mysql.column_stats Table is already up to date
mysql.columns_priv Table is already up to date mysql.columns_priv Table is already up to date
mysql.db Table is already up to date mysql.db Table is already up to date
mysql.event Table is already up to date mysql.event Table is already up to date
...@@ -90,14 +90,14 @@ mysql.help_keyword Table is already up to date ...@@ -90,14 +90,14 @@ mysql.help_keyword Table is already up to date
mysql.help_relation Table is already up to date mysql.help_relation Table is already up to date
mysql.help_topic Table is already up to date mysql.help_topic Table is already up to date
mysql.host Table is already up to date mysql.host Table is already up to date
mysql.index_stat Table is already up to date mysql.index_stats Table is already up to date
mysql.ndb_binlog_index Table is already up to date mysql.ndb_binlog_index Table is already up to date
mysql.plugin Table is already up to date mysql.plugin Table is already up to date
mysql.proc Table is already up to date mysql.proc Table is already up to date
mysql.procs_priv Table is already up to date mysql.procs_priv Table is already up to date
mysql.proxies_priv Table is already up to date mysql.proxies_priv Table is already up to date
mysql.servers Table is already up to date mysql.servers Table is already up to date
mysql.table_stat Table is already up to date mysql.table_stats Table is already up to date
mysql.tables_priv Table is already up to date mysql.tables_priv Table is already up to date
mysql.time_zone Table is already up to date mysql.time_zone Table is already up to date
mysql.time_zone_leap_second Table is already up to date mysql.time_zone_leap_second Table is already up to date
......
...@@ -11,7 +11,7 @@ CREATE DATABASE dbt3_s001; ...@@ -11,7 +11,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001; use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off'; set optimizer_switch='extended_keys=off';
select * from mysql.table_stat; select * from mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 customer 150 dbt3_s001 customer 150
dbt3_s001 lineitem 6005 dbt3_s001 lineitem 6005
...@@ -21,7 +21,7 @@ dbt3_s001 part 200 ...@@ -21,7 +21,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700 dbt3_s001 partsupp 700
dbt3_s001 region 5 dbt3_s001 region 5
dbt3_s001 supplier 10 dbt3_s001 supplier 10
select * from mysql.index_stat; select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000 dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000 dbt3_s001 customer i_c_nationkey 1 6.0000
...@@ -83,8 +83,8 @@ n_name revenue ...@@ -83,8 +83,8 @@ n_name revenue
PERU 321915.8715 PERU 321915.8715
ARGENTINA 69817.1451 ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stat; delete from mysql.index_stats;
select * from mysql.table_stat; select * from mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 customer 150 dbt3_s001 customer 150
dbt3_s001 lineitem 6005 dbt3_s001 lineitem 6005
...@@ -94,7 +94,7 @@ dbt3_s001 part 200 ...@@ -94,7 +94,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700 dbt3_s001 partsupp 700
dbt3_s001 region 5 dbt3_s001 region 5
dbt3_s001 supplier 10 dbt3_s001 supplier 10
select * from mysql.index_stat; select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000 dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000 dbt3_s001 customer i_c_nationkey 1 6.0000
...@@ -124,24 +124,24 @@ dbt3_s001 partsupp i_ps_suppkey 1 70.0000 ...@@ -124,24 +124,24 @@ dbt3_s001 partsupp i_ps_suppkey 1 70.0000
dbt3_s001 region PRIMARY 1 1.0000 dbt3_s001 region PRIMARY 1 1.0000
dbt3_s001 supplier PRIMARY 1 1.0000 dbt3_s001 supplier PRIMARY 1 1.0000
dbt3_s001 supplier i_s_nationkey 1 1.1111 dbt3_s001 supplier i_s_nationkey 1 1.1111
select * from mysql.table_stat where table_name='orders'; select * from mysql.table_stats where table_name='orders';
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 orders 1500 dbt3_s001 orders 1500
select * from mysql.index_stat where table_name='orders'; select * from mysql.index_stats where table_name='orders';
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 orders PRIMARY 1 1.0000 dbt3_s001 orders PRIMARY 1 1.0000
dbt3_s001 orders i_o_orderdate 1 1.3321 dbt3_s001 orders i_o_orderdate 1 1.3321
dbt3_s001 orders i_o_custkey 1 15.0000 dbt3_s001 orders i_o_custkey 1 15.0000
select (select cardinality from mysql.table_stat where table_name='orders') / select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stat (select avg_frequency from mysql.index_stats
where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct; where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct;
n_distinct n_distinct
1126.0416 1126.0416
select count(distinct o_orderdate) from orders; select count(distinct o_orderdate) from orders;
count(distinct o_orderdate) count(distinct o_orderdate)
1126 1126
select (select cardinality from mysql.table_stat where table_name='orders') / select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stat (select avg_frequency from mysql.index_stats
where index_name='i_o_custkey' and prefix_arity=1) as n_distinct; where index_name='i_o_custkey' and prefix_arity=1) as n_distinct;
n_distinct n_distinct
100.0000 100.0000
......
...@@ -14,7 +14,7 @@ CREATE DATABASE dbt3_s001; ...@@ -14,7 +14,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001; use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off'; set optimizer_switch='extended_keys=off';
select * from mysql.table_stat; select * from mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 customer 150 dbt3_s001 customer 150
dbt3_s001 lineitem 6005 dbt3_s001 lineitem 6005
...@@ -24,7 +24,7 @@ dbt3_s001 part 200 ...@@ -24,7 +24,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700 dbt3_s001 partsupp 700
dbt3_s001 region 5 dbt3_s001 region 5
dbt3_s001 supplier 10 dbt3_s001 supplier 10
select * from mysql.index_stat; select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000 dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000 dbt3_s001 customer i_c_nationkey 1 6.0000
...@@ -86,8 +86,8 @@ n_name revenue ...@@ -86,8 +86,8 @@ n_name revenue
PERU 321915.8715 PERU 321915.8715
ARGENTINA 69817.1451 ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stat; delete from mysql.index_stats;
select * from mysql.table_stat; select * from mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 customer 150 dbt3_s001 customer 150
dbt3_s001 lineitem 6005 dbt3_s001 lineitem 6005
...@@ -97,7 +97,7 @@ dbt3_s001 part 200 ...@@ -97,7 +97,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700 dbt3_s001 partsupp 700
dbt3_s001 region 5 dbt3_s001 region 5
dbt3_s001 supplier 10 dbt3_s001 supplier 10
select * from mysql.index_stat; select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000 dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000 dbt3_s001 customer i_c_nationkey 1 6.0000
...@@ -149,26 +149,26 @@ dbt3_s001 region PRIMARY 1 1.0000 ...@@ -149,26 +149,26 @@ dbt3_s001 region PRIMARY 1 1.0000
dbt3_s001 supplier PRIMARY 1 1.0000 dbt3_s001 supplier PRIMARY 1 1.0000
dbt3_s001 supplier i_s_nationkey 1 1.1111 dbt3_s001 supplier i_s_nationkey 1 1.1111
dbt3_s001 supplier i_s_nationkey 2 1.0000 dbt3_s001 supplier i_s_nationkey 2 1.0000
select * from mysql.table_stat where table_name='orders'; select * from mysql.table_stats where table_name='orders';
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 orders 1500 dbt3_s001 orders 1500
select * from mysql.index_stat where table_name='orders'; select * from mysql.index_stats where table_name='orders';
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 orders PRIMARY 1 1.0000 dbt3_s001 orders PRIMARY 1 1.0000
dbt3_s001 orders i_o_orderdate 1 1.3321 dbt3_s001 orders i_o_orderdate 1 1.3321
dbt3_s001 orders i_o_orderdate 2 1.0000 dbt3_s001 orders i_o_orderdate 2 1.0000
dbt3_s001 orders i_o_custkey 1 15.0000 dbt3_s001 orders i_o_custkey 1 15.0000
dbt3_s001 orders i_o_custkey 2 1.0000 dbt3_s001 orders i_o_custkey 2 1.0000
select (select cardinality from mysql.table_stat where table_name='orders') / select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stat (select avg_frequency from mysql.index_stats
where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct; where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct;
n_distinct n_distinct
1126.0416 1126.0416
select count(distinct o_orderdate) from orders; select count(distinct o_orderdate) from orders;
count(distinct o_orderdate) count(distinct o_orderdate)
1126 1126
select (select cardinality from mysql.table_stat where table_name='orders') / select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stat (select avg_frequency from mysql.index_stats
where index_name='i_o_custkey' and prefix_arity=1) as n_distinct; where index_name='i_o_custkey' and prefix_arity=1) as n_distinct;
n_distinct n_distinct
100.0000 100.0000
......
...@@ -5,7 +5,7 @@ CREATE DATABASE dbt3_s001; ...@@ -5,7 +5,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001; use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off'; set optimizer_switch='extended_keys=off';
select * from mysql.table_stat; select * from mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 customer 150 dbt3_s001 customer 150
dbt3_s001 lineitem 6005 dbt3_s001 lineitem 6005
...@@ -15,7 +15,7 @@ dbt3_s001 part 200 ...@@ -15,7 +15,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700 dbt3_s001 partsupp 700
dbt3_s001 region 5 dbt3_s001 region 5
dbt3_s001 supplier 10 dbt3_s001 supplier 10
select * from mysql.index_stat; select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000 dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000 dbt3_s001 customer i_c_nationkey 1 6.0000
...@@ -80,7 +80,7 @@ revenue ...@@ -80,7 +80,7 @@ revenue
77949.91860000002 77949.91860000002
set use_stat_tables='preferably'; set use_stat_tables='preferably';
set debug_sync='RESET'; set debug_sync='RESET';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -94,10 +94,10 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500 ...@@ -94,10 +94,10 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500
dbt3_s001 lineitem i_l_suppkey 1 600.5000 dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
delete from mysql.index_stat delete from mysql.index_stats
where table_name='lineitem' and where table_name='lineitem' and
index_name in ('i_l_shipdate', 'i_l_receiptdate'); index_name in ('i_l_shipdate', 'i_l_receiptdate');
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -110,7 +110,7 @@ dbt3_s001 lineitem i_l_suppkey 1 600.5000 ...@@ -110,7 +110,7 @@ dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
analyze table lineitem persistent for columns() indexes (i_l_shipdate); analyze table lineitem persistent for columns() indexes (i_l_shipdate);
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -123,9 +123,9 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500 ...@@ -123,9 +123,9 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500
dbt3_s001 lineitem i_l_suppkey 1 600.5000 dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
delete from mysql.index_stat delete from mysql.index_stats
where table_name='lineitem' and index_name= 'i_l_shipdate'; where table_name='lineitem' and index_name= 'i_l_shipdate';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -148,7 +148,7 @@ use dbt3_s001; ...@@ -148,7 +148,7 @@ use dbt3_s001;
set use_stat_tables='preferably'; set use_stat_tables='preferably';
analyze table lineitem persistent for columns() indexes (i_l_receiptdate); analyze table lineitem persistent for columns() indexes (i_l_receiptdate);
set debug_sync='RESET'; set debug_sync='RESET';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
......
...@@ -8,7 +8,7 @@ CREATE DATABASE dbt3_s001; ...@@ -8,7 +8,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001; use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch; set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off'; set optimizer_switch='extended_keys=off';
select * from mysql.table_stat; select * from mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
dbt3_s001 customer 150 dbt3_s001 customer 150
dbt3_s001 lineitem 6005 dbt3_s001 lineitem 6005
...@@ -18,7 +18,7 @@ dbt3_s001 part 200 ...@@ -18,7 +18,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700 dbt3_s001 partsupp 700
dbt3_s001 region 5 dbt3_s001 region 5
dbt3_s001 supplier 10 dbt3_s001 supplier 10
select * from mysql.index_stat; select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000 dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000 dbt3_s001 customer i_c_nationkey 1 6.0000
...@@ -83,7 +83,7 @@ revenue ...@@ -83,7 +83,7 @@ revenue
77949.91860000002 77949.91860000002
set use_stat_tables='preferably'; set use_stat_tables='preferably';
set debug_sync='RESET'; set debug_sync='RESET';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -97,10 +97,10 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500 ...@@ -97,10 +97,10 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500
dbt3_s001 lineitem i_l_suppkey 1 600.5000 dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
delete from mysql.index_stat delete from mysql.index_stats
where table_name='lineitem' and where table_name='lineitem' and
index_name in ('i_l_shipdate', 'i_l_receiptdate'); index_name in ('i_l_shipdate', 'i_l_receiptdate');
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -113,7 +113,7 @@ dbt3_s001 lineitem i_l_suppkey 1 600.5000 ...@@ -113,7 +113,7 @@ dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
analyze table lineitem persistent for columns() indexes (i_l_shipdate); analyze table lineitem persistent for columns() indexes (i_l_shipdate);
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -126,9 +126,9 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500 ...@@ -126,9 +126,9 @@ dbt3_s001 lineitem i_l_shipdate 1 2.6500
dbt3_s001 lineitem i_l_suppkey 1 600.5000 dbt3_s001 lineitem i_l_suppkey 1 600.5000
dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786 dbt3_s001 lineitem i_l_suppkey_partkey 2 8.5786
dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250 dbt3_s001 lineitem i_l_suppkey_partkey 1 30.0250
delete from mysql.index_stat delete from mysql.index_stats
where table_name='lineitem' and index_name= 'i_l_shipdate'; where table_name='lineitem' and index_name= 'i_l_shipdate';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
...@@ -151,7 +151,7 @@ use dbt3_s001; ...@@ -151,7 +151,7 @@ use dbt3_s001;
set use_stat_tables='preferably'; set use_stat_tables='preferably';
analyze table lineitem persistent for columns() indexes (i_l_receiptdate); analyze table lineitem persistent for columns() indexes (i_l_receiptdate);
set debug_sync='RESET'; set debug_sync='RESET';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 lineitem PRIMARY 1 4.0033 dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000 dbt3_s001 lineitem PRIMARY 2 1.0000
......
drop table if exists t1,t2; drop table if exists t1,t2;
set @save_use_stat_tables=@@use_stat_tables; set @save_use_stat_tables=@@use_stat_tables;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
set use_stat_tables='preferably'; set use_stat_tables='preferably';
CREATE TABLE t1 ( CREATE TABLE t1 (
a int NOT NULL PRIMARY KEY, a int NOT NULL PRIMARY KEY,
...@@ -60,10 +60,10 @@ INSERT INTO t1 VALUES ...@@ -60,10 +60,10 @@ INSERT INTO t1 VALUES
ANALYZE TABLE t1; ANALYZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -71,7 +71,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -71,7 +71,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -85,7 +85,7 @@ test t1 idx4 3 1.1304 ...@@ -85,7 +85,7 @@ test t1 idx4 3 1.1304
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
40 40
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='a'; WHERE db_name='test' AND table_name='t1' AND column_name='a';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
...@@ -97,7 +97,7 @@ SELECT MIN(t1.a), MAX(t1.a), ...@@ -97,7 +97,7 @@ SELECT MIN(t1.a), MAX(t1.a),
FROM t1; FROM t1;
MIN(t1.a) MAX(t1.a) NULLS_RATIO(t1.a) AVG_FREQUENCY(t1.a) MIN(t1.a) MAX(t1.a) NULLS_RATIO(t1.a) AVG_FREQUENCY(t1.a)
0 49 0.2000 1.0000 0 49 0.2000 1.0000
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='b'; WHERE db_name='test' AND table_name='t1' AND column_name='b';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -109,7 +109,7 @@ SELECT MIN(t1.b), MAX(t1.b), ...@@ -109,7 +109,7 @@ SELECT MIN(t1.b), MAX(t1.b),
FROM t1; FROM t1;
MIN(t1.b) MAX(t1.b) NULLS_RATIO(t1.b) AVG_FREQUENCY(t1.b) MIN(t1.b) MAX(t1.b) NULLS_RATIO(t1.b) AVG_FREQUENCY(t1.b)
vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000 vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 6.4000
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='c'; WHERE db_name='test' AND table_name='t1' AND column_name='c';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
...@@ -121,7 +121,7 @@ SELECT MIN(t1.c), MAX(t1.c), ...@@ -121,7 +121,7 @@ SELECT MIN(t1.c), MAX(t1.c),
FROM t1; FROM t1;
MIN(t1.c) MAX(t1.c) NULLS_RATIO(t1.c) AVG_FREQUENCY(t1.c) MIN(t1.c) MAX(t1.c) NULLS_RATIO(t1.c) AVG_FREQUENCY(t1.c)
aaaa dddddddd 0.1250 7.0000 aaaa dddddddd 0.1250 7.0000
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='d'; WHERE db_name='test' AND table_name='t1' AND column_name='d';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
...@@ -133,7 +133,7 @@ SELECT MIN(t1.d), MAX(t1.d), ...@@ -133,7 +133,7 @@ SELECT MIN(t1.d), MAX(t1.d),
FROM t1; FROM t1;
MIN(t1.d) MAX(t1.d) NULLS_RATIO(t1.d) AVG_FREQUENCY(t1.d) MIN(t1.d) MAX(t1.d) NULLS_RATIO(t1.d) AVG_FREQUENCY(t1.d)
1989-03-12 1999-07-23 0.1500 8.5000 1989-03-12 1999-07-23 0.1500 8.5000
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='e'; WHERE db_name='test' AND table_name='t1' AND column_name='e';
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
...@@ -145,7 +145,7 @@ SELECT MIN(t1.e), MAX(t1.e), ...@@ -145,7 +145,7 @@ SELECT MIN(t1.e), MAX(t1.e),
FROM t1; FROM t1;
MIN(t1.e) MAX(t1.e) NULLS_RATIO(t1.e) AVG_FREQUENCY(t1.e) MIN(t1.e) MAX(t1.e) NULLS_RATIO(t1.e) AVG_FREQUENCY(t1.e)
0.01 0.112 0.2250 6.2000 0.01 0.112 0.2250 6.2000
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx1'; WHERE db_name='test' AND table_name='t1' AND index_name='idx1';
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -160,7 +160,7 @@ WHERE t1.b IS NOT NULL AND t1.e IS NOT NULL) ...@@ -160,7 +160,7 @@ WHERE t1.b IS NOT NULL AND t1.e IS NOT NULL)
AS 'ARITY 2'; AS 'ARITY 2';
ARITY 1 ARITY 2 ARITY 1 ARITY 2
6.4000 1.6875 6.4000 1.6875
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx2'; WHERE db_name='test' AND table_name='t1' AND index_name='idx2';
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
...@@ -175,7 +175,7 @@ WHERE t1.c IS NOT NULL AND t1.d IS NOT NULL) ...@@ -175,7 +175,7 @@ WHERE t1.c IS NOT NULL AND t1.d IS NOT NULL)
AS 'ARITY 2'; AS 'ARITY 2';
ARITY 1 ARITY 2 ARITY 1 ARITY 2
7.0000 2.3846 7.0000 2.3846
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx3'; WHERE db_name='test' AND table_name='t1' AND index_name='idx3';
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
...@@ -185,7 +185,7 @@ SELECT ...@@ -185,7 +185,7 @@ SELECT
AS 'ARITY 1'; AS 'ARITY 1';
ARITY 1 ARITY 1
8.5000 8.5000
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx4'; WHERE db_name='test' AND table_name='t1' AND index_name='idx4';
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx4 1 6.2000 test t1 idx4 1 6.2000
...@@ -233,11 +233,11 @@ INSERT INTO t3 VALUES ...@@ -233,11 +233,11 @@ INSERT INTO t3 VALUES
ANALYZE TABLE t3; ANALYZE TABLE t3;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t3 analyze status OK test.t3 analyze status OK
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
test t3 17 test t3 17
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -248,7 +248,7 @@ test t1 f 1 5 0.2000 1.0000 6.4000 ...@@ -248,7 +248,7 @@ test t1 f 1 5 0.2000 1.0000 6.4000
test t3 a 0 38 0.0000 4.0000 1.0000 test t3 a 0 38 0.0000 4.0000 1.0000
test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000 test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000
test t3 c aaaa dddddddd 0.1176 6.4000 3.7500 test t3 c aaaa dddddddd 0.1176 6.4000 3.7500
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -262,11 +262,11 @@ test t1 idx4 3 1.1304 ...@@ -262,11 +262,11 @@ test t1 idx4 3 1.1304
test t3 PRIMARY 1 1.0000 test t3 PRIMARY 1 1.0000
test t3 idx 1 3.7500 test t3 idx 1 3.7500
ALTER TABLE t1 RENAME TO s1; ALTER TABLE t1 RENAME TO s1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test s1 40 test s1 40
test t3 17 test t3 17
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test s1 a 0 49 0.0000 4.0000 1.0000 test s1 a 0 49 0.0000 4.0000 1.0000
test s1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test s1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -277,7 +277,7 @@ test s1 f 1 5 0.2000 1.0000 6.4000 ...@@ -277,7 +277,7 @@ test s1 f 1 5 0.2000 1.0000 6.4000
test t3 a 0 38 0.0000 4.0000 1.0000 test t3 a 0 38 0.0000 4.0000 1.0000
test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000 test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000
test t3 c aaaa dddddddd 0.1176 6.4000 3.7500 test t3 c aaaa dddddddd 0.1176 6.4000 3.7500
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test s1 PRIMARY 1 1.0000 test s1 PRIMARY 1 1.0000
test s1 idx1 1 6.4000 test s1 idx1 1 6.4000
...@@ -291,11 +291,11 @@ test s1 idx4 3 1.1304 ...@@ -291,11 +291,11 @@ test s1 idx4 3 1.1304
test t3 PRIMARY 1 1.0000 test t3 PRIMARY 1 1.0000
test t3 idx 1 3.7500 test t3 idx 1 3.7500
RENAME TABLE s1 TO t1; RENAME TABLE s1 TO t1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
test t3 17 test t3 17
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -306,7 +306,7 @@ test t1 f 1 5 0.2000 1.0000 6.4000 ...@@ -306,7 +306,7 @@ test t1 f 1 5 0.2000 1.0000 6.4000
test t3 a 0 38 0.0000 4.0000 1.0000 test t3 a 0 38 0.0000 4.0000 1.0000
test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000 test t3 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.1765 18.0714 2.8000
test t3 c aaaa dddddddd 0.1176 6.4000 3.7500 test t3 c aaaa dddddddd 0.1176 6.4000 3.7500
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -320,10 +320,10 @@ test t1 idx4 3 1.1304 ...@@ -320,10 +320,10 @@ test t1 idx4 3 1.1304
test t3 PRIMARY 1 1.0000 test t3 PRIMARY 1 1.0000
test t3 idx 1 3.7500 test t3 idx 1 3.7500
DROP TABLE t3; DROP TABLE t3;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -331,7 +331,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -331,7 +331,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -364,7 +364,7 @@ t1 CREATE TABLE `t1` ( ...@@ -364,7 +364,7 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`y`,`x`,`d`) KEY `idx4` (`y`,`x`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -389,7 +389,7 @@ t1 CREATE TABLE `t1` ( ...@@ -389,7 +389,7 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`b`,`d`) KEY `idx4` (`e`,`b`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -413,10 +413,10 @@ s1 CREATE TABLE `s1` ( ...@@ -413,10 +413,10 @@ s1 CREATE TABLE `s1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`x`,`d`) KEY `idx4` (`e`,`x`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test s1 40 test s1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test s1 a 0 49 0.0000 4.0000 1.0000 test s1 a 0 49 0.0000 4.0000 1.0000
test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test s1 x vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -424,7 +424,7 @@ test s1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -424,7 +424,7 @@ test s1 c aaaa dddddddd 0.1250 6.6571 7.0000
test s1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test s1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test s1 e 0.01 0.112 0.2250 8.0000 6.2000 test s1 e 0.01 0.112 0.2250 8.0000 6.2000
test s1 f 1 5 0.2000 1.0000 6.4000 test s1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test s1 PRIMARY 1 1.0000 test s1 PRIMARY 1 1.0000
test s1 idx1 1 6.4000 test s1 idx1 1 6.4000
...@@ -451,10 +451,10 @@ t1 CREATE TABLE `t1` ( ...@@ -451,10 +451,10 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`b`,`d`) KEY `idx4` (`e`,`b`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -462,7 +462,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -462,7 +462,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -489,14 +489,14 @@ t1 CREATE TABLE `t1` ( ...@@ -489,14 +489,14 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`x`,`d`) KEY `idx4` (`e`,`x`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
...@@ -523,14 +523,14 @@ t1 CREATE TABLE `t1` ( ...@@ -523,14 +523,14 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`b`,`d`) KEY `idx4` (`e`,`b`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
...@@ -539,7 +539,7 @@ test t1 idx3 1 8.5000 ...@@ -539,7 +539,7 @@ test t1 idx3 1 8.5000
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -547,7 +547,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -547,7 +547,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
...@@ -558,12 +558,12 @@ test t1 idx3 1 8.5000 ...@@ -558,12 +558,12 @@ test t1 idx3 1 8.5000
test t1 idx4 1 6.2000 test t1 idx4 1 6.2000
test t1 idx1 2 1.6875 test t1 idx1 2 1.6875
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_column_stat' SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_column_stats'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'
FROM mysql.column_stat WHERE column_name='b'; FROM mysql.column_stats WHERE column_name='b';
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_index_stat' SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/save_index_stats'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'
FROM mysql.index_stat WHERE index_name IN ('idx1', 'idx4'); FROM mysql.index_stats WHERE index_name IN ('idx1', 'idx4');
ALTER TABLE t1 CHANGE COLUMN b x varchar(30); ALTER TABLE t1 CHANGE COLUMN b x varchar(30);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
...@@ -580,14 +580,14 @@ t1 CREATE TABLE `t1` ( ...@@ -580,14 +580,14 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`x`,`d`) KEY `idx4` (`e`,`x`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
...@@ -614,26 +614,26 @@ t1 CREATE TABLE `t1` ( ...@@ -614,26 +614,26 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`b`,`d`) KEY `idx4` (`e`,`b`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
test t1 idx2 2 2.3846 test t1 idx2 2 2.3846
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/save_column_stat' LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/save_column_stats'
INTO TABLE mysql.column_stat INTO TABLE mysql.column_stats
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/save_index_stat' LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/save_index_stats'
INTO TABLE mysql.index_stat INTO TABLE mysql.index_stats
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -641,7 +641,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -641,7 +641,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
...@@ -667,14 +667,14 @@ t1 CREATE TABLE `t1` ( ...@@ -667,14 +667,14 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`d`) KEY `idx4` (`e`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
...@@ -694,7 +694,7 @@ t1 CREATE TABLE `t1` ( ...@@ -694,7 +694,7 @@ t1 CREATE TABLE `t1` (
KEY `idx3` (`d`), KEY `idx3` (`d`),
KEY `idx4` (`e`,`d`) KEY `idx4` (`e`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
...@@ -730,21 +730,21 @@ t1 CREATE TABLE `t1` ( ...@@ -730,21 +730,21 @@ t1 CREATE TABLE `t1` (
KEY `idx2` (`c`,`d`), KEY `idx2` (`c`,`d`),
KEY `idx4` (`e`,`b`,`d`) KEY `idx4` (`e`,`b`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b NULL NULL 1.0000 NULL NULL test t1 b NULL NULL 1.0000 NULL NULL
...@@ -752,7 +752,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -752,7 +752,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
...@@ -767,7 +767,7 @@ UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); ...@@ -767,7 +767,7 @@ UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a);
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -775,7 +775,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -775,7 +775,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
...@@ -799,14 +799,14 @@ t1 CREATE TABLE `t1` ( ...@@ -799,14 +799,14 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `idx3` (`d`) KEY `idx3` (`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
...@@ -829,21 +829,21 @@ t1 CREATE TABLE `t1` ( ...@@ -829,21 +829,21 @@ t1 CREATE TABLE `t1` (
KEY `idx2` (`c`,`d`), KEY `idx2` (`c`,`d`),
KEY `idx4` (`e`,`b`,`d`) KEY `idx4` (`e`,`b`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
...@@ -851,7 +851,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 ...@@ -851,7 +851,7 @@ test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx4 1 6.2000 test t1 idx4 1 6.2000
...@@ -862,39 +862,39 @@ test t1 idx2 1 7.0000 ...@@ -862,39 +862,39 @@ test t1 idx2 1 7.0000
test t1 idx1 2 1.6875 test t1 idx1 2 1.6875
test t1 idx1 1 6.4000 test t1 idx1 1 6.4000
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES();
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date test.t1 analyze status Table is already up to date
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date test.t1 analyze status Table is already up to date
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
test t1 idx2 2 2.3846 test t1 idx2 2 2.3846
test t1 idx4 1 6.2000 test t1 idx4 1 6.2000
test t1 idx4 2 1.6875 test t1 idx4 2 1.6875
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
DELETE FROM mysql.index_stat WHERE table_name='t1' AND index_name='primary'; DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary';
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
test t1 idx2 2 2.3846 test t1 idx2 2 2.3846
...@@ -904,7 +904,7 @@ test t1 idx4 3 1.1304 ...@@ -904,7 +904,7 @@ test t1 idx4 3 1.1304
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary);
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date test.t1 analyze status Table is already up to date
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000 test t1 idx2 1 7.0000
test t1 idx2 2 2.3846 test t1 idx2 2 2.3846
...@@ -912,16 +912,16 @@ test t1 idx4 1 6.2000 ...@@ -912,16 +912,16 @@ test t1 idx4 1 6.2000
test t1 idx4 2 1.6875 test t1 idx4 2 1.6875
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date test.t1 analyze status Table is already up to date
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
...@@ -929,7 +929,7 @@ test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 ...@@ -929,7 +929,7 @@ test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000 test t1 b vvvvvvvvvvvvv zzzzzzzzzzzzzzzzzz 0.2000 17.1250 6.4000
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
...@@ -946,11 +946,11 @@ INSERT INTO t2 SELECT * FROM t1; ...@@ -946,11 +946,11 @@ INSERT INTO t2 SELECT * FROM t1;
ANALYZE TABLE t2; ANALYZE TABLE t2;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t2 analyze status OK test.t2 analyze status OK
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
db_name table_name cardinality db_name table_name cardinality
test t1 40 test t1 40
test t2 40 test t2 40
SELECT * FROM mysql.column_stat ORDER BY column_name; SELECT * FROM mysql.column_stats ORDER BY column_name;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t2 a 0 49 0.0000 4.0000 1.0000 test t2 a 0 49 0.0000 4.0000 1.0000
...@@ -964,7 +964,7 @@ test t1 e 0.01 0.112 0.2250 8.0000 6.2000 ...@@ -964,7 +964,7 @@ test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t2 e 0.01 0.112 0.2250 8.0000 6.2000 test t2 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
test t2 f 1 5 0.2000 1.0000 6.4000 test t2 f 1 5 0.2000 1.0000 6.4000
SELECT * FROM mysql.index_stat ORDER BY index_name, prefix_arity, table_name; SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t2 PRIMARY 1 1.0000 test t2 PRIMARY 1 1.0000
...@@ -984,9 +984,9 @@ test t1 idx4 2 1.6875 ...@@ -984,9 +984,9 @@ test t1 idx4 2 1.6875
test t2 idx4 2 1.6875 test t2 idx4 2 1.6875
test t1 idx4 3 1.1304 test t1 idx4 3 1.1304
test t2 idx4 3 1.1304 test t2 idx4 3 1.1304
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
ALTER TABLE t1 ALTER TABLE t1
DROP INDEX idx1, DROP INDEX idx1,
DROP INDEX idx4; DROP INDEX idx4;
...@@ -997,7 +997,7 @@ ADD INDEX idx4 (e, b(4), d); ...@@ -997,7 +997,7 @@ ADD INDEX idx4 (e, b(4), d);
ANALYZE TABLE t1; ANALYZE TABLE t1;
Table Op Msg_type Msg_text Table Op Msg_type Msg_text
test.t1 analyze status OK test.t1 analyze status OK
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency db_name table_name column_name min_value max_value nulls_ratio avg_length avg_frequency
test t1 a 0 49 0.0000 4.0000 1.0000 test t1 a 0 49 0.0000 4.0000 1.0000
test t1 c aaaa dddddddd 0.1250 6.6571 7.0000 test t1 c aaaa dddddddd 0.1250 6.6571 7.0000
...@@ -1005,7 +1005,7 @@ test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000 ...@@ -1005,7 +1005,7 @@ test t1 d 1989-03-12 1999-07-23 0.1500 3.0000 8.5000
test t1 e 0.01 0.112 0.2250 8.0000 6.2000 test t1 e 0.01 0.112 0.2250 8.0000 6.2000
test t1 f 1 5 0.2000 1.0000 6.4000 test t1 f 1 5 0.2000 1.0000 6.4000
test t1 b NULL NULL 0.2000 17.1250 NULL test t1 b NULL NULL 0.2000 17.1250 NULL
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency db_name table_name index_name prefix_arity avg_frequency
test t1 PRIMARY 1 1.0000 test t1 PRIMARY 1 1.0000
test t1 idx3 1 8.5000 test t1 idx3 1 8.5000
...@@ -1017,9 +1017,9 @@ test t1 idx4 1 6.2000 ...@@ -1017,9 +1017,9 @@ test t1 idx4 1 6.2000
test t1 idx4 2 NULL test t1 idx4 2 NULL
test t1 idx4 3 NULL test t1 idx4 3 NULL
DROP TABLE t1,t2; DROP TABLE t1,t2;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
set use_stat_tables='never'; set use_stat_tables='never';
set names utf8; set names utf8;
CREATE DATABASE world; CREATE DATABASE world;
...@@ -1052,14 +1052,14 @@ INDEX (Percentage) ...@@ -1052,14 +1052,14 @@ INDEX (Percentage)
set use_stat_tables='preferably'; set use_stat_tables='preferably';
ANALYZE TABLE Country, City, CountryLanguage; ANALYZE TABLE Country, City, CountryLanguage;
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality UPPER(db_name) UPPER(table_name) cardinality
WORLD COUNTRY 239 WORLD COUNTRY 239
WORLD CITY 4079 WORLD CITY 4079
WORLD COUNTRYLANGUAGE 984 WORLD COUNTRYLANGUAGE 984
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
...@@ -1075,7 +1075,7 @@ WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 ...@@ -1075,7 +1075,7 @@ WORLD COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 WORLD COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD COUNTRY PRIMARY 1 1.0000 WORLD COUNTRY PRIMARY 1 1.0000
WORLD COUNTRY Name 1 1.0000 WORLD COUNTRY Name 1 1.0000
...@@ -1120,7 +1120,7 @@ ALTER TABLE CountryLanguage ENGINE=InnoDB; ...@@ -1120,7 +1120,7 @@ ALTER TABLE CountryLanguage ENGINE=InnoDB;
set use_stat_tables='preferably'; set use_stat_tables='preferably';
ANALYZE TABLE Country, City, CountryLanguage; ANALYZE TABLE Country, City, CountryLanguage;
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality UPPER(db_name) UPPER(table_name) cardinality
WORLD COUNTRY 239 WORLD COUNTRY 239
WORLD CITY 4079 WORLD CITY 4079
...@@ -1130,7 +1130,7 @@ WORLD_INNODB CITY 4079 ...@@ -1130,7 +1130,7 @@ WORLD_INNODB CITY 4079
WORLD_INNODB COUNTRYLANGUAGE 984 WORLD_INNODB COUNTRYLANGUAGE 984
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 WORLD COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 WORLD COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
...@@ -1158,7 +1158,7 @@ WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 ...@@ -1158,7 +1158,7 @@ WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD COUNTRY PRIMARY 1 1.0000 WORLD COUNTRY PRIMARY 1 1.0000
WORLD COUNTRY Name 1 1.0000 WORLD COUNTRY Name 1 1.0000
...@@ -1179,14 +1179,14 @@ WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640 ...@@ -1179,14 +1179,14 @@ WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640
use test; use test;
DROP DATABASE world; DROP DATABASE world;
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality UPPER(db_name) UPPER(table_name) cardinality
WORLD_INNODB COUNTRY 239 WORLD_INNODB COUNTRY 239
WORLD_INNODB CITY 4079 WORLD_INNODB CITY 4079
WORLD_INNODB COUNTRYLANGUAGE 984 WORLD_INNODB COUNTRYLANGUAGE 984
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000 WORLD_INNODB COUNTRY Code ABW ZWE 0.0000 3.0000 1.0000
WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000 WORLD_INNODB COUNTRY Name Afghanistan Zimbabwe 0.0000 10.1088 1.0000
...@@ -1202,7 +1202,7 @@ WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532 ...@@ -1202,7 +1202,7 @@ WORLD_INNODB COUNTRYLANGUAGE Language Abhyasi [South]Mande 0.0000 7.1778 2.1532
WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640 WORLD_INNODB COUNTRYLANGUAGE Percentage 0.0 99.9 0.0000 4.0000 2.7640
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
WORLD_INNODB COUNTRY PRIMARY 1 1.0000 WORLD_INNODB COUNTRY PRIMARY 1 1.0000
WORLD_INNODB COUNTRY Name 1 1.0000 WORLD_INNODB COUNTRY Name 1 1.0000
...@@ -1214,17 +1214,17 @@ WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000 ...@@ -1214,17 +1214,17 @@ WORLD_INNODB COUNTRYLANGUAGE PRIMARY 2 1.0000
WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640 WORLD_INNODB COUNTRYLANGUAGE Percentage 1 2.7640
DROP DATABASE world_innodb; DROP DATABASE world_innodb;
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
UPPER(db_name) UPPER(table_name) cardinality UPPER(db_name) UPPER(table_name) cardinality
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency UPPER(db_name) UPPER(table_name) column_name min_value max_value nulls_ratio avg_length avg_frequency
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency UPPER(db_name) UPPER(table_name) index_name prefix_arity avg_frequency
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
show tables; show tables;
Tables_in_db Tables_in_db
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -11,7 +11,7 @@ help_keyword ...@@ -11,7 +11,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -19,7 +19,7 @@ procs_priv ...@@ -19,7 +19,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat; show create table table_stats;
Table Create Table Table Create Table
table_stat CREATE TABLE `table_stat` ( table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`) PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
show create table column_stat; show create table column_stats;
Table Create Table Table Create Table
column_stat CREATE TABLE `column_stat` ( column_stats CREATE TABLE `column_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`column_name` varchar(64) COLLATE utf8_bin NOT NULL, `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` ( ...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` decimal(12,4) DEFAULT NULL, `avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`) PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
show create table index_stat; show create table index_stats;
Table Create Table Table Create Table
index_stat CREATE TABLE `index_stat` ( index_stats CREATE TABLE `index_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`index_name` varchar(64) COLLATE utf8_bin NOT NULL, `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
......
show tables; show tables;
Tables_in_db Tables_in_db
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -11,7 +11,7 @@ help_keyword ...@@ -11,7 +11,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -19,7 +19,7 @@ procs_priv ...@@ -19,7 +19,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat; show create table table_stats;
Table Create Table Table Create Table
table_stat CREATE TABLE `table_stat` ( table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`) PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
show create table column_stat; show create table column_stats;
Table Create Table Table Create Table
column_stat CREATE TABLE `column_stat` ( column_stats CREATE TABLE `column_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`column_name` varchar(64) COLLATE utf8_bin NOT NULL, `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` ( ...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` double DEFAULT NULL, `avg_frequency` double DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`) PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
show create table index_stat; show create table index_stats;
Table Create Table Table Create Table
index_stat CREATE TABLE `index_stat` ( index_stats CREATE TABLE `index_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`index_name` varchar(64) COLLATE utf8_bin NOT NULL, `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
......
show tables; show tables;
Tables_in_db Tables_in_db
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -11,7 +11,7 @@ help_keyword ...@@ -11,7 +11,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -19,7 +19,7 @@ procs_priv ...@@ -19,7 +19,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat; show create table table_stats;
Table Create Table Table Create Table
table_stat CREATE TABLE `table_stat` ( table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`) PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
show create table column_stat; show create table column_stats;
Table Create Table Table Create Table
column_stat CREATE TABLE `column_stat` ( column_stats CREATE TABLE `column_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`column_name` varchar(64) COLLATE utf8_bin NOT NULL, `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` ( ...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` double DEFAULT NULL, `avg_frequency` double DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`) PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
show create table index_stat; show create table index_stats;
Table Create Table Table Create Table
index_stat CREATE TABLE `index_stat` ( index_stats CREATE TABLE `index_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`index_name` varchar(64) COLLATE utf8_bin NOT NULL, `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
......
show tables; show tables;
Tables_in_db Tables_in_db
column_stat column_stats
columns_priv columns_priv
db db
event event
...@@ -11,7 +11,7 @@ help_keyword ...@@ -11,7 +11,7 @@ help_keyword
help_relation help_relation
help_topic help_topic
host host
index_stat index_stats
ndb_binlog_index ndb_binlog_index
plugin plugin
proc proc
...@@ -19,7 +19,7 @@ procs_priv ...@@ -19,7 +19,7 @@ procs_priv
proxies_priv proxies_priv
servers servers
slow_log slow_log
table_stat table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` ( ...@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL, `server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL `sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log' ) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat; show create table table_stats;
Table Create Table Table Create Table
table_stat CREATE TABLE `table_stat` ( table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL, `cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`) PRIMARY KEY (`db_name`,`table_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Tables'
show create table column_stat; show create table column_stats;
Table Create Table Table Create Table
column_stat CREATE TABLE `column_stat` ( column_stats CREATE TABLE `column_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`column_name` varchar(64) COLLATE utf8_bin NOT NULL, `column_name` varchar(64) COLLATE utf8_bin NOT NULL,
...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` ( ...@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` double DEFAULT NULL, `avg_frequency` double DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`) PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns' ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Statistics on Columns'
show create table index_stat; show create table index_stats;
Table Create Table Table Create Table
index_stat CREATE TABLE `index_stat` ( index_stats CREATE TABLE `index_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL, `db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, `table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`index_name` varchar(64) COLLATE utf8_bin NOT NULL, `index_name` varchar(64) COLLATE utf8_bin NOT NULL,
......
...@@ -9,14 +9,14 @@ def mysql columns_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char( ...@@ -9,14 +9,14 @@ def mysql columns_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(
def mysql columns_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references def mysql columns_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI select,insert,update,references
def mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references def mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
def mysql columns_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references def mysql columns_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
def mysql column_stat avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
def mysql column_stat avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
def mysql column_stat column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql column_stat db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql column_stat max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references def mysql column_stats max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references
def mysql column_stat min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references def mysql column_stats min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) select,insert,update,references
def mysql column_stat nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
def mysql column_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql db Create_priv 8 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql db Create_priv 8 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
...@@ -105,11 +105,11 @@ def mysql host Select_priv 3 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e ...@@ -105,11 +105,11 @@ def mysql host Select_priv 3 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e
def mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql host Update_priv 5 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references def mysql host Update_priv 5 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql index_stat avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) select,insert,update,references
def mysql index_stat db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql index_stat index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql index_stat prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI select,insert,update,references def mysql index_stats prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI select,insert,update,references
def mysql index_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql index_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned select,insert,update,references
def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI select,insert,update,references
def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL NULL latin1 latin1_swedish_ci varchar(255) select,insert,update,references
...@@ -182,9 +182,9 @@ def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin ...@@ -182,9 +182,9 @@ def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin
def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') select,insert,update,references
def mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references def mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP select,insert,update,references
def mysql tables_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references def mysql tables_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI select,insert,update,references
def mysql table_stat cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned select,insert,update,references
def mysql table_stat db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql table_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references def mysql table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI select,insert,update,references
def mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references def mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI auto_increment select,insert,update,references
def mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references def mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('Y','N') select,insert,update,references
def mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references def mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) select,insert,update,references
...@@ -320,14 +320,14 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C ...@@ -320,14 +320,14 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C
3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) 3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64)
NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') 3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References')
3.0000 mysql column_stat db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql column_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stat table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql column_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stat column_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql column_stats column_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stat min_value varchar 255 765 utf8 utf8_bin varchar(255) 3.0000 mysql column_stats min_value varchar 255 765 utf8 utf8_bin varchar(255)
3.0000 mysql column_stat max_value varchar 255 765 utf8 utf8_bin varchar(255) 3.0000 mysql column_stats max_value varchar 255 765 utf8 utf8_bin varchar(255)
NULL mysql column_stat nulls_ratio decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stat avg_length decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stat avg_frequency decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) 3.0000 mysql db User char 16 48 utf8 utf8_bin char(16)
...@@ -416,11 +416,11 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) ...@@ -416,11 +416,11 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5)
3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql index_stat db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stat table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stat index_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64)
NULL mysql index_stat prefix_arity int NULL NULL NULL NULL int(11) unsigned NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned
NULL mysql index_stat avg_frequency decimal NULL NULL NULL NULL decimal(12,4) NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned
1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255) 1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255)
NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned
...@@ -493,9 +493,9 @@ NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned ...@@ -493,9 +493,9 @@ NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql tables_priv Table_priv set 98 294 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') 3.0000 mysql tables_priv Table_priv set 98 294 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')
3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') 3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References')
3.0000 mysql table_stat db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql table_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql table_stat table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql table_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
NULL mysql table_stat cardinality bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql table_stats cardinality bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') 3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N')
NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20)
......
...@@ -9,14 +9,14 @@ def mysql columns_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char( ...@@ -9,14 +9,14 @@ def mysql columns_priv Host 1 NO char 60 180 NULL NULL NULL utf8 utf8_bin char(
def mysql columns_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI def mysql columns_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin char(64) PRI
def mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP def mysql columns_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
def mysql columns_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI def mysql columns_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI
def mysql column_stat avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) def mysql column_stats avg_frequency 8 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql column_stat avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) def mysql column_stats avg_length 7 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql column_stat column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql column_stats column_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql column_stat db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql column_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql column_stat max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) def mysql column_stats max_value 5 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255)
def mysql column_stat min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255) def mysql column_stats min_value 4 NULL YES varchar 255 765 NULL NULL NULL utf8 utf8_bin varchar(255)
def mysql column_stat nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) def mysql column_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql column_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql column_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql db Alter_priv 13 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql db Alter_routine_priv 19 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql db Create_priv 8 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql db Create_priv 8 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
...@@ -105,11 +105,11 @@ def mysql host Select_priv 3 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e ...@@ -105,11 +105,11 @@ def mysql host Select_priv 3 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci e
def mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql host Update_priv 5 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y') def mysql host Update_priv 5 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('N','Y')
def mysql index_stat avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4) def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql index_stat db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql index_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql index_stat index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql index_stats index_name 3 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql index_stat prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI def mysql index_stats prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned PRI
def mysql index_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql index_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned def mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned
def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI def mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL NULL bigint(20) unsigned PRI
def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL NULL latin1 latin1_swedish_ci varchar(255) def mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL NULL latin1 latin1_swedish_ci varchar(255)
...@@ -182,9 +182,9 @@ def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin ...@@ -182,9 +182,9 @@ def mysql tables_priv Table_name 4 NO char 64 192 NULL NULL NULL utf8 utf8_bin
def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') def mysql tables_priv Table_priv 7 NO set 98 294 NULL NULL NULL utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')
def mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP def mysql tables_priv Timestamp 6 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL 0 NULL NULL timestamp on update CURRENT_TIMESTAMP
def mysql tables_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI def mysql tables_priv User 3 NO char 16 48 NULL NULL NULL utf8 utf8_bin char(16) PRI
def mysql table_stat cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def mysql table_stat db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql table_stats db_name 1 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql table_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI def mysql table_stats table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI auto_increment def mysql time_zone Time_zone_id 1 NULL NO int NULL NULL 10 0 NULL NULL NULL int(10) unsigned PRI auto_increment
def mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('Y','N') def mysql time_zone Use_leap_seconds 2 N NO enum 1 3 NULL NULL NULL utf8 utf8_general_ci enum('Y','N')
def mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) def mysql time_zone_leap_second Correction 2 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11)
...@@ -320,14 +320,14 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C ...@@ -320,14 +320,14 @@ COL_CML TABLE_SCHEMA TABLE_NAME COLUMN_NAME DATA_TYPE CHARACTER_MAXIMUM_LENGTH C
3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64) 3.0000 mysql columns_priv Column_name char 64 192 utf8 utf8_bin char(64)
NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp NULL mysql columns_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') 3.0000 mysql columns_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References')
3.0000 mysql column_stat db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql column_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stat table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql column_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stat column_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql column_stats column_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stat min_value varchar 255 765 utf8 utf8_bin varchar(255) 3.0000 mysql column_stats min_value varchar 255 765 utf8 utf8_bin varchar(255)
3.0000 mysql column_stat max_value varchar 255 765 utf8 utf8_bin varchar(255) 3.0000 mysql column_stats max_value varchar 255 765 utf8 utf8_bin varchar(255)
NULL mysql column_stat nulls_ratio decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats nulls_ratio decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stat avg_length decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats avg_length decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stat avg_frequency decimal NULL NULL NULL NULL decimal(12,4) NULL mysql column_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql db Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql db Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql db User char 16 48 utf8 utf8_bin char(16) 3.0000 mysql db User char 16 48 utf8 utf8_bin char(16)
...@@ -416,11 +416,11 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5) ...@@ -416,11 +416,11 @@ NULL mysql help_topic help_category_id smallint NULL NULL NULL NULL smallint(5)
3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Alter_routine_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Execute_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y') 3.0000 mysql host Trigger_priv enum 1 3 utf8 utf8_general_ci enum('N','Y')
3.0000 mysql index_stat db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stat table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql index_stat index_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql index_stats index_name varchar 64 192 utf8 utf8_bin varchar(64)
NULL mysql index_stat prefix_arity int NULL NULL NULL NULL int(11) unsigned NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned
NULL mysql index_stat avg_frequency decimal NULL NULL NULL NULL decimal(12,4) NULL mysql index_stats avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index Position bigint NULL NULL NULL NULL bigint(20) unsigned
1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255) 1.0000 mysql ndb_binlog_index File varchar 255 255 latin1 latin1_swedish_ci varchar(255)
NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index epoch bigint NULL NULL NULL NULL bigint(20) unsigned
...@@ -493,9 +493,9 @@ NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned ...@@ -493,9 +493,9 @@ NULL mysql slow_log server_id int NULL NULL NULL NULL int(10) unsigned
NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp NULL mysql tables_priv Timestamp timestamp NULL NULL NULL NULL timestamp
3.0000 mysql tables_priv Table_priv set 98 294 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') 3.0000 mysql tables_priv Table_priv set 98 294 utf8 utf8_general_ci set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger')
3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References') 3.0000 mysql tables_priv Column_priv set 31 93 utf8 utf8_general_ci set('Select','Insert','Update','References')
3.0000 mysql table_stat db_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql table_stats db_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql table_stat table_name varchar 64 192 utf8 utf8_bin varchar(64) 3.0000 mysql table_stats table_name varchar 64 192 utf8 utf8_bin varchar(64)
NULL mysql table_stat cardinality bigint NULL NULL NULL NULL bigint(21) unsigned NULL mysql table_stats cardinality bigint NULL NULL NULL NULL bigint(21) unsigned
NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned NULL mysql time_zone Time_zone_id int NULL NULL NULL NULL int(10) unsigned
3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N') 3.0000 mysql time_zone Use_leap_seconds enum 1 3 utf8 utf8_general_ci enum('Y','N')
NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20) NULL mysql time_zone_leap_second Transition_time bigint NULL NULL NULL NULL bigint(20)
......
...@@ -75,9 +75,9 @@ table_schema, table_name, column_name ...@@ -75,9 +75,9 @@ table_schema, table_name, column_name
FROM information_schema.key_column_usage FROM information_schema.key_column_usage
WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL; WHERE constraint_catalog IS NOT NULL OR table_catalog IS NOT NULL;
constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name constraint_catalog constraint_schema constraint_name table_catalog table_schema table_name column_name
def mysql PRIMARY def mysql column_stat db_name def mysql PRIMARY def mysql column_stats db_name
def mysql PRIMARY def mysql column_stat table_name def mysql PRIMARY def mysql column_stats table_name
def mysql PRIMARY def mysql column_stat column_name def mysql PRIMARY def mysql column_stats column_name
def mysql PRIMARY def mysql columns_priv Host def mysql PRIMARY def mysql columns_priv Host
def mysql PRIMARY def mysql columns_priv Db def mysql PRIMARY def mysql columns_priv Db
def mysql PRIMARY def mysql columns_priv User def mysql PRIMARY def mysql columns_priv User
...@@ -99,10 +99,10 @@ def mysql PRIMARY def mysql help_topic help_topic_id ...@@ -99,10 +99,10 @@ def mysql PRIMARY def mysql help_topic help_topic_id
def mysql name def mysql help_topic name def mysql name def mysql help_topic name
def mysql PRIMARY def mysql host Host def mysql PRIMARY def mysql host Host
def mysql PRIMARY def mysql host Db def mysql PRIMARY def mysql host Db
def mysql PRIMARY def mysql index_stat db_name def mysql PRIMARY def mysql index_stats db_name
def mysql PRIMARY def mysql index_stat table_name def mysql PRIMARY def mysql index_stats table_name
def mysql PRIMARY def mysql index_stat index_name def mysql PRIMARY def mysql index_stats index_name
def mysql PRIMARY def mysql index_stat prefix_arity def mysql PRIMARY def mysql index_stats prefix_arity
def mysql PRIMARY def mysql ndb_binlog_index epoch def mysql PRIMARY def mysql ndb_binlog_index epoch
def mysql PRIMARY def mysql plugin name def mysql PRIMARY def mysql plugin name
def mysql PRIMARY def mysql proc db def mysql PRIMARY def mysql proc db
...@@ -118,8 +118,8 @@ def mysql PRIMARY def mysql proxies_priv User ...@@ -118,8 +118,8 @@ def mysql PRIMARY def mysql proxies_priv User
def mysql PRIMARY def mysql proxies_priv Proxied_host def mysql PRIMARY def mysql proxies_priv Proxied_host
def mysql PRIMARY def mysql proxies_priv Proxied_user def mysql PRIMARY def mysql proxies_priv Proxied_user
def mysql PRIMARY def mysql servers Server_name def mysql PRIMARY def mysql servers Server_name
def mysql PRIMARY def mysql table_stat db_name def mysql PRIMARY def mysql table_stats db_name
def mysql PRIMARY def mysql table_stat table_name def mysql PRIMARY def mysql table_stats table_name
def mysql PRIMARY def mysql tables_priv Host def mysql PRIMARY def mysql tables_priv Host
def mysql PRIMARY def mysql tables_priv Db def mysql PRIMARY def mysql tables_priv Db
def mysql PRIMARY def mysql tables_priv User def mysql PRIMARY def mysql tables_priv User
......
...@@ -85,9 +85,9 @@ INDEX_COMMENT varchar(1024) NO ...@@ -85,9 +85,9 @@ INDEX_COMMENT varchar(1024) NO
SELECT table_catalog, table_schema, table_name, index_schema, index_name SELECT table_catalog, table_schema, table_name, index_schema, index_name
FROM information_schema.statistics WHERE table_catalog IS NOT NULL; FROM information_schema.statistics WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name index_schema index_name table_catalog table_schema table_name index_schema index_name
def mysql column_stat mysql PRIMARY def mysql column_stats mysql PRIMARY
def mysql column_stat mysql PRIMARY def mysql column_stats mysql PRIMARY
def mysql column_stat mysql PRIMARY def mysql column_stats mysql PRIMARY
def mysql columns_priv mysql PRIMARY def mysql columns_priv mysql PRIMARY
def mysql columns_priv mysql PRIMARY def mysql columns_priv mysql PRIMARY
def mysql columns_priv mysql PRIMARY def mysql columns_priv mysql PRIMARY
...@@ -110,10 +110,10 @@ def mysql help_topic mysql PRIMARY ...@@ -110,10 +110,10 @@ def mysql help_topic mysql PRIMARY
def mysql help_topic mysql name def mysql help_topic mysql name
def mysql host mysql PRIMARY def mysql host mysql PRIMARY
def mysql host mysql PRIMARY def mysql host mysql PRIMARY
def mysql index_stat mysql PRIMARY def mysql index_stats mysql PRIMARY
def mysql index_stat mysql PRIMARY def mysql index_stats mysql PRIMARY
def mysql index_stat mysql PRIMARY def mysql index_stats mysql PRIMARY
def mysql index_stat mysql PRIMARY def mysql index_stats mysql PRIMARY
def mysql ndb_binlog_index mysql PRIMARY def mysql ndb_binlog_index mysql PRIMARY
def mysql plugin mysql PRIMARY def mysql plugin mysql PRIMARY
def mysql proc mysql PRIMARY def mysql proc mysql PRIMARY
...@@ -131,8 +131,8 @@ def mysql proxies_priv mysql PRIMARY ...@@ -131,8 +131,8 @@ def mysql proxies_priv mysql PRIMARY
def mysql proxies_priv mysql PRIMARY def mysql proxies_priv mysql PRIMARY
def mysql proxies_priv mysql Grantor def mysql proxies_priv mysql Grantor
def mysql servers mysql PRIMARY def mysql servers mysql PRIMARY
def mysql table_stat mysql PRIMARY def mysql table_stats mysql PRIMARY
def mysql table_stat mysql PRIMARY def mysql table_stats mysql PRIMARY
def mysql tables_priv mysql PRIMARY def mysql tables_priv mysql PRIMARY
def mysql tables_priv mysql PRIMARY def mysql tables_priv mysql PRIMARY
def mysql tables_priv mysql PRIMARY def mysql tables_priv mysql PRIMARY
......
...@@ -12,9 +12,9 @@ def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE ...@@ -12,9 +12,9 @@ def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
...@@ -32,10 +32,10 @@ def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE ...@@ -32,10 +32,10 @@ def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE
def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE
def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE
def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
...@@ -58,8 +58,8 @@ def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE ...@@ -58,8 +58,8 @@ def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE
def mysql table_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql table_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql table_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE
def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE
def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE
......
...@@ -12,9 +12,9 @@ def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE ...@@ -12,9 +12,9 @@ def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
...@@ -32,10 +32,10 @@ def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE ...@@ -32,10 +32,10 @@ def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE
def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE
def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE
def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
...@@ -58,8 +58,8 @@ def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE ...@@ -58,8 +58,8 @@ def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE
def mysql table_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql table_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql table_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE
def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE
def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE
...@@ -79,9 +79,9 @@ def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE ...@@ -79,9 +79,9 @@ def mysql columns_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE
def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE def mysql columns_priv 0 mysql PRIMARY 5 Column_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql column_stat 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE def mysql column_stats 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql db 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
...@@ -99,10 +99,10 @@ def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE ...@@ -99,10 +99,10 @@ def mysql help_topic 0 mysql name 1 name A #CARD# NULL NULL BTREE
def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE def mysql help_topic 0 mysql PRIMARY 1 help_topic_id A #CARD# NULL NULL BTREE
def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE def mysql host 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql host 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 3 index_name A #CARD# NULL NULL BTREE
def mysql index_stat 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE def mysql index_stats 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE
def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE def mysql ndb_binlog_index 0 mysql PRIMARY 1 epoch A #CARD# NULL NULL BTREE
def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE def mysql plugin 0 mysql PRIMARY 1 name A #CARD# NULL NULL BTREE
def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE def mysql proc 0 mysql PRIMARY 1 db A #CARD# NULL NULL BTREE
...@@ -125,8 +125,8 @@ def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE ...@@ -125,8 +125,8 @@ def mysql tables_priv 0 mysql PRIMARY 1 Host A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 2 Db A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 3 User A #CARD# NULL NULL BTREE
def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE def mysql tables_priv 0 mysql PRIMARY 4 Table_name A #CARD# NULL NULL BTREE
def mysql table_stat 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE def mysql table_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql table_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE def mysql table_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE def mysql time_zone 0 mysql PRIMARY 1 Time_zone_id A #CARD# NULL NULL BTREE
def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE def mysql time_zone_leap_second 0 mysql PRIMARY 1 Transition_time A #CARD# NULL NULL BTREE
def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE def mysql time_zone_name 0 mysql PRIMARY 1 Name A #CARD# NULL NULL BTREE
......
...@@ -57,7 +57,7 @@ table_schema, table_name ...@@ -57,7 +57,7 @@ table_schema, table_name
FROM information_schema.table_constraints FROM information_schema.table_constraints
WHERE constraint_catalog IS NOT NULL; WHERE constraint_catalog IS NOT NULL;
constraint_catalog constraint_schema constraint_name table_schema table_name constraint_catalog constraint_schema constraint_name table_schema table_name
def mysql PRIMARY mysql column_stat def mysql PRIMARY mysql column_stats
def mysql PRIMARY mysql columns_priv def mysql PRIMARY mysql columns_priv
def mysql PRIMARY mysql db def mysql PRIMARY mysql db
def mysql PRIMARY mysql event def mysql PRIMARY mysql event
...@@ -70,14 +70,14 @@ def mysql PRIMARY mysql help_relation ...@@ -70,14 +70,14 @@ def mysql PRIMARY mysql help_relation
def mysql PRIMARY mysql help_topic def mysql PRIMARY mysql help_topic
def mysql name mysql help_topic def mysql name mysql help_topic
def mysql PRIMARY mysql host def mysql PRIMARY mysql host
def mysql PRIMARY mysql index_stat def mysql PRIMARY mysql index_stats
def mysql PRIMARY mysql ndb_binlog_index def mysql PRIMARY mysql ndb_binlog_index
def mysql PRIMARY mysql plugin def mysql PRIMARY mysql plugin
def mysql PRIMARY mysql proc def mysql PRIMARY mysql proc
def mysql PRIMARY mysql procs_priv def mysql PRIMARY mysql procs_priv
def mysql PRIMARY mysql proxies_priv def mysql PRIMARY mysql proxies_priv
def mysql PRIMARY mysql servers def mysql PRIMARY mysql servers
def mysql PRIMARY mysql table_stat def mysql PRIMARY mysql table_stats
def mysql PRIMARY mysql tables_priv def mysql PRIMARY mysql tables_priv
def mysql PRIMARY mysql time_zone def mysql PRIMARY mysql time_zone
def mysql PRIMARY mysql time_zone_leap_second def mysql PRIMARY mysql time_zone_leap_second
......
...@@ -8,7 +8,7 @@ WHERE table_schema = 'mysql' ...@@ -8,7 +8,7 @@ WHERE table_schema = 'mysql'
ORDER BY table_schema,table_name,constraint_name; ORDER BY table_schema,table_name,constraint_name;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
def mysql PRIMARY mysql columns_priv PRIMARY KEY def mysql PRIMARY mysql columns_priv PRIMARY KEY
def mysql PRIMARY mysql column_stat PRIMARY KEY def mysql PRIMARY mysql column_stats PRIMARY KEY
def mysql PRIMARY mysql db PRIMARY KEY def mysql PRIMARY mysql db PRIMARY KEY
def mysql PRIMARY mysql event PRIMARY KEY def mysql PRIMARY mysql event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY def mysql PRIMARY mysql func PRIMARY KEY
...@@ -20,7 +20,7 @@ def mysql PRIMARY mysql help_relation PRIMARY KEY ...@@ -20,7 +20,7 @@ def mysql PRIMARY mysql help_relation PRIMARY KEY
def mysql name mysql help_topic UNIQUE def mysql name mysql help_topic UNIQUE
def mysql PRIMARY mysql help_topic PRIMARY KEY def mysql PRIMARY mysql help_topic PRIMARY KEY
def mysql PRIMARY mysql host PRIMARY KEY def mysql PRIMARY mysql host PRIMARY KEY
def mysql PRIMARY mysql index_stat PRIMARY KEY def mysql PRIMARY mysql index_stats PRIMARY KEY
def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY def mysql PRIMARY mysql ndb_binlog_index PRIMARY KEY
def mysql PRIMARY mysql plugin PRIMARY KEY def mysql PRIMARY mysql plugin PRIMARY KEY
def mysql PRIMARY mysql proc PRIMARY KEY def mysql PRIMARY mysql proc PRIMARY KEY
...@@ -28,7 +28,7 @@ def mysql PRIMARY mysql procs_priv PRIMARY KEY ...@@ -28,7 +28,7 @@ def mysql PRIMARY mysql procs_priv PRIMARY KEY
def mysql PRIMARY mysql proxies_priv PRIMARY KEY def mysql PRIMARY mysql proxies_priv PRIMARY KEY
def mysql PRIMARY mysql servers PRIMARY KEY def mysql PRIMARY mysql servers PRIMARY KEY
def mysql PRIMARY mysql tables_priv PRIMARY KEY def mysql PRIMARY mysql tables_priv PRIMARY KEY
def mysql PRIMARY mysql table_stat PRIMARY KEY def mysql PRIMARY mysql table_stats PRIMARY KEY
def mysql PRIMARY mysql time_zone PRIMARY KEY def mysql PRIMARY mysql time_zone PRIMARY KEY
def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY def mysql PRIMARY mysql time_zone_leap_second PRIMARY KEY
def mysql PRIMARY mysql time_zone_name PRIMARY KEY def mysql PRIMARY mysql time_zone_name PRIMARY KEY
......
...@@ -37,7 +37,7 @@ user_comment Column privileges ...@@ -37,7 +37,7 @@ user_comment Column privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME column_stat TABLE_NAME column_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -267,7 +267,7 @@ user_comment Host privileges; Merged with database privileges ...@@ -267,7 +267,7 @@ user_comment Host privileges; Merged with database privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME index_stat TABLE_NAME index_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -474,7 +474,7 @@ user_comment Table privileges ...@@ -474,7 +474,7 @@ user_comment Table privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME table_stat TABLE_NAME table_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
......
...@@ -37,7 +37,7 @@ user_comment Column privileges ...@@ -37,7 +37,7 @@ user_comment Column privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME column_stat TABLE_NAME column_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -267,7 +267,7 @@ user_comment Host privileges; Merged with database privileges ...@@ -267,7 +267,7 @@ user_comment Host privileges; Merged with database privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME index_stat TABLE_NAME index_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -474,7 +474,7 @@ user_comment Table privileges ...@@ -474,7 +474,7 @@ user_comment Table privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME table_stat TABLE_NAME table_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -674,7 +674,7 @@ user_comment Column privileges ...@@ -674,7 +674,7 @@ user_comment Column privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME column_stat TABLE_NAME column_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -904,7 +904,7 @@ user_comment Host privileges; Merged with database privileges ...@@ -904,7 +904,7 @@ user_comment Host privileges; Merged with database privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME index_stat TABLE_NAME index_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
...@@ -1111,7 +1111,7 @@ user_comment Table privileges ...@@ -1111,7 +1111,7 @@ user_comment Table privileges
Separator ----------------------------------------------------- Separator -----------------------------------------------------
TABLE_CATALOG def TABLE_CATALOG def
TABLE_SCHEMA mysql TABLE_SCHEMA mysql
TABLE_NAME table_stat TABLE_NAME table_stats
TABLE_TYPE BASE TABLE TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA ENGINE MYISAM_OR_MARIA
VERSION 10 VERSION 10
......
...@@ -23,18 +23,18 @@ set optimizer_switch='extended_keys=off'; ...@@ -23,18 +23,18 @@ set optimizer_switch='extended_keys=off';
--disable_warnings --disable_warnings
--source include/dbt3_s001.inc --source include/dbt3_s001.inc
create index i_p_retailprice on part(p_retailprice); create index i_p_retailprice on part(p_retailprice);
delete from mysql.table_stat; delete from mysql.table_stats;
delete from mysql.column_stat; delete from mysql.column_stats;
delete from mysql.index_stat; delete from mysql.index_stats;
ANALYZE TABLE ANALYZE TABLE
customer, lineitem, nation, orders, part, partsupp, region, supplier; customer, lineitem, nation, orders, part, partsupp, region, supplier;
FLUSH TABLE mysql.table_stat, mysql.index_stat; FLUSH TABLE mysql.table_stats, mysql.index_stats;
--enable_warnings --enable_warnings
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
select * from mysql.table_stat; select * from mysql.table_stats;
select * from mysql.index_stat; select * from mysql.index_stats;
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;
...@@ -57,29 +57,29 @@ eval $Q5; ...@@ -57,29 +57,29 @@ eval $Q5;
set optimizer_switch=@save_optimizer_switch; set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stat; delete from mysql.index_stats;
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
--disable_warnings --disable_warnings
ANALYZE TABLE ANALYZE TABLE
customer, lineitem, nation, orders, part, partsupp, region, supplier; customer, lineitem, nation, orders, part, partsupp, region, supplier;
FLUSH TABLE mysql.table_stat, mysql.index_stat; FLUSH TABLE mysql.table_stats, mysql.index_stats;
--enable_warnings --enable_warnings
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
select * from mysql.table_stat; select * from mysql.table_stats;
select * from mysql.index_stat; select * from mysql.index_stats;
select * from mysql.table_stat where table_name='orders'; select * from mysql.table_stats where table_name='orders';
select * from mysql.index_stat where table_name='orders'; select * from mysql.index_stats where table_name='orders';
select (select cardinality from mysql.table_stat where table_name='orders') / select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stat (select avg_frequency from mysql.index_stats
where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct; where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct;
select count(distinct o_orderdate) from orders; select count(distinct o_orderdate) from orders;
select (select cardinality from mysql.table_stat where table_name='orders') / select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stat (select avg_frequency from mysql.index_stats
where index_name='i_o_custkey' and prefix_arity=1) as n_distinct; where index_name='i_o_custkey' and prefix_arity=1) as n_distinct;
select count(distinct o_custkey) from orders; select count(distinct o_custkey) from orders;
show index from orders; show index from orders;
...@@ -191,7 +191,7 @@ FLUSH TABLE t1; ...@@ -191,7 +191,7 @@ FLUSH TABLE t1;
SET use_stat_tables='never'; SET use_stat_tables='never';
EXPLAIN SELECT * FROM t1; EXPLAIN SELECT * FROM t1;
--move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stat.MYD $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stat.MYD.save --move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD.save
FLUSH TABLES; FLUSH TABLES;
SET use_stat_tables='preferably'; SET use_stat_tables='preferably';
...@@ -200,7 +200,7 @@ EXPLAIN SELECT * FROM t1; ...@@ -200,7 +200,7 @@ EXPLAIN SELECT * FROM t1;
--enable_warnings --enable_warnings
# Cleanup # Cleanup
--move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stat.MYD.save $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stat.MYD --move_file $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD.save $MYSQLTEST_VARDIR/mysqld.1/data/mysql/table_stats.MYD
DROP TABLE t1; DROP TABLE t1;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
......
...@@ -24,9 +24,9 @@ set optimizer_switch='extended_keys=off'; ...@@ -24,9 +24,9 @@ set optimizer_switch='extended_keys=off';
--disable_result_log --disable_result_log
--disable_warnings --disable_warnings
--source include/dbt3_s001.inc --source include/dbt3_s001.inc
delete from mysql.table_stat; delete from mysql.table_stats;
delete from mysql.column_stat; delete from mysql.column_stats;
delete from mysql.index_stat; delete from mysql.index_stats;
ANALYZE TABLE ANALYZE TABLE
customer, lineitem, nation, orders, part, partsupp, region, supplier; customer, lineitem, nation, orders, part, partsupp, region, supplier;
--enable_warnings --enable_warnings
......
...@@ -21,17 +21,17 @@ set optimizer_switch='extended_keys=off'; ...@@ -21,17 +21,17 @@ set optimizer_switch='extended_keys=off';
--disable_result_log --disable_result_log
--disable_warnings --disable_warnings
--source include/dbt3_s001.inc --source include/dbt3_s001.inc
delete from mysql.table_stat; delete from mysql.table_stats;
delete from mysql.column_stat; delete from mysql.column_stats;
delete from mysql.index_stat; delete from mysql.index_stats;
ANALYZE TABLE ANALYZE TABLE
customer, lineitem, nation, orders, part, partsupp, region, supplier; customer, lineitem, nation, orders, part, partsupp, region, supplier;
--enable_warnings --enable_warnings
--enable_result_log --enable_result_log
--enable_query_log --enable_query_log
select * from mysql.table_stat; select * from mysql.table_stats;
select * from mysql.index_stat; select * from mysql.index_stats;
# #
...@@ -93,20 +93,20 @@ set debug_sync='RESET'; ...@@ -93,20 +93,20 @@ set debug_sync='RESET';
# DEBUG_SYNC(thd, "statistics_collection_start2"); # DEBUG_SYNC(thd, "statistics_collection_start2");
# #
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
delete from mysql.index_stat delete from mysql.index_stats
where table_name='lineitem' and where table_name='lineitem' and
index_name in ('i_l_shipdate', 'i_l_receiptdate'); index_name in ('i_l_shipdate', 'i_l_receiptdate');
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
--disable_result_log --disable_result_log
--disable_warnings --disable_warnings
analyze table lineitem persistent for columns() indexes (i_l_shipdate); analyze table lineitem persistent for columns() indexes (i_l_shipdate);
--enable_warnings --enable_warnings
--enable_result_log --enable_result_log
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
delete from mysql.index_stat delete from mysql.index_stats
where table_name='lineitem' and index_name= 'i_l_shipdate'; where table_name='lineitem' and index_name= 'i_l_shipdate';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
connect (con1, localhost, root,,); connect (con1, localhost, root,,);
connect (con2, localhost, root,,); connect (con2, localhost, root,,);
...@@ -144,7 +144,7 @@ disconnect con1; ...@@ -144,7 +144,7 @@ disconnect con1;
disconnect con2; disconnect con2;
set debug_sync='RESET'; set debug_sync='RESET';
select * from mysql.index_stat where table_name='lineitem' order by index_name; select * from mysql.index_stats where table_name='lineitem' order by index_name;
DROP DATABASE dbt3_s001; DROP DATABASE dbt3_s001;
......
...@@ -6,9 +6,9 @@ drop table if exists t1,t2; ...@@ -6,9 +6,9 @@ drop table if exists t1,t2;
set @save_use_stat_tables=@@use_stat_tables; set @save_use_stat_tables=@@use_stat_tables;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
set use_stat_tables='preferably'; set use_stat_tables='preferably';
...@@ -69,13 +69,13 @@ INSERT INTO t1 VALUES ...@@ -69,13 +69,13 @@ INSERT INTO t1 VALUES
ANALYZE TABLE t1; ANALYZE TABLE t1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='a'; WHERE db_name='test' AND table_name='t1' AND column_name='a';
SELECT MIN(t1.a), MAX(t1.a), SELECT MIN(t1.a), MAX(t1.a),
(SELECT COUNT(*) FROM t1 WHERE t1.b IS NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.b IS NULL) /
...@@ -84,7 +84,7 @@ SELECT MIN(t1.a), MAX(t1.a), ...@@ -84,7 +84,7 @@ SELECT MIN(t1.a), MAX(t1.a),
(SELECT COUNT(DISTINCT t1.a) FROM t1) AS "AVG_FREQUENCY(t1.a)" (SELECT COUNT(DISTINCT t1.a) FROM t1) AS "AVG_FREQUENCY(t1.a)"
FROM t1; FROM t1;
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='b'; WHERE db_name='test' AND table_name='t1' AND column_name='b';
SELECT MIN(t1.b), MAX(t1.b), SELECT MIN(t1.b), MAX(t1.b),
(SELECT COUNT(*) FROM t1 WHERE t1.b IS NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.b IS NULL) /
...@@ -93,7 +93,7 @@ SELECT MIN(t1.b), MAX(t1.b), ...@@ -93,7 +93,7 @@ SELECT MIN(t1.b), MAX(t1.b),
(SELECT COUNT(DISTINCT t1.b) FROM t1) AS "AVG_FREQUENCY(t1.b)" (SELECT COUNT(DISTINCT t1.b) FROM t1) AS "AVG_FREQUENCY(t1.b)"
FROM t1; FROM t1;
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='c'; WHERE db_name='test' AND table_name='t1' AND column_name='c';
SELECT MIN(t1.c), MAX(t1.c), SELECT MIN(t1.c), MAX(t1.c),
(SELECT COUNT(*) FROM t1 WHERE t1.c IS NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.c IS NULL) /
...@@ -102,7 +102,7 @@ SELECT MIN(t1.c), MAX(t1.c), ...@@ -102,7 +102,7 @@ SELECT MIN(t1.c), MAX(t1.c),
(SELECT COUNT(DISTINCT t1.c) FROM t1) AS "AVG_FREQUENCY(t1.c)" (SELECT COUNT(DISTINCT t1.c) FROM t1) AS "AVG_FREQUENCY(t1.c)"
FROM t1; FROM t1;
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='d'; WHERE db_name='test' AND table_name='t1' AND column_name='d';
SELECT MIN(t1.d), MAX(t1.d), SELECT MIN(t1.d), MAX(t1.d),
(SELECT COUNT(*) FROM t1 WHERE t1.d IS NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.d IS NULL) /
...@@ -111,7 +111,7 @@ SELECT MIN(t1.d), MAX(t1.d), ...@@ -111,7 +111,7 @@ SELECT MIN(t1.d), MAX(t1.d),
(SELECT COUNT(DISTINCT t1.d) FROM t1) AS "AVG_FREQUENCY(t1.d)" (SELECT COUNT(DISTINCT t1.d) FROM t1) AS "AVG_FREQUENCY(t1.d)"
FROM t1; FROM t1;
SELECT * FROM mysql.column_stat SELECT * FROM mysql.column_stats
WHERE db_name='test' AND table_name='t1' AND column_name='e'; WHERE db_name='test' AND table_name='t1' AND column_name='e';
SELECT MIN(t1.e), MAX(t1.e), SELECT MIN(t1.e), MAX(t1.e),
(SELECT COUNT(*) FROM t1 WHERE t1.e IS NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.e IS NULL) /
...@@ -120,7 +120,7 @@ SELECT MIN(t1.e), MAX(t1.e), ...@@ -120,7 +120,7 @@ SELECT MIN(t1.e), MAX(t1.e),
(SELECT COUNT(DISTINCT t1.e) FROM t1) AS "AVG_FREQUENCY(t1.e)" (SELECT COUNT(DISTINCT t1.e) FROM t1) AS "AVG_FREQUENCY(t1.e)"
FROM t1; FROM t1;
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx1'; WHERE db_name='test' AND table_name='t1' AND index_name='idx1';
SELECT SELECT
(SELECT COUNT(*) FROM t1 WHERE t1.b IS NOT NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.b IS NOT NULL) /
...@@ -131,7 +131,7 @@ SELECT ...@@ -131,7 +131,7 @@ SELECT
WHERE t1.b IS NOT NULL AND t1.e IS NOT NULL) WHERE t1.b IS NOT NULL AND t1.e IS NOT NULL)
AS 'ARITY 2'; AS 'ARITY 2';
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx2'; WHERE db_name='test' AND table_name='t1' AND index_name='idx2';
SELECT SELECT
(SELECT COUNT(*) FROM t1 WHERE t1.c IS NOT NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.c IS NOT NULL) /
...@@ -142,14 +142,14 @@ SELECT ...@@ -142,14 +142,14 @@ SELECT
WHERE t1.c IS NOT NULL AND t1.d IS NOT NULL) WHERE t1.c IS NOT NULL AND t1.d IS NOT NULL)
AS 'ARITY 2'; AS 'ARITY 2';
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx3'; WHERE db_name='test' AND table_name='t1' AND index_name='idx3';
SELECT SELECT
(SELECT COUNT(*) FROM t1 WHERE t1.d IS NOT NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.d IS NOT NULL) /
(SELECT COUNT(DISTINCT t1.d) FROM t1 WHERE t1.d IS NOT NULL) (SELECT COUNT(DISTINCT t1.d) FROM t1 WHERE t1.d IS NOT NULL)
AS 'ARITY 1'; AS 'ARITY 1';
SELECT * FROM mysql.index_stat SELECT * FROM mysql.index_stats
WHERE db_name='test' AND table_name='t1' AND index_name='idx4'; WHERE db_name='test' AND table_name='t1' AND index_name='idx4';
SELECT SELECT
(SELECT COUNT(*) FROM t1 WHERE t1.e IS NOT NULL) / (SELECT COUNT(*) FROM t1 WHERE t1.e IS NOT NULL) /
...@@ -193,24 +193,24 @@ INSERT INTO t3 VALUES ...@@ -193,24 +193,24 @@ INSERT INTO t3 VALUES
ANALYZE TABLE t3; ANALYZE TABLE t3;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE t1 RENAME TO s1; ALTER TABLE t1 RENAME TO s1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
RENAME TABLE s1 TO t1; RENAME TABLE s1 TO t1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DROP TABLE t3; DROP TABLE t3;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
CREATE TEMPORARY TABLE t0 ( CREATE TEMPORARY TABLE t0 (
...@@ -222,84 +222,84 @@ INSERT INTO t0 SELECT a,b FROM t1; ...@@ -222,84 +222,84 @@ INSERT INTO t0 SELECT a,b FROM t1;
ALTER TABLE t1 CHANGE COLUMN b x varchar(32), ALTER TABLE t1 CHANGE COLUMN b x varchar(32),
CHANGE COLUMN e y double; CHANGE COLUMN e y double;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
ALTER TABLE t1 CHANGE COLUMN x b varchar(32), ALTER TABLE t1 CHANGE COLUMN x b varchar(32),
CHANGE COLUMN y e double; CHANGE COLUMN y e double;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
ALTER TABLE t1 RENAME TO s1, CHANGE COLUMN b x varchar(32); ALTER TABLE t1 RENAME TO s1, CHANGE COLUMN b x varchar(32);
SHOW CREATE TABLE s1; SHOW CREATE TABLE s1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE s1 RENAME TO t1, CHANGE COLUMN x b varchar(32); ALTER TABLE s1 RENAME TO t1, CHANGE COLUMN x b varchar(32);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE t1 CHANGE COLUMN b x varchar(30); ALTER TABLE t1 CHANGE COLUMN b x varchar(30);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE t1 CHANGE COLUMN x b varchar(32); ALTER TABLE t1 CHANGE COLUMN x b varchar(32);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx4);
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval eval
SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_column_stat' SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_column_stats'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'
FROM mysql.column_stat WHERE column_name='b'; FROM mysql.column_stats WHERE column_name='b';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval eval
SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_index_stat' SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats'
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'
FROM mysql.index_stat WHERE index_name IN ('idx1', 'idx4'); FROM mysql.index_stats WHERE index_name IN ('idx1', 'idx4');
ALTER TABLE t1 CHANGE COLUMN b x varchar(30); ALTER TABLE t1 CHANGE COLUMN b x varchar(30);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE t1 CHANGE COLUMN x b varchar(32); ALTER TABLE t1 CHANGE COLUMN x b varchar(32);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_column_stat' LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_column_stats'
INTO TABLE mysql.column_stat INTO TABLE mysql.column_stats
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval eval
LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_index_stat' LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/save_index_stats'
INTO TABLE mysql.index_stat INTO TABLE mysql.index_stats
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n';
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
remove_file $MYSQLTEST_VARDIR/tmp/save_column_stat; remove_file $MYSQLTEST_VARDIR/tmp/save_column_stats;
remove_file $MYSQLTEST_VARDIR/tmp/save_index_stat; remove_file $MYSQLTEST_VARDIR/tmp/save_index_stats;
ALTER TABLE t1 DROP COLUMN b; ALTER TABLE t1 DROP COLUMN b;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DROP INDEX idx2 ON t1; DROP INDEX idx2 ON t1;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DROP INDEX idx1 ON t1; DROP INDEX idx1 ON t1;
DROP INDEX idx4 ON t1; DROP INDEX idx4 ON t1;
...@@ -310,63 +310,63 @@ CREATE INDEX idx1 ON t1(b, e); ...@@ -310,63 +310,63 @@ CREATE INDEX idx1 ON t1(b, e);
CREATE INDEX idx2 ON t1(c, d); CREATE INDEX idx2 ON t1(c, d);
CREATE INDEX idx4 ON t1(e, b, d); CREATE INDEX idx4 ON t1(e, b, d);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a);
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE t1 DROP COLUMN b, ALTER TABLE t1 DROP COLUMN b,
DROP INDEX idx1, DROP INDEX idx2, DROP INDEX idx4; DROP INDEX idx1, DROP INDEX idx2, DROP INDEX idx4;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ALTER TABLE t1 ADD COLUMN b varchar(32); ALTER TABLE t1 ADD COLUMN b varchar(32);
ALTER TABLE t1 ALTER TABLE t1
ADD INDEX idx1 (b, e), ADD INDEX idx2 (c, d), ADD INDEX idx4 (e, b, d); ADD INDEX idx1 (b, e), ADD INDEX idx2 (c, d), ADD INDEX idx4 (e, b, d);
UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a); UPDATE t1 SET b=(SELECT b FROM t0 WHERE t0.a= t1.a);
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(b) INDEXES(idx1, idx2, idx4);
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES();
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS(c,e,b) INDEXES(idx2,idx4);
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DELETE FROM mysql.index_stat WHERE table_name='t1' AND index_name='primary'; DELETE FROM mysql.index_stats WHERE table_name='t1' AND index_name='primary';
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary); ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary);
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL; ANALYZE TABLE t1 PERSISTENT FOR COLUMNS ALL INDEXES ALL;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
CREATE TABLE t2 LIKE t1; CREATE TABLE t2 LIKE t1;
...@@ -375,14 +375,14 @@ INSERT INTO t2 SELECT * FROM t1; ...@@ -375,14 +375,14 @@ INSERT INTO t2 SELECT * FROM t1;
ANALYZE TABLE t2; ANALYZE TABLE t2;
SELECT * FROM mysql.table_stat; SELECT * FROM mysql.table_stats;
SELECT * FROM mysql.column_stat ORDER BY column_name; SELECT * FROM mysql.column_stats ORDER BY column_name;
SELECT * FROM mysql.index_stat ORDER BY index_name, prefix_arity, table_name; SELECT * FROM mysql.index_stats ORDER BY index_name, prefix_arity, table_name;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
ALTER TABLE t1 ALTER TABLE t1
DROP INDEX idx1, DROP INDEX idx1,
...@@ -394,14 +394,14 @@ ALTER TABLE t1 ...@@ -394,14 +394,14 @@ ALTER TABLE t1
ANALYZE TABLE t1; ANALYZE TABLE t1;
SELECT * FROM mysql.column_stat; SELECT * FROM mysql.column_stats;
SELECT * FROM mysql.index_stat; SELECT * FROM mysql.index_stats;
DROP TABLE t1,t2; DROP TABLE t1,t2;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
set use_stat_tables='never'; set use_stat_tables='never';
...@@ -428,13 +428,13 @@ ANALYZE TABLE Country, City, CountryLanguage; ...@@ -428,13 +428,13 @@ ANALYZE TABLE Country, City, CountryLanguage;
--enable_result_log --enable_result_log
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
use test; use test;
...@@ -465,39 +465,39 @@ ANALYZE TABLE Country, City, CountryLanguage; ...@@ -465,39 +465,39 @@ ANALYZE TABLE Country, City, CountryLanguage;
--enable_result_log --enable_result_log
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
use test; use test;
DROP DATABASE world; DROP DATABASE world;
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
DROP DATABASE world_innodb; DROP DATABASE world_innodb;
SELECT UPPER(db_name), UPPER(table_name), cardinality SELECT UPPER(db_name), UPPER(table_name), cardinality
FROM mysql.table_stat; FROM mysql.table_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency column_name, min_value, max_value, nulls_ratio, avg_length, avg_frequency
FROM mysql.column_stat; FROM mysql.column_stats;
SELECT UPPER(db_name), UPPER(table_name), SELECT UPPER(db_name), UPPER(table_name),
index_name, prefix_arity, avg_frequency index_name, prefix_arity, avg_frequency
FROM mysql.index_stat; FROM mysql.index_stats;
DELETE FROM mysql.table_stat; DELETE FROM mysql.table_stats;
DELETE FROM mysql.column_stat; DELETE FROM mysql.column_stats;
DELETE FROM mysql.index_stat; DELETE FROM mysql.index_stats;
set use_stat_tables=@save_use_stat_tables; set use_stat_tables=@save_use_stat_tables;
...@@ -59,11 +59,11 @@ CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, ...@@ -59,11 +59,11 @@ CREATE TABLE time_zone_transition_type ( Time_zone_id int unsigned NOT NULL,
CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones'; CREATE TABLE time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
CREATE TABLE table_stat (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 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 column_stat (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 double DEFAULT NULL, avg_length double DEFAULT NULL, avg_frequency double DEFAULT NULL, PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns'; CREATE TABLE 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 double DEFAULT NULL, avg_length double DEFAULT NULL, avg_frequency double DEFAULT NULL, PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
CREATE TABLE index_stat (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 double DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes'; CREATE TABLE 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 double DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes';
# Run the mysql_fix_privilege_tables.sql using "mysql --force" # Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES --exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES
...@@ -77,7 +77,7 @@ CREATE TABLE index_stat (db_name varchar(64) NOT NULL, table_name varchar(64) NO ...@@ -77,7 +77,7 @@ CREATE TABLE index_stat (db_name varchar(64) NOT NULL, table_name varchar(64) NO
-- disable_query_log -- disable_query_log
# Drop all tables created by this test # Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, table_stat, column_stat, index_stat; DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, table_stats, column_stats, index_stats;
-- enable_query_log -- enable_query_log
......
...@@ -66,11 +66,11 @@ CREATE TABLE servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) N ...@@ -66,11 +66,11 @@ CREATE TABLE servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) N
INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root'); INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root');
CREATE TABLE table_stat (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 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 column_stat (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 double DEFAULT NULL, avg_length double DEFAULT NULL, avg_frequency double DEFAULT NULL, PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns'; CREATE TABLE 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 double DEFAULT NULL, avg_length double DEFAULT NULL, avg_frequency double DEFAULT NULL, PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
CREATE TABLE index_stat (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 double DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes'; CREATE TABLE 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 double DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes';
# Run the mysql_fix_privilege_tables.sql using "mysql --force" # Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES --exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES
...@@ -84,7 +84,7 @@ CREATE TABLE index_stat (db_name varchar(64) NOT NULL, table_name varchar(64) NO ...@@ -84,7 +84,7 @@ CREATE TABLE index_stat (db_name varchar(64) NOT NULL, table_name varchar(64) NO
-- disable_query_log -- disable_query_log
# Drop all tables created by this test # Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, table_stat, column_stat, index_stat; DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, table_stats, column_stats, index_stats;
-- enable_query_log -- enable_query_log
......
...@@ -85,11 +85,11 @@ CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_b ...@@ -85,11 +85,11 @@ CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_b
CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM; CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
CREATE TABLE table_stat (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 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 column_stat (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 double DEFAULT NULL, avg_length double DEFAULT NULL, avg_frequency double DEFAULT NULL, PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns'; CREATE TABLE 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 double DEFAULT NULL, avg_length double DEFAULT NULL, avg_frequency double DEFAULT NULL, PRIMARY KEY (db_name,table_name,column_name) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Columns';
CREATE TABLE index_stat (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 double DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes'; CREATE TABLE 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 double DEFAULT NULL, PRIMARY KEY (db_name,table_name,index_name,prefix_arity) ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Statistics on Indexes';
# Run the mysql_fix_privilege_tables.sql using "mysql --force" # Run the mysql_fix_privilege_tables.sql using "mysql --force"
--exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES --exec $MYSQL --force test < $MYSQL_FIX_PRIVILEGE_TABLES
...@@ -103,7 +103,7 @@ CREATE TABLE index_stat (db_name varchar(64) NOT NULL, table_name varchar(64) NO ...@@ -103,7 +103,7 @@ CREATE TABLE index_stat (db_name varchar(64) NOT NULL, table_name varchar(64) NO
-- disable_query_log -- disable_query_log
# Drop all tables created by this test # Drop all tables created by this test
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, table_stat, column_stat, index_stat; DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv, procs_priv, servers, help_category, help_keyword, help_relation, help_topic, proc, time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type, general_log, slow_log, event, ndb_binlog_index, proxies_priv, table_stats, column_stats, index_stats;
-- enable_query_log -- enable_query_log
......
...@@ -483,8 +483,8 @@ CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NUL ...@@ -483,8 +483,8 @@ CREATE TABLE IF NOT EXISTS proxies_priv (Host char(60) binary DEFAULT '' NOT NUL
-- Remember for later if proxies_priv table already existed -- Remember for later if proxies_priv table already existed
set @had_proxies_priv_table= @@warning_count != 0; set @had_proxies_priv_table= @@warning_count != 0;
CREATE TABLE IF NOT EXISTS table_stat (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 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_stat (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 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_stat (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'; 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';
...@@ -63,9 +63,9 @@ static const uint STATISTICS_TABLES= 3; ...@@ -63,9 +63,9 @@ static const uint STATISTICS_TABLES= 3;
*/ */
static const LEX_STRING stat_table_name[STATISTICS_TABLES]= static const LEX_STRING stat_table_name[STATISTICS_TABLES]=
{ {
{ C_STRING_WITH_LEN("table_stat") }, { C_STRING_WITH_LEN("table_stats") },
{ C_STRING_WITH_LEN("column_stat") }, { C_STRING_WITH_LEN("column_stats") },
{ C_STRING_WITH_LEN("index_stat") } { C_STRING_WITH_LEN("index_stats") }
}; };
/* Name of database to which the statistical tables belong */ /* Name of database to which the statistical tables belong */
...@@ -191,8 +191,8 @@ public: ...@@ -191,8 +191,8 @@ public:
as well as update access fields belonging to the primary key and as well as update access fields belonging to the primary key and
delete records by prefixes of the primary key. delete records by prefixes of the primary key.
Objects of the classes Table_stat, Column_stat and Index stat are used Objects of the classes Table_stat, Column_stat and Index stat are used
for reading/writing statistics from/into persistent tables table_stat, for reading/writing statistics from/into persistent tables table_stats,
column_stat and index_stat correspondingly. These tables are stored in column_stats and index_stats correspondingly. These tables are stored in
the system database 'mysql'. the system database 'mysql'.
Statistics is read and written always for a given database table t. When Statistics is read and written always for a given database table t. When
...@@ -212,10 +212,10 @@ public: ...@@ -212,10 +212,10 @@ public:
Reading/writing statistical data from/into a statistical table is always Reading/writing statistical data from/into a statistical table is always
performed by a key. At the moment there is only one key defined for each performed by a key. At the moment there is only one key defined for each
statistical table and this key is primary. statistical table and this key is primary.
The primary key for the table table_stat is built as (db_name, table_name). The primary key for the table table_stats is built as (db_name, table_name).
The primary key for the table column_stat is built as (db_name, table_name, The primary key for the table column_stats is built as (db_name, table_name,
column_name). column_name).
The primary key for the table index_stat is built as (db_name, table_name, The primary key for the table index_stats is built as (db_name, table_name,
index_name, prefix_arity). index_name, prefix_arity).
Reading statistical data from a statistical table is performed by the Reading statistical data from a statistical table is performed by the
...@@ -228,17 +228,17 @@ public: ...@@ -228,17 +228,17 @@ public:
Let's assume the statistical data is read for table t from database db. Let's assume the statistical data is read for table t from database db.
When statistical data is searched in the table table_stat first When statistical data is searched in the table table_stats first
Table_stat::set_key_fields() should set the fields of db_name and Table_stat::set_key_fields() should set the fields of db_name and
table_name. Then get_stat_values looks for a row by the set key value, table_name. Then get_stat_values looks for a row by the set key value,
and, if the row is found, reads the value from the column and, if the row is found, reads the value from the column
table_stat.cardinality into the field read_stat.cardinality of the TABLE table_stats.cardinality into the field read_stat.cardinality of the TABLE
structure for table t and sets the value of read_stat.cardinality_is_null structure for table t and sets the value of read_stat.cardinality_is_null
from this structure to FALSE. If the value of the 'cardinality' column from this structure to FALSE. If the value of the 'cardinality' column
in the row is null or if no row is found read_stat.cardinality_is_null in the row is null or if no row is found read_stat.cardinality_is_null
is set to TRUE. is set to TRUE.
When statistical data is searched in the table column_stat first When statistical data is searched in the table column_stats first
Column_stat::set_key_fields() should set the fields of db_name, table_name Column_stat::set_key_fields() should set the fields of db_name, table_name
and column_name with column_name taken out of the only parameter f of the and column_name with column_name taken out of the only parameter f of the
Field* type passed to this method. After this get_stat_values looks Field* type passed to this method. After this get_stat_values looks
...@@ -254,14 +254,14 @@ public: ...@@ -254,14 +254,14 @@ public:
Otherwise the flag is set on. If no row is found for the column the all flags Otherwise the flag is set on. If no row is found for the column the all flags
in f->column_stat_nulls are set off. in f->column_stat_nulls are set off.
When statistical data is searched in the table index_stat first When statistical data is searched in the table index_stats first
Index_stat::set_key_fields() has to be called to set the fields of db_name, Index_stat::set_key_fields() has to be called to set the fields of db_name,
table_name, index_name and prefix_arity. The value of index_name is extracted table_name, index_name and prefix_arity. The value of index_name is extracted
from the first parameter key_info of the KEY* type passed to the method. from the first parameter key_info of the KEY* type passed to the method.
This parameter specifies the index of interest idx. The second parameter This parameter specifies the index of interest idx. The second parameter
passed to the method specifies the arity k of the index prefix for which passed to the method specifies the arity k of the index prefix for which
statistical data is to be read. E.g. if the index idx consists of 3 statistical data is to be read. E.g. if the index idx consists of 3
components (p1,p2,p3) the table index_stat usually will contain 3 rows for components (p1,p2,p3) the table index_stats usually will contain 3 rows for
this index: the first - for the prefix (p1), the second - for the prefix this index: the first - for the prefix (p1), the second - for the prefix
(p1,p2), and the third - for the the prefix (p1,p2,p3). After the key fields (p1,p2), and the third - for the the prefix (p1,p2,p3). After the key fields
has been set a call of get_stat_value looks for a row by the set key value. has been set a call of get_stat_value looks for a row by the set key value.
...@@ -582,8 +582,8 @@ public: ...@@ -582,8 +582,8 @@ public:
/* /*
An object of the class Table_stat is created to read statistical An object of the class Table_stat is created to read statistical
data on tables from the statistical table table_stat, to update data on tables from the statistical table table_stats, to update
table_stat with such statistical data, or to update columns table_stats with such statistical data, or to update columns
of the primary key, or to delete the record by its primary key or of the primary key, or to delete the record by its primary key or
its prefix. its prefix.
Rows from the statistical table are read and updated always by Rows from the statistical table are read and updated always by
...@@ -595,8 +595,8 @@ class Table_stat: public Stat_table ...@@ -595,8 +595,8 @@ class Table_stat: public Stat_table
private: private:
Field *db_name_field; /* Field for the column table_stat.db_name */ Field *db_name_field; /* Field for the column table_stats.db_name */
Field *table_name_field; /* Field for the column table_stat.table_name */ Field *table_name_field; /* Field for the column table_stats.table_name */
void common_init_table_stat() void common_init_table_stat()
{ {
...@@ -615,7 +615,7 @@ public: ...@@ -615,7 +615,7 @@ public:
/** /**
@details @details
The constructor 'tunes' the private and protected members of the The constructor 'tunes' the private and protected members of the
constructed object for the statistical table table_stat to read/update constructed object for the statistical table table_stats to read/update
statistics on table 'tab'. The TABLE structure for the table table_stat statistics on table 'tab'. The TABLE structure for the table table_stat
must be passed as a value for the parameter 'stat'. must be passed as a value for the parameter 'stat'.
*/ */
...@@ -721,8 +721,8 @@ public: ...@@ -721,8 +721,8 @@ public:
/* /*
An object of the class Column_stat is created to read statistical data An object of the class Column_stat is created to read statistical data
on table columns from the statistical table column_stat, to update on table columns from the statistical table column_stats, to update
column_stat with such statistical data, or to update columns column_stats with such statistical data, or to update columns
of the primary key, or to delete the record by its primary key or of the primary key, or to delete the record by its primary key or
its prefix. its prefix.
Rows from the statistical table are read and updated always by Rows from the statistical table are read and updated always by
...@@ -734,9 +734,9 @@ class Column_stat: public Stat_table ...@@ -734,9 +734,9 @@ class Column_stat: public Stat_table
private: private:
Field *db_name_field; /* Field for the column column_stat.db_name */ Field *db_name_field; /* Field for the column column_stats.db_name */
Field *table_name_field; /* Field for the column column_stat.table_name */ Field *table_name_field; /* Field for the column column_stats.table_name */
Field *column_name_field; /* Field for the column column_stat.column_name */ Field *column_name_field; /* Field for the column column_stats.column_name */
Field *table_field; /* Field from 'table' to read /update statistics on */ Field *table_field; /* Field from 'table' to read /update statistics on */
...@@ -758,9 +758,9 @@ public: ...@@ -758,9 +758,9 @@ public:
/** /**
@details @details
The constructor 'tunes' the private and protected members of the The constructor 'tunes' the private and protected members of the
constructed object for the statistical table column_stat to read/update constructed object for the statistical table column_stats to read/update
statistics on fields of the table 'tab'. The TABLE structure for the table statistics on fields of the table 'tab'. The TABLE structure for the table
column_stat must be passed as a value for the parameter 'stat'. column_stats must be passed as a value for the parameter 'stat'.
*/ */
Column_stat(TABLE *stat, TABLE *tab) :Stat_table(stat, tab) Column_stat(TABLE *stat, TABLE *tab) :Stat_table(stat, tab)
...@@ -772,7 +772,7 @@ public: ...@@ -772,7 +772,7 @@ public:
/** /**
@details @details
The constructor 'tunes' the private and protected members of the The constructor 'tunes' the private and protected members of the
object constructed for the statistical table column_stat for object constructed for the statistical table column_stats for
the future updates/deletes of the record concerning the table 'tab' the future updates/deletes of the record concerning the table 'tab'
from the database 'db'. from the database 'db'.
*/ */
...@@ -785,11 +785,11 @@ public: ...@@ -785,11 +785,11 @@ public:
/** /**
@brief @brief
Set table name fields for the statistical table column_stat Set table name fields for the statistical table column_stats
@details @details
The function stores the values of the fields db_name and table_name The function stores the values of the fields db_name and table_name
of the statistical table column_stat in the record buffer. of the statistical table column_stats in the record buffer.
*/ */
void set_full_table_name() void set_full_table_name()
...@@ -802,14 +802,14 @@ public: ...@@ -802,14 +802,14 @@ public:
/** /**
@brief @brief
Set the key fields for the statistical table column_stat Set the key fields for the statistical table column_stats
@param @param
col Field for the 'table' column to read/update statistics on col Field for the 'table' column to read/update statistics on
@details @details
The function stores the values of the fields db_name, table_name and The function stores the values of the fields db_name, table_name and
column_name in the record buffer for the statistical table column_stat. column_name in the record buffer for the statistical table column_stats.
These fields comprise the primary key for the table. These fields comprise the primary key for the table.
It also sets table_field to the passed parameter. It also sets table_field to the passed parameter.
...@@ -835,7 +835,7 @@ public: ...@@ -835,7 +835,7 @@ public:
@details @details
The function updates the primary key fields containing database name, The function updates the primary key fields containing database name,
table name, and column name for the last found record in the statistical table name, and column name for the last found record in the statistical
table column_stat. table column_stats.
@retval @retval
FALSE success with the update of the record FALSE success with the update of the record
...@@ -856,7 +856,7 @@ public: ...@@ -856,7 +856,7 @@ public:
/** /**
@brief @brief
Store statistical data into statistical fields of column_stat Store statistical data into statistical fields of column_stats
@details @details
This implementation of a purely virtual method sets the value of the This implementation of a purely virtual method sets the value of the
...@@ -925,11 +925,11 @@ public: ...@@ -925,11 +925,11 @@ public:
/** /**
@brief @brief
Read statistical data from statistical fields of column_stat Read statistical data from statistical fields of column_stats
@details @details
This implementation of a purely virtual method first looks for a record This implementation of a purely virtual method first looks for a record
the statistical table column_stat by its primary key set the record the statistical table column_stats by its primary key set the record
buffer with the help of Column_stat::set_key_fields. Then, if the row is buffer with the help of Column_stat::set_key_fields. Then, if the row is
found, the function reads the values of the columns 'min_value', found, the function reads the values of the columns 'min_value',
'max_value', 'nulls_ratio', 'avg_length' and 'avg_frequency' of the 'max_value', 'nulls_ratio', 'avg_length' and 'avg_frequency' of the
...@@ -998,7 +998,7 @@ public: ...@@ -998,7 +998,7 @@ public:
/* /*
An object of the class Index_stat is created to read statistical An object of the class Index_stat is created to read statistical
data on tables from the statistical table table_stat, to update data on tables from the statistical table table_stat, to update
index_stat with such statistical data, or to update columns index_stats with such statistical data, or to update columns
of the primary key, or to delete the record by its primary key or of the primary key, or to delete the record by its primary key or
its prefix. its prefix.
Rows from the statistical table are read and updated always by Rows from the statistical table are read and updated always by
...@@ -1010,10 +1010,10 @@ class Index_stat: public Stat_table ...@@ -1010,10 +1010,10 @@ class Index_stat: public Stat_table
private: private:
Field *db_name_field; /* Field for the column index_stat.db_name */ Field *db_name_field; /* Field for the column index_stats.db_name */
Field *table_name_field; /* Field for the column index_stat.table_name */ Field *table_name_field; /* Field for the column index_stats.table_name */
Field *index_name_field; /* Field for the column index_stat.table_name */ Field *index_name_field; /* Field for the column index_stats.table_name */
Field *prefix_arity_field; /* Field for the column index_stat.prefix_arity */ Field *prefix_arity_field; /* Field for the column index_stats.prefix_arity */
KEY *table_key_info; /* Info on the index to read/update statistics on */ KEY *table_key_info; /* Info on the index to read/update statistics on */
uint prefix_arity; /* Number of components of the index prefix of interest */ uint prefix_arity; /* Number of components of the index prefix of interest */
...@@ -1038,9 +1038,9 @@ public: ...@@ -1038,9 +1038,9 @@ public:
/** /**
@details @details
The constructor 'tunes' the private and protected members of the The constructor 'tunes' the private and protected members of the
constructed object for the statistical table index_stat to read/update constructed object for the statistical table index_stats to read/update
statistics on prefixes of different indexes of the table 'tab'. statistics on prefixes of different indexes of the table 'tab'.
The TABLE structure for the table index_stat must be passed as a value The TABLE structure for the table index_stats must be passed as a value
for the parameter 'stat'. for the parameter 'stat'.
*/ */
...@@ -1053,7 +1053,7 @@ public: ...@@ -1053,7 +1053,7 @@ public:
/** /**
@details @details
The constructor 'tunes' the private and protected members of the The constructor 'tunes' the private and protected members of the
object constructed for the statistical table index_stat for object constructed for the statistical table index_stats for
the future updates/deletes of the record concerning the table 'tab' the future updates/deletes of the record concerning the table 'tab'
from the database 'db'. from the database 'db'.
*/ */
...@@ -1067,11 +1067,11 @@ public: ...@@ -1067,11 +1067,11 @@ public:
/** /**
@brief @brief
Set table name fields for the statistical table index_stat Set table name fields for the statistical table index_stats
@details @details
The function stores the values of the fields db_name and table_name The function stores the values of the fields db_name and table_name
of the statistical table index_stat in the record buffer. of the statistical table index_stats in the record buffer.
*/ */
void set_full_table_name() void set_full_table_name()
...@@ -1083,14 +1083,14 @@ public: ...@@ -1083,14 +1083,14 @@ public:
/** /**
@brief @brief
Set the key fields of index_stat used to access records for index prefixes Set the key fields of index_stats used to access records for index prefixes
@param @param
index_info Info for the index of 'table' to read/update statistics on index_info Info for the index of 'table' to read/update statistics on
@details @details
The function sets the values of the fields db_name, table_name and The function sets the values of the fields db_name, table_name and
index_name in the record buffer for the statistical table index_stat. index_name in the record buffer for the statistical table index_stats.
It also sets table_key_info to the passed parameter. It also sets table_key_info to the passed parameter.
@note @note
...@@ -1110,7 +1110,7 @@ public: ...@@ -1110,7 +1110,7 @@ public:
/** /**
@brief @brief
Set the key fields for the statistical table index_stat Set the key fields for the statistical table index_stats
@param @param
index_info Info for the index of 'table' to read/update statistics on index_info Info for the index of 'table' to read/update statistics on
...@@ -1120,7 +1120,7 @@ public: ...@@ -1120,7 +1120,7 @@ public:
@details @details
The function sets the values of the fields db_name, table_name and The function sets the values of the fields db_name, table_name and
index_name, prefix_arity in the record buffer for the statistical index_name, prefix_arity in the record buffer for the statistical
table index_stat. These fields comprise the primary key for the table. table index_stats. These fields comprise the primary key for the table.
@note @note
The function is supposed to be called before any use of the The function is supposed to be called before any use of the
...@@ -1137,11 +1137,11 @@ public: ...@@ -1137,11 +1137,11 @@ public:
/** /**
@brief @brief
Store statistical data into statistical fields of table index_stat Store statistical data into statistical fields of table index_stats
@details @details
This implementation of a purely virtual method sets the value of the This implementation of a purely virtual method sets the value of the
column 'avg_frequency' of the statistical table index_stat according to column 'avg_frequency' of the statistical table index_stats according to
the value of write_stat.avg_frequency[Index_stat::prefix_arity] the value of write_stat.avg_frequency[Index_stat::prefix_arity]
from the KEY_INFO structure 'table_key_info'. from the KEY_INFO structure 'table_key_info'.
If the value of write_stat. avg_frequency[Index_stat::prefix_arity] is If the value of write_stat. avg_frequency[Index_stat::prefix_arity] is
...@@ -1165,11 +1165,11 @@ public: ...@@ -1165,11 +1165,11 @@ public:
/** /**
@brief @brief
Read statistical data from statistical fields of index_stat Read statistical data from statistical fields of index_stats
@details @details
This implementation of a purely virtual method first looks for a record the This implementation of a purely virtual method first looks for a record the
statistical table index_stat by its primary key set the record buffer with statistical table index_stats by its primary key set the record buffer with
the help of Index_stat::set_key_fields. If the row is found the function the help of Index_stat::set_key_fields. If the row is found the function
reads the value of the column 'avg_freguency' of the table index_stat and reads the value of the column 'avg_freguency' of the table index_stat and
sets the value of read_stat.avg_frequency[Index_stat::prefix_arity] sets the value of read_stat.avg_frequency[Index_stat::prefix_arity]
...@@ -1200,7 +1200,7 @@ public: ...@@ -1200,7 +1200,7 @@ public:
Unique class for this purpose. Unique class for this purpose.
The class Count_distinct_field is used only by the function The class Count_distinct_field is used only by the function
collect_statistics_from_table to calculate the values for collect_statistics_from_table to calculate the values for
column avg_frequency of the statistical table column_stat. column avg_frequency of the statistical table column_stats.
*/ */
class Count_distinct_field: public Sql_alloc class Count_distinct_field: public Sql_alloc
...@@ -1316,9 +1316,9 @@ public: ...@@ -1316,9 +1316,9 @@ public:
/* /*
The class Index_prefix_calc is a helper class used to calculate the values The class Index_prefix_calc is a helper class used to calculate the values
for the column 'avg_frequency' of the statistical table index_stat. for the column 'avg_frequency' of the statistical table index_stats.
For any table t from the database db and any k-component prefix of the For any table t from the database db and any k-component prefix of the
index i for this table the row from index_stat with the primary key index i for this table the row from index_stats with the primary key
(db,t,i,k) must contain in the column 'avg_frequency' either NULL or (db,t,i,k) must contain in the column 'avg_frequency' either NULL or
the number that is the ratio of N and V, where N is the number of index the number that is the ratio of N and V, where N is the number of index
entries without NULL values in the first k components of the index i, entries without NULL values in the first k components of the index i,
...@@ -1693,8 +1693,8 @@ int alloc_statistics_for_table(THD* thd, TABLE *table) ...@@ -1693,8 +1693,8 @@ int alloc_statistics_for_table(THD* thd, TABLE *table)
@note @note
The function allocates the memory for the statistical data on a table in the The function allocates the memory for the statistical data on a table in the
table's share memory with the intention to read the statistics there from table's share memory with the intention to read the statistics there from
the system persistent statistical tables mysql.table_stat, mysql.column_stat, the system persistent statistical tables mysql.table_stat, mysql.column_stats,
mysql.index_stat. The memory is allocated for the statistics on the table, mysql.index_stats. The memory is allocated for the statistics on the table,
on the tables's columns, and on the table's indexes. The memory is allocated on the tables's columns, and on the table's indexes. The memory is allocated
in the table_share's mem_root. in the table_share's mem_root.
If the parameter is_safe is TRUE then it is guaranteed that at any given time If the parameter is_safe is TRUE then it is guaranteed that at any given time
...@@ -2009,7 +2009,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index) ...@@ -2009,7 +2009,7 @@ int collect_statistics_for_index(THD *thd, TABLE *table, uint index)
@note @note
The function first collects statistical data for statistical characteristics The function first collects statistical data for statistical characteristics
to be saved in the statistical tables table_stat and column_stat. To do this to be saved in the statistical tables table_stat and column_stats. To do this
it performs a full table scan of 'table'. At this scan the function collects it performs a full table scan of 'table'. At this scan the function collects
statistics on each column of the table and count the total number of the statistics on each column of the table and count the total number of the
scanned rows. To calculate the value of 'avg_frequency' for a column the scanned rows. To calculate the value of 'avg_frequency' for a column the
...@@ -2191,7 +2191,7 @@ int update_statistics_for_table(THD *thd, TABLE *table) ...@@ -2191,7 +2191,7 @@ int update_statistics_for_table(THD *thd, TABLE *table)
if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row())) if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row()))
thd->clear_current_stmt_binlog_format_row(); thd->clear_current_stmt_binlog_format_row();
/* Update the statistical table table_stat */ /* Update the statistical table table_stats */
stat_table= tables[TABLE_STAT].table; stat_table= tables[TABLE_STAT].table;
Table_stat table_stat(stat_table, table); Table_stat table_stat(stat_table, table);
restore_record(stat_table, s->default_values); restore_record(stat_table, s->default_values);
...@@ -2200,7 +2200,7 @@ int update_statistics_for_table(THD *thd, TABLE *table) ...@@ -2200,7 +2200,7 @@ int update_statistics_for_table(THD *thd, TABLE *table)
if (err) if (err)
rc= 1; rc= 1;
/* Update the statistical table colum_stat */ /* Update the statistical table colum_stats */
stat_table= tables[COLUMN_STAT].table; stat_table= tables[COLUMN_STAT].table;
Column_stat column_stat(stat_table, table); Column_stat column_stat(stat_table, table);
for (Field **field_ptr= table->field; *field_ptr; field_ptr++) for (Field **field_ptr= table->field; *field_ptr; field_ptr++)
...@@ -2215,7 +2215,7 @@ int update_statistics_for_table(THD *thd, TABLE *table) ...@@ -2215,7 +2215,7 @@ int update_statistics_for_table(THD *thd, TABLE *table)
rc= 1; rc= 1;
} }
/* Update the statistical table index_stat */ /* Update the statistical table index_stats */
stat_table= tables[INDEX_STAT].table; stat_table= tables[INDEX_STAT].table;
uint key; uint key;
key_map::Iterator it(table->keys_in_use_for_query); key_map::Iterator it(table->keys_in_use_for_query);
...@@ -2289,13 +2289,13 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables) ...@@ -2289,13 +2289,13 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables)
DBUG_ENTER("read_statistics_for_table"); DBUG_ENTER("read_statistics_for_table");
/* Read statistics from the statistical table table_stat */ /* Read statistics from the statistical table table_stats */
stat_table= stat_tables[TABLE_STAT].table; stat_table= stat_tables[TABLE_STAT].table;
Table_stat table_stat(stat_table, table); Table_stat table_stat(stat_table, table);
table_stat.set_key_fields(); table_stat.set_key_fields();
table_stat.get_stat_values(); table_stat.get_stat_values();
/* Read statistics from the statistical table column_stat */ /* Read statistics from the statistical table column_stats */
stat_table= stat_tables[COLUMN_STAT].table; stat_table= stat_tables[COLUMN_STAT].table;
Column_stat column_stat(stat_table, table); Column_stat column_stat(stat_table, table);
for (field_ptr= table_share->field; *field_ptr; field_ptr++) for (field_ptr= table_share->field; *field_ptr; field_ptr++)
...@@ -2305,7 +2305,7 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables) ...@@ -2305,7 +2305,7 @@ int read_statistics_for_table(THD *thd, TABLE *table, TABLE_LIST *stat_tables)
column_stat.get_stat_values(); column_stat.get_stat_values();
} }
/* Read statistics from the statistical table index_stat */ /* Read statistics from the statistical table index_stats */
stat_table= stat_tables[INDEX_STAT].table; stat_table= stat_tables[INDEX_STAT].table;
Index_stat index_stat(stat_table, table); Index_stat index_stat(stat_table, table);
for (key_info= table_share->key_info, for (key_info= table_share->key_info,
...@@ -2503,7 +2503,7 @@ int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables) ...@@ -2503,7 +2503,7 @@ int read_statistics_for_tables_if_needed(THD *thd, TABLE_LIST *tables)
@details @details
The function delete statistics on the table called 'tab' of the database The function delete statistics on the table called 'tab' of the database
'db' from all statistical tables: table_stat, column_stat, index_stat. 'db' from all statistical tables: table_stats, column_stats, index_stats.
@retval @retval
0 If all deletions are successful 0 If all deletions are successful
...@@ -2539,7 +2539,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab) ...@@ -2539,7 +2539,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab)
if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row())) if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row()))
thd->clear_current_stmt_binlog_format_row(); thd->clear_current_stmt_binlog_format_row();
/* Delete statistics on table from the statistical table index_stat */ /* Delete statistics on table from the statistical table index_stats */
stat_table= tables[INDEX_STAT].table; stat_table= tables[INDEX_STAT].table;
Index_stat index_stat(stat_table, db, tab); Index_stat index_stat(stat_table, db, tab);
index_stat.set_full_table_name(); index_stat.set_full_table_name();
...@@ -2550,7 +2550,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab) ...@@ -2550,7 +2550,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab)
rc= 1; rc= 1;
} }
/* Delete statistics on table from the statistical table column_stat */ /* Delete statistics on table from the statistical table column_stats */
stat_table= tables[COLUMN_STAT].table; stat_table= tables[COLUMN_STAT].table;
Column_stat column_stat(stat_table, db, tab); Column_stat column_stat(stat_table, db, tab);
column_stat.set_full_table_name(); column_stat.set_full_table_name();
...@@ -2561,7 +2561,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab) ...@@ -2561,7 +2561,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab)
rc= 1; rc= 1;
} }
/* Delete statistics on table from the statistical table table_stat */ /* Delete statistics on table from the statistical table table_stats */
stat_table= tables[TABLE_STAT].table; stat_table= tables[TABLE_STAT].table;
Table_stat table_stat(stat_table, db, tab); Table_stat table_stat(stat_table, db, tab);
table_stat.set_key_fields(); table_stat.set_key_fields();
...@@ -2594,7 +2594,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab) ...@@ -2594,7 +2594,7 @@ int delete_statistics_for_table(THD *thd, LEX_STRING *db, LEX_STRING *tab)
@details @details
The function delete statistics on the column 'col' belonging to the table The function delete statistics on the column 'col' belonging to the table
'tab' from the statistical table column_stat. 'tab' from the statistical table column_stats.
@retval @retval
0 If the deletion is successful 0 If the deletion is successful
...@@ -2663,7 +2663,7 @@ int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col) ...@@ -2663,7 +2663,7 @@ int delete_statistics_for_column(THD *thd, TABLE *tab, Field *col)
@details @details
The function delete statistics on the index specified by 'key_info' The function delete statistics on the index specified by 'key_info'
defined on the table 'tab' from the statistical table index_stat. defined on the table 'tab' from the statistical table index_stats.
@retval @retval
0 If the deletion is successful 0 If the deletion is successful
...@@ -2734,8 +2734,8 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info) ...@@ -2734,8 +2734,8 @@ int delete_statistics_for_index(THD *thd, TABLE *tab, KEY *key_info)
@details @details
The function replaces the name of the table 'tab' from the database 'db' The function replaces the name of the table 'tab' from the database 'db'
for 'new_tab' in all all statistical tables: table_stat, column_stat, for 'new_tab' in all all statistical tables: table_stats, column_stats,
index_stat. index_stats.
@retval @retval
0 If all updates of the table name are successful 0 If all updates of the table name are successful
...@@ -2772,7 +2772,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab, ...@@ -2772,7 +2772,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab,
if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row())) if ((save_binlog_row_based= thd->is_current_stmt_binlog_format_row()))
thd->clear_current_stmt_binlog_format_row(); thd->clear_current_stmt_binlog_format_row();
/* Rename table in the statistical table index_stat */ /* Rename table in the statistical table index_stats */
stat_table= tables[INDEX_STAT].table; stat_table= tables[INDEX_STAT].table;
Index_stat index_stat(stat_table, db, tab); Index_stat index_stat(stat_table, db, tab);
index_stat.set_full_table_name(); index_stat.set_full_table_name();
...@@ -2784,7 +2784,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab, ...@@ -2784,7 +2784,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab,
index_stat.set_full_table_name(); index_stat.set_full_table_name();
} }
/* Rename table in the statistical table column_stat */ /* Rename table in the statistical table column_stats */
stat_table= tables[COLUMN_STAT].table; stat_table= tables[COLUMN_STAT].table;
Column_stat column_stat(stat_table, db, tab); Column_stat column_stat(stat_table, db, tab);
column_stat.set_full_table_name(); column_stat.set_full_table_name();
...@@ -2796,7 +2796,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab, ...@@ -2796,7 +2796,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab,
column_stat.set_full_table_name(); column_stat.set_full_table_name();
} }
/* Rename table in the statistical table table_stat */ /* Rename table in the statistical table table_stats */
stat_table= tables[TABLE_STAT].table; stat_table= tables[TABLE_STAT].table;
Table_stat table_stat(stat_table, db, tab); Table_stat table_stat(stat_table, db, tab);
table_stat.set_key_fields(); table_stat.set_key_fields();
...@@ -2818,7 +2818,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab, ...@@ -2818,7 +2818,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab,
/** /**
@brief @brief
Rename a column in the statistical table column_stat Rename a column in the statistical table column_stats
@param @param
thd The thread handle thd The thread handle
...@@ -2831,7 +2831,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab, ...@@ -2831,7 +2831,7 @@ int rename_table_in_stat_tables(THD *thd, LEX_STRING *db, LEX_STRING *tab,
@details @details
The function replaces the name of the column 'col' belonging to the table The function replaces the name of the column 'col' belonging to the table
'tab' for 'new_name' in the statistical table column_stat.. 'tab' for 'new_name' in the statistical table column_stats.
@retval @retval
0 If all updates of the table name are successful 0 If all updates of the table name are successful
......
...@@ -546,10 +546,11 @@ inline bool is_system_table_name(const char *name, uint length) ...@@ -546,10 +546,11 @@ inline bool is_system_table_name(const char *name, uint length)
my_tolower(ci, name[3]) == 'e') || my_tolower(ci, name[3]) == 'e') ||
/* one of mysql.*_stat tables */ /* one of mysql.*_stat tables */
(my_tolower(ci, name[length-4]) == 's' && (my_tolower(ci, name[length-5]) == 's' &&
my_tolower(ci, name[length-3]) == 't' && my_tolower(ci, name[length-4]) == 't' &&
my_tolower(ci, name[length-2]) == 'a' && my_tolower(ci, name[length-3]) == 'a' &&
my_tolower(ci, name[length-1]) == 't') || my_tolower(ci, name[length-2]) == 't' &&
my_tolower(ci, name[length-1]) == 's') ||
/* mysql.event table */ /* mysql.event table */
(my_tolower(ci, name[0]) == 'e' && (my_tolower(ci, name[0]) == 'e' &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment