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
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
}
......@@ -16,6 +16,6 @@ show create table proc;
show create table event;
show create table general_log;
show create table slow_log;
show create table table_stat;
show create table column_stat;
show create table index_stat;
show create table table_stats;
show create table column_stats;
show create table index_stats;
......@@ -7,7 +7,7 @@ performance_schema
test
show tables in mysql;
Tables_in_mysql
column_stat
column_stats
columns_priv
db
event
......@@ -18,7 +18,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -26,7 +26,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......
drop table if exists t1,t2;
show tables;
Tables_in_mysql
column_stat
column_stats
columns_priv
db
event
......@@ -12,7 +12,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -20,7 +20,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -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";
show tables;
Tables_in_mysql
column_stat
column_stats
columns_priv
db
event
......@@ -49,7 +49,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -57,7 +57,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -83,7 +83,7 @@ ERROR HY000: Password hash should be a 41-digit hexadecimal number
set password=old_password('gambling3');
show tables;
Tables_in_mysql
column_stat
column_stats
columns_priv
db
event
......@@ -94,7 +94,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -102,7 +102,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......
......@@ -81,7 +81,7 @@ TRIGGERS
USER_PRIVILEGES
USER_STATISTICS
VIEWS
column_stat
column_stats
columns_priv
db
event
......@@ -92,7 +92,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
plugin
proc
procs_priv
......@@ -104,7 +104,7 @@ t2
t3
t4
t5
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -123,7 +123,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_STATISTICS TABLE_STATISTICS
TRIGGERS TRIGGERS
table_stat table_stat
table_stats table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
......@@ -145,7 +145,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_STATISTICS TABLE_STATISTICS
TRIGGERS TRIGGERS
table_stat table_stat
table_stats table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
......@@ -167,7 +167,7 @@ TABLE_CONSTRAINTS TABLE_CONSTRAINTS
TABLE_PRIVILEGES TABLE_PRIVILEGES
TABLE_STATISTICS TABLE_STATISTICS
TRIGGERS TRIGGERS
table_stat table_stat
table_stats table_stats
tables_priv tables_priv
time_zone time_zone
time_zone_leap_second time_zone_leap_second
......
......@@ -19,7 +19,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -29,7 +29,7 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
......@@ -37,7 +37,7 @@ mysql.procs_priv OK
mysql.proxies_priv OK
mysql.renamed_general_log OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......
......@@ -7,7 +7,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -17,14 +17,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -47,7 +47,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -57,14 +57,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -87,7 +87,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -97,14 +97,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -130,7 +130,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -140,14 +140,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -176,7 +176,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -186,14 +186,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -225,7 +225,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -235,14 +235,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -277,7 +277,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -287,14 +287,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......
......@@ -9,7 +9,7 @@ mtr
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -19,14 +19,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......
......@@ -3,7 +3,7 @@ drop view if exists v1;
drop database if exists client_test_db;
mtr.global_suppressions OK
mtr.test_suppressions OK
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -13,14 +13,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -30,7 +30,7 @@ mysql.time_zone_transition_type OK
mysql.user OK
mtr.global_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.db OK
mysql.event OK
......@@ -40,14 +40,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -55,7 +55,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
mysql.column_stat OK
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
......@@ -65,14 +65,14 @@ mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stat OK
mysql.index_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.table_stat OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
......@@ -80,7 +80,7 @@ mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type 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.db 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
mysql.help_relation Table is already up to date
mysql.help_topic 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.plugin Table is already up to date
mysql.proc 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.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.time_zone 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;
use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off';
select * from mysql.table_stat;
select * from mysql.table_stats;
db_name table_name cardinality
dbt3_s001 customer 150
dbt3_s001 lineitem 6005
......@@ -21,7 +21,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700
dbt3_s001 region 5
dbt3_s001 supplier 10
select * from mysql.index_stat;
select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000
......@@ -83,8 +83,8 @@ n_name revenue
PERU 321915.8715
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stat;
select * from mysql.table_stat;
delete from mysql.index_stats;
select * from mysql.table_stats;
db_name table_name cardinality
dbt3_s001 customer 150
dbt3_s001 lineitem 6005
......@@ -94,7 +94,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700
dbt3_s001 region 5
dbt3_s001 supplier 10
select * from mysql.index_stat;
select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000
......@@ -124,24 +124,24 @@ dbt3_s001 partsupp i_ps_suppkey 1 70.0000
dbt3_s001 region PRIMARY 1 1.0000
dbt3_s001 supplier PRIMARY 1 1.0000
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
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
dbt3_s001 orders PRIMARY 1 1.0000
dbt3_s001 orders i_o_orderdate 1 1.3321
dbt3_s001 orders i_o_custkey 1 15.0000
select (select cardinality from mysql.table_stat where table_name='orders') /
(select avg_frequency from mysql.index_stat
select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stats
where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct;
n_distinct
1126.0416
select count(distinct o_orderdate) from orders;
count(distinct o_orderdate)
1126
select (select cardinality from mysql.table_stat where table_name='orders') /
(select avg_frequency from mysql.index_stat
select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stats
where index_name='i_o_custkey' and prefix_arity=1) as n_distinct;
n_distinct
100.0000
......
......@@ -14,7 +14,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off';
select * from mysql.table_stat;
select * from mysql.table_stats;
db_name table_name cardinality
dbt3_s001 customer 150
dbt3_s001 lineitem 6005
......@@ -24,7 +24,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700
dbt3_s001 region 5
dbt3_s001 supplier 10
select * from mysql.index_stat;
select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000
......@@ -86,8 +86,8 @@ n_name revenue
PERU 321915.8715
ARGENTINA 69817.1451
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stat;
select * from mysql.table_stat;
delete from mysql.index_stats;
select * from mysql.table_stats;
db_name table_name cardinality
dbt3_s001 customer 150
dbt3_s001 lineitem 6005
......@@ -97,7 +97,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700
dbt3_s001 region 5
dbt3_s001 supplier 10
select * from mysql.index_stat;
select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000
......@@ -149,26 +149,26 @@ dbt3_s001 region 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 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
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
dbt3_s001 orders PRIMARY 1 1.0000
dbt3_s001 orders i_o_orderdate 1 1.3321
dbt3_s001 orders i_o_orderdate 2 1.0000
dbt3_s001 orders i_o_custkey 1 15.0000
dbt3_s001 orders i_o_custkey 2 1.0000
select (select cardinality from mysql.table_stat where table_name='orders') /
(select avg_frequency from mysql.index_stat
select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stats
where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct;
n_distinct
1126.0416
select count(distinct o_orderdate) from orders;
count(distinct o_orderdate)
1126
select (select cardinality from mysql.table_stat where table_name='orders') /
(select avg_frequency from mysql.index_stat
select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stats
where index_name='i_o_custkey' and prefix_arity=1) as n_distinct;
n_distinct
100.0000
......
......@@ -5,7 +5,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off';
select * from mysql.table_stat;
select * from mysql.table_stats;
db_name table_name cardinality
dbt3_s001 customer 150
dbt3_s001 lineitem 6005
......@@ -15,7 +15,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700
dbt3_s001 region 5
dbt3_s001 supplier 10
select * from mysql.index_stat;
select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000
......@@ -80,7 +80,7 @@ revenue
77949.91860000002
set use_stat_tables='preferably';
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -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_partkey 1 30.0250
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
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -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 1 30.0250
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -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_partkey 2 8.5786
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';
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -148,7 +148,7 @@ use dbt3_s001;
set use_stat_tables='preferably';
analyze table lineitem persistent for columns() indexes (i_l_receiptdate);
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......
......@@ -8,7 +8,7 @@ CREATE DATABASE dbt3_s001;
use dbt3_s001;
set @save_optimizer_switch=@@optimizer_switch;
set optimizer_switch='extended_keys=off';
select * from mysql.table_stat;
select * from mysql.table_stats;
db_name table_name cardinality
dbt3_s001 customer 150
dbt3_s001 lineitem 6005
......@@ -18,7 +18,7 @@ dbt3_s001 part 200
dbt3_s001 partsupp 700
dbt3_s001 region 5
dbt3_s001 supplier 10
select * from mysql.index_stat;
select * from mysql.index_stats;
db_name table_name index_name prefix_arity avg_frequency
dbt3_s001 customer PRIMARY 1 1.0000
dbt3_s001 customer i_c_nationkey 1 6.0000
......@@ -83,7 +83,7 @@ revenue
77949.91860000002
set use_stat_tables='preferably';
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -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_partkey 1 30.0250
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
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -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 1 30.0250
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -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_partkey 2 8.5786
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';
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......@@ -151,7 +151,7 @@ use dbt3_s001;
set use_stat_tables='preferably';
analyze table lineitem persistent for columns() indexes (i_l_receiptdate);
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
dbt3_s001 lineitem PRIMARY 1 4.0033
dbt3_s001 lineitem PRIMARY 2 1.0000
......
This diff is collapsed.
show tables;
Tables_in_db
column_stat
column_stats
columns_priv
db
event
......@@ -11,7 +11,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -19,7 +19,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat;
show create table table_stats;
Table Create Table
table_stat CREATE TABLE `table_stat` (
table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
) 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
column_stat CREATE TABLE `column_stat` (
column_stats CREATE TABLE `column_stats` (
`db_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,
......@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` decimal(12,4) DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) 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
index_stat CREATE TABLE `index_stat` (
index_stats CREATE TABLE `index_stats` (
`db_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,
......
show tables;
Tables_in_db
column_stat
column_stats
columns_priv
db
event
......@@ -11,7 +11,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -19,7 +19,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat;
show create table table_stats;
Table Create Table
table_stat CREATE TABLE `table_stat` (
table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
) 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
column_stat CREATE TABLE `column_stat` (
column_stats CREATE TABLE `column_stats` (
`db_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,
......@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` double DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) 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
index_stat CREATE TABLE `index_stat` (
index_stats CREATE TABLE `index_stats` (
`db_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,
......
show tables;
Tables_in_db
column_stat
column_stats
columns_priv
db
event
......@@ -11,7 +11,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -19,7 +19,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat;
show create table table_stats;
Table Create Table
table_stat CREATE TABLE `table_stat` (
table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
) 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
column_stat CREATE TABLE `column_stat` (
column_stats CREATE TABLE `column_stats` (
`db_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,
......@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` double DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) 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
index_stat CREATE TABLE `index_stat` (
index_stats CREATE TABLE `index_stats` (
`db_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,
......
show tables;
Tables_in_db
column_stat
column_stats
columns_priv
db
event
......@@ -11,7 +11,7 @@ help_keyword
help_relation
help_topic
host
index_stat
index_stats
ndb_binlog_index
plugin
proc
......@@ -19,7 +19,7 @@ procs_priv
proxies_priv
servers
slow_log
table_stat
table_stats
tables_priv
time_zone
time_zone_leap_second
......@@ -267,17 +267,17 @@ slow_log CREATE TABLE `slow_log` (
`server_id` int(10) unsigned NOT NULL,
`sql_text` mediumtext NOT NULL
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log'
show create table table_stat;
show create table table_stats;
Table Create Table
table_stat CREATE TABLE `table_stat` (
table_stats CREATE TABLE `table_stats` (
`db_name` varchar(64) COLLATE utf8_bin NOT NULL,
`table_name` varchar(64) COLLATE utf8_bin NOT NULL,
`cardinality` bigint(21) unsigned DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`)
) 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
column_stat CREATE TABLE `column_stat` (
column_stats CREATE TABLE `column_stats` (
`db_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,
......@@ -288,9 +288,9 @@ column_stat CREATE TABLE `column_stat` (
`avg_frequency` double DEFAULT NULL,
PRIMARY KEY (`db_name`,`table_name`,`column_name`)
) 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
index_stat CREATE TABLE `index_stat` (
index_stats CREATE TABLE `index_stats` (
`db_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,
......
......@@ -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 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 column_stat 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_stat 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_stat 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_stat 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 avg_frequency 8 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_stats column_name 3 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_stats max_value 5 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_stats nulls_ratio 6 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
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_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')
......@@ -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 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 index_stat 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_stat 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_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql index_stats avg_frequency 5 NULL YES decimal NULL NULL 12 4 NULL NULL NULL decimal(12,4)
def mysql index_stats db_name 1 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_stats prefix_arity 4 NULL NO int NULL NULL 10 0 NULL NULL NULL int(11) unsigned 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 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)
......@@ -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 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 table_stat 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_stat table_name 2 NULL NO varchar 64 192 NULL NULL NULL utf8 utf8_bin varchar(64) PRI
def mysql table_stats cardinality 3 NULL YES bigint NULL NULL 20 0 NULL NULL NULL bigint(21) unsigned
def mysql table_stats db_name 1 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 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)
......@@ -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)
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 column_stat 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_stat 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_stat 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_stat avg_length decimal NULL NULL NULL NULL decimal(12,4)
NULL mysql column_stat avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
3.0000 mysql column_stats db_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_stats column_name varchar 64 192 utf8 utf8_bin varchar(64)
3.0000 mysql column_stats min_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_stats nulls_ratio 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_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 Db char 64 192 utf8 utf8_bin char(64)
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)
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 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_stat 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)
NULL mysql index_stat prefix_arity int NULL NULL NULL NULL int(11) unsigned
NULL mysql index_stat avg_frequency decimal NULL NULL NULL NULL decimal(12,4)
3.0000 mysql index_stats db_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_stats index_name varchar 64 192 utf8 utf8_bin varchar(64)
NULL mysql index_stats prefix_arity int NULL NULL NULL NULL int(11) unsigned
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
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
......@@ -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
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 table_stat 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)
NULL mysql table_stat cardinality bigint NULL NULL NULL NULL bigint(21) unsigned
3.0000 mysql table_stats db_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_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
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)
......
......@@ -75,9 +75,9 @@ table_schema, table_name, column_name
FROM information_schema.key_column_usage
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
def mysql PRIMARY def mysql column_stat db_name
def mysql PRIMARY def mysql column_stat table_name
def mysql PRIMARY def mysql column_stat column_name
def mysql PRIMARY def mysql column_stats db_name
def mysql PRIMARY def mysql column_stats table_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 Db
def mysql PRIMARY def mysql columns_priv User
......@@ -99,10 +99,10 @@ def mysql PRIMARY def mysql help_topic help_topic_id
def mysql name def mysql help_topic name
def mysql PRIMARY def mysql host Host
def mysql PRIMARY def mysql host Db
def mysql PRIMARY def mysql index_stat db_name
def mysql PRIMARY def mysql index_stat table_name
def mysql PRIMARY def mysql index_stat index_name
def mysql PRIMARY def mysql index_stat prefix_arity
def mysql PRIMARY def mysql index_stats db_name
def mysql PRIMARY def mysql index_stats table_name
def mysql PRIMARY def mysql index_stats index_name
def mysql PRIMARY def mysql index_stats prefix_arity
def mysql PRIMARY def mysql ndb_binlog_index epoch
def mysql PRIMARY def mysql plugin name
def mysql PRIMARY def mysql proc db
......@@ -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_user
def mysql PRIMARY def mysql servers Server_name
def mysql PRIMARY def mysql table_stat db_name
def mysql PRIMARY def mysql table_stat table_name
def mysql PRIMARY def mysql table_stats db_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 Db
def mysql PRIMARY def mysql tables_priv User
......
......@@ -85,9 +85,9 @@ INDEX_COMMENT varchar(1024) NO
SELECT table_catalog, table_schema, table_name, index_schema, index_name
FROM information_schema.statistics WHERE table_catalog IS NOT NULL;
table_catalog table_schema table_name index_schema index_name
def mysql column_stat mysql PRIMARY
def mysql column_stat mysql PRIMARY
def mysql column_stat mysql PRIMARY
def mysql column_stats mysql PRIMARY
def mysql column_stats 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
......@@ -110,10 +110,10 @@ def mysql help_topic mysql PRIMARY
def mysql help_topic mysql name
def mysql host mysql PRIMARY
def mysql host mysql PRIMARY
def mysql index_stat mysql PRIMARY
def mysql index_stat mysql PRIMARY
def mysql index_stat mysql PRIMARY
def mysql index_stat mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql index_stats mysql PRIMARY
def mysql ndb_binlog_index mysql PRIMARY
def mysql plugin mysql PRIMARY
def mysql proc mysql PRIMARY
......@@ -131,8 +131,8 @@ def mysql proxies_priv mysql PRIMARY
def mysql proxies_priv mysql PRIMARY
def mysql proxies_priv mysql Grantor
def mysql servers mysql PRIMARY
def mysql table_stat mysql PRIMARY
def mysql table_stat mysql PRIMARY
def mysql table_stats 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
......
......@@ -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 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 column_stat 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_stat 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE
def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql column_stats 0 mysql PRIMARY 2 table_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 2 Db 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
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 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_stat 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_stat 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 3 index_name 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 plugin 0 mysql PRIMARY 1 name 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
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 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_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql table_stats 0 mysql PRIMARY 1 db_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_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
......
......@@ -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 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 column_stat 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_stat 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE
def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql column_stats 0 mysql PRIMARY 2 table_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 2 Db 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
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 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_stat 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_stat 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 3 index_name 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 plugin 0 mysql PRIMARY 1 name 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
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 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_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql table_stats 0 mysql PRIMARY 1 db_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_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
......@@ -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 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 column_stat 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_stat 0 mysql PRIMARY 3 column_name A #CARD# NULL NULL BTREE
def mysql column_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql column_stats 0 mysql PRIMARY 2 table_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 2 Db 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
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 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_stat 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_stat 0 mysql PRIMARY 4 prefix_arity A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 1 db_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql index_stats 0 mysql PRIMARY 3 index_name 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 plugin 0 mysql PRIMARY 1 name 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
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 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_stat 0 mysql PRIMARY 2 table_name A #CARD# NULL NULL BTREE
def mysql table_stats 0 mysql PRIMARY 1 db_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_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
......
......@@ -57,7 +57,7 @@ table_schema, table_name
FROM information_schema.table_constraints
WHERE constraint_catalog IS NOT NULL;
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 db
def mysql PRIMARY mysql event
......@@ -70,14 +70,14 @@ def mysql PRIMARY mysql help_relation
def mysql PRIMARY mysql help_topic
def mysql name mysql help_topic
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 plugin
def mysql PRIMARY mysql proc
def mysql PRIMARY mysql procs_priv
def mysql PRIMARY mysql proxies_priv
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 time_zone
def mysql PRIMARY mysql time_zone_leap_second
......
......@@ -8,7 +8,7 @@ WHERE table_schema = 'mysql'
ORDER BY table_schema,table_name,constraint_name;
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
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 event PRIMARY KEY
def mysql PRIMARY mysql func PRIMARY KEY
......@@ -20,7 +20,7 @@ def mysql PRIMARY mysql help_relation PRIMARY KEY
def mysql name mysql help_topic UNIQUE
def mysql PRIMARY mysql help_topic 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 plugin PRIMARY KEY
def mysql PRIMARY mysql proc 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 servers 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_leap_second PRIMARY KEY
def mysql PRIMARY mysql time_zone_name PRIMARY KEY
......
......@@ -37,7 +37,7 @@ user_comment Column privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME column_stat
TABLE_NAME column_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -267,7 +267,7 @@ user_comment Host privileges; Merged with database privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME index_stat
TABLE_NAME index_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -474,7 +474,7 @@ user_comment Table privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME table_stat
TABLE_NAME table_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......
......@@ -37,7 +37,7 @@ user_comment Column privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME column_stat
TABLE_NAME column_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -267,7 +267,7 @@ user_comment Host privileges; Merged with database privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME index_stat
TABLE_NAME index_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -474,7 +474,7 @@ user_comment Table privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME table_stat
TABLE_NAME table_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -674,7 +674,7 @@ user_comment Column privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME column_stat
TABLE_NAME column_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -904,7 +904,7 @@ user_comment Host privileges; Merged with database privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME index_stat
TABLE_NAME index_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......@@ -1111,7 +1111,7 @@ user_comment Table privileges
Separator -----------------------------------------------------
TABLE_CATALOG def
TABLE_SCHEMA mysql
TABLE_NAME table_stat
TABLE_NAME table_stats
TABLE_TYPE BASE TABLE
ENGINE MYISAM_OR_MARIA
VERSION 10
......
......@@ -23,18 +23,18 @@ set optimizer_switch='extended_keys=off';
--disable_warnings
--source include/dbt3_s001.inc
create index i_p_retailprice on part(p_retailprice);
delete from mysql.table_stat;
delete from mysql.column_stat;
delete from mysql.index_stat;
delete from mysql.table_stats;
delete from mysql.column_stats;
delete from mysql.index_stats;
ANALYZE TABLE
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_result_log
--enable_query_log
select * from mysql.table_stat;
select * from mysql.index_stat;
select * from mysql.table_stats;
select * from mysql.index_stats;
set optimizer_switch=@save_optimizer_switch;
......@@ -57,29 +57,29 @@ eval $Q5;
set optimizer_switch=@save_optimizer_switch;
delete from mysql.index_stat;
delete from mysql.index_stats;
--disable_query_log
--disable_result_log
--disable_warnings
ANALYZE TABLE
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_result_log
--enable_query_log
select * from mysql.table_stat;
select * from mysql.index_stat;
select * from mysql.table_stats;
select * from mysql.index_stats;
select * from mysql.table_stat where table_name='orders';
select * from mysql.index_stat where table_name='orders';
select (select cardinality from mysql.table_stat where table_name='orders') /
(select avg_frequency from mysql.index_stat
select * from mysql.table_stats where table_name='orders';
select * from mysql.index_stats where table_name='orders';
select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stats
where index_name='i_o_orderdate' and prefix_arity=1) as n_distinct;
select count(distinct o_orderdate) from orders;
select (select cardinality from mysql.table_stat where table_name='orders') /
(select avg_frequency from mysql.index_stat
select (select cardinality from mysql.table_stats where table_name='orders') /
(select avg_frequency from mysql.index_stats
where index_name='i_o_custkey' and prefix_arity=1) as n_distinct;
select count(distinct o_custkey) from orders;
show index from orders;
......@@ -191,7 +191,7 @@ FLUSH TABLE t1;
SET use_stat_tables='never';
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;
SET use_stat_tables='preferably';
......@@ -200,7 +200,7 @@ EXPLAIN SELECT * FROM t1;
--enable_warnings
# 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;
set use_stat_tables=@save_use_stat_tables;
......
......@@ -24,9 +24,9 @@ set optimizer_switch='extended_keys=off';
--disable_result_log
--disable_warnings
--source include/dbt3_s001.inc
delete from mysql.table_stat;
delete from mysql.column_stat;
delete from mysql.index_stat;
delete from mysql.table_stats;
delete from mysql.column_stats;
delete from mysql.index_stats;
ANALYZE TABLE
customer, lineitem, nation, orders, part, partsupp, region, supplier;
--enable_warnings
......
......@@ -21,17 +21,17 @@ set optimizer_switch='extended_keys=off';
--disable_result_log
--disable_warnings
--source include/dbt3_s001.inc
delete from mysql.table_stat;
delete from mysql.column_stat;
delete from mysql.index_stat;
delete from mysql.table_stats;
delete from mysql.column_stats;
delete from mysql.index_stats;
ANALYZE TABLE
customer, lineitem, nation, orders, part, partsupp, region, supplier;
--enable_warnings
--enable_result_log
--enable_query_log
select * from mysql.table_stat;
select * from mysql.index_stat;
select * from mysql.table_stats;
select * from mysql.index_stats;
#
......@@ -93,20 +93,20 @@ set debug_sync='RESET';
# DEBUG_SYNC(thd, "statistics_collection_start2");
#
select * from mysql.index_stat where table_name='lineitem' order by index_name;
delete from mysql.index_stat
select * from mysql.index_stats where table_name='lineitem' order by index_name;
delete from mysql.index_stats
where table_name='lineitem' and
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_warnings
analyze table lineitem persistent for columns() indexes (i_l_shipdate);
--enable_warnings
--enable_result_log
select * from mysql.index_stat where table_name='lineitem' order by index_name;
delete from mysql.index_stat
select * from mysql.index_stats where table_name='lineitem' order by index_name;
delete from mysql.index_stats
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 (con2, localhost, root,,);
......@@ -144,7 +144,7 @@ disconnect con1;
disconnect con2;
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;
......
This diff is collapsed.
......@@ -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 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"
--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
-- disable_query_log
# 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
......
......@@ -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');
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"
--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
-- disable_query_log
# 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
......
......@@ -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 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"
--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
-- disable_query_log
# 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
......
......@@ -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
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';
This diff is collapsed.
......@@ -546,10 +546,11 @@ inline bool is_system_table_name(const char *name, uint length)
my_tolower(ci, name[3]) == 'e') ||
/* one of mysql.*_stat tables */
(my_tolower(ci, name[length-4]) == 's' &&
my_tolower(ci, name[length-3]) == 't' &&
my_tolower(ci, name[length-2]) == 'a' &&
my_tolower(ci, name[length-1]) == 't') ||
(my_tolower(ci, name[length-5]) == 's' &&
my_tolower(ci, name[length-4]) == 't' &&
my_tolower(ci, name[length-3]) == 'a' &&
my_tolower(ci, name[length-2]) == 't' &&
my_tolower(ci, name[length-1]) == 's') ||
/* mysql.event table */
(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