Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
11.2
-
None
Description
create table t1 (c1 int, c2 int, c3 int);
create table t2 (c4 int, c5 int, c6 int);
MariaDB [test]> analyze table t1 persistent for all, t2 persistent for columns (c4,c5) indexes(); |
+---------+---------+----------+-----------------------------------------+ |
| Table | Op | Msg_type | Msg_text | |
+---------+---------+----------+-----------------------------------------+ |
| test.t1 | analyze | status | Engine-independent statistics collected | |
| test.t1 | analyze | error | Invalid argument |
|
| test.t2 | analyze | status | Engine-independent statistics collected | |
| test.t2 | analyze | status | OK |
|
+---------+---------+----------+-----------------------------------------+ |
4 rows in set (0.038 sec) |
invalid argument is caused by the search for column(s) c4,c5 in table t1;
It should either work as expected or produce a syntax error, from
https://mariadb.com/kb/en/analyze-table/
ANALYZE [NO_WRITE_TO_BINLOG | LOCAL] TABLE tbl_name [,tbl_name ...]
|
[PERSISTENT FOR
|
{ ALL
|
| COLUMNS ([col_name [,col_name ...]]) INDEXES ([index_name [,index_name ...]])
|
}
|
]
|
only one PERSISTENT clause is allowed.
Attachments
Issue Links
- is duplicated by
-
MDEV-32117 PERSISTENT FOR clause is applied to all tables, and wrong documentation
- Open