1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixed the following problem: the syntax of the ANALYZE command did not

returned an error if the list of the specified index names contained
the name 'primary'.
This commit is contained in:
Igor Babaev
2012-08-18 22:18:46 -07:00
parent 584cfcbebd
commit fd7059d208
3 changed files with 42 additions and 11 deletions

View File

@ -893,6 +893,25 @@ test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
DELETE FROM mysql.index_stat WHERE table_name='t1' AND index_name='primary';
SELECT * FROM mysql.index_stat;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
ANALYZE TABLE t1 PERSISTENT FOR COLUMNS() INDEXES(primary);
Table Op Msg_type Msg_text
test.t1 analyze status Table is already up to date
SELECT * FROM mysql.index_stat;
db_name table_name index_name prefix_arity avg_frequency
test t1 idx2 1 7.0000
test t1 idx2 2 2.3846
test t1 idx4 1 6.2000
test t1 idx4 2 1.6875
test t1 idx4 3 1.1304
test t1 PRIMARY 1 1.0000
DELETE FROM mysql.table_stat;
DELETE FROM mysql.column_stat;
DELETE FROM mysql.index_stat;