mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
48450d8a2b
mysql-test/r/analyze.result: test result fixed mysql-test/t/analyze.test: test case added sql/sql_table.cc: we don't need to remove temporary table from the cache, but we need to reload it's info
48 lines
1.4 KiB
Text
48 lines
1.4 KiB
Text
create table t1 (a bigint);
|
|
lock tables t1 write;
|
|
insert into t1 values(0);
|
|
analyze table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 analyze status OK
|
|
unlock tables;
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
create table t1 (a bigint);
|
|
insert into t1 values(0);
|
|
lock tables t1 write;
|
|
delete from t1;
|
|
analyze table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 analyze status OK
|
|
unlock tables;
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
create table t1 (a bigint);
|
|
insert into t1 values(0);
|
|
analyze table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 analyze status OK
|
|
check table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 check status OK
|
|
drop table t1;
|
|
CREATE TABLE t1 (a int);
|
|
prepare stmt1 from "SELECT * FROM t1 PROCEDURE ANALYSE()";
|
|
execute stmt1;
|
|
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
|
execute stmt1;
|
|
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
|
deallocate prepare stmt1;
|
|
create temporary table t1(a int, index(a));
|
|
insert into t1 values('1'),('2'),('3'),('4'),('5');
|
|
analyze table t1;
|
|
Table Op Msg_type Msg_text
|
|
test.t1 analyze status OK
|
|
show index from t1;
|
|
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
|
|
t1 1 a 1 a A 5 NULL NULL YES BTREE
|
|
drop table t1;
|