Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.3.16
-
None
-
FreeBSD 11 in a 3 node Galera cluster
Description
Running ANALYZE TABLE table_name PERSISTENT FOR ALL on one node of a Galera cluster fails to record Histogram Statistics on two of three nodes.
The ANALYZE TABLE command is replicated and run on all three nodes, but only the node where the command was initiated saves the Histogram Statistics. Both other nodes have their Histogram Statistics reset to hist_size=0, hist_type=NULL, histogram=NULL.
As a result, a query run on a node with Histogram Statistics will have a different execution plan and performance than when it is run on a now without Histogram Statistics.
As a workaround, I am able to run ANALYZE NO_WRITE_TO_BINLOG TABLE table_name PERSISTENT FOR ALL on each node.
The attached images show the results after running the ANALYZE command on Node 1 then running a second time on Node 2. When run on Node 2, the Histogram Statistics on Node 1 are reset to hist_size=0, hist_type=NULL, histogram=NULL.