different settings for max_heap_table_size and tmp_table_size (MariaDB 10.1.x)
Short Answer: None of those is "wrong".

How are those settings used?

There are (if I am not mistaken) exactly 2 uses for those two settings.  They are, as alluded to in some of what you quoted:


When you do CREATE TABLE ... ENGINE=MEMORY, it is given a limit of the current value of max_heap_table_size.  You can, and "should", change that setting just before doing that CREATE.  Too large a value could waste precious RAM.
When complex SELECT needs to create a temporary table, such as in preparation for ORDER BY, it first tries to use a MEMORY table; if this fails (for any of several reasons), it resorts to using MyISAM.  The limit on the MEMORY table size is min(max_heap_table_size, tmp_table_size).


I do not believe tmp_table_size is every used by itself.

If you never explicitly create a MEMORY table, the having those two settings the same avoids confusion and discussions like this.

So, the admonition to make them equal is weaker than the wording you quote.  It is "sorta, kinda, oughta", and not "you MUST!".

A different perspective:  Let me approach your question from another point of view.

Intra-select tmp tables can happen often -- in every connection, and even multiple times in a single select.  So, keeping tmp_table_size "low" is important to avoid blowing out RAM.  I recommend no more than 1% of RAM, but this is rather arbitrary.

If, meanwhile, you are playing around with MEMORY tables, you need control over their sizes.

OK, I have hit a dead end.  Why do they have the "min(...)"?  Why not just leave them separate?

I don't know.

Future:  The above discussion applies to at least MySQL versions 4.0 to 5.7, plus all versions (so far) of MariaDB.  MySQL 8.0 uses a "temp table engine", which may lead to some of the above discussion being moot.