On Sun, May 03, 2020 at 04:47:46PM +0530, Varun Gupta wrote:
On Fri, May 1, 2020 at 2:15 AM Sergey Petrunia <sergey@mariadb.com> wrote:
The patch also introduces this behaviour:
analyze table ... persistent for ... indexes(no_such_index);
will now cause engine statistics to be still collected. Before the patch it exited with an error.
But then, this is consistent with what happens for
analyze table ... persistent for columns(no_such_column) ...
So I guess this is ok.
I am not able to understand what you mean here, for no_such_index I think you mean an empty list and for such case I think collecting statistics fro all the indexes is fine. If this means something else, then lets discuss it
I mean, before the patch MariaDB> analyze table t1 persistent for columns () indexes (no_such_index); +-------+---------+----------+------------------+ | Table | Op | Msg_type | Msg_text | +-------+---------+----------+------------------+ | j1.t1 | analyze | error | Invalid argument | +-------+---------+----------+------------------+ 1 row in set (0.00 sec) After the patch: MariaDB> analyze table t1 persistent for columns () indexes (no_such_index); +-------+---------+----------+-----------------------------------------+ | Table | Op | Msg_type | Msg_text | +-------+---------+----------+-----------------------------------------+ | j1.t1 | analyze | status | Engine-independent statistics collected | | j1.t1 | analyze | error | Invalid argument | +-------+---------+----------+-----------------------------------------+ 2 rows in set (0.03 sec) But the new behavior is actually consistent with other similar errors: MariaDB> analyze table t1 persistent for columns (no_such_column) indexes (); +-------+---------+----------+-----------------------------------------+ | Table | Op | Msg_type | Msg_text | +-------+---------+----------+-----------------------------------------+ | j1.t1 | analyze | status | Engine-independent statistics collected | | j1.t1 | analyze | error | Invalid argument | +-------+---------+----------+-----------------------------------------+ Perhaps we need a separate MDEV to fix error reporting. BR Sergei -- Sergei Petrunia, Software Developer MariaDB Corporation | Skype: sergefp | Blog: http://s.petrunia.net/blog