What is max_tmp_tables?

Recently I came across another configuration option I’d not heard of before. I profess to not know them all, however I do know when I find something unusual. If you are a beginner DBA, learn what is normal and expected, and identify what is out of the normal, investigate, research and question if necessary.

I gave away a MySQL Administrator’s Book based on seeing a configuration with safe-show-database, an option I’d not seen before, and then requesting people giving basic configuration options in that situation.

The latest is max_tmp_tables. So, what does the manual say for this option. I quote:

The maximum number of temporary tables a client can keep open at the same time. (This option does not yet do anything.)

If this option doesn’t yet do anything, why is it there? Does it actually do something and the documentation is misrepresenting the option? Did it provide some feature or functionality before?

I know MySQL has a number of features where are not fully featured or even production strength in a production environment. This makes me wonder how many more parameters, options or features exist but don’t actual do anything or work as designed!

I then also question where organizations or people come up with using these options when the basic required options are not in place. Sometimes just using the basics is the best practice to start with.

Comments

  1. Paul DuBois says

    “If this option doesn’t yet do anything, why is it there?”

    Because it’s visible in the server (e.g., with SHOW VARIABLES). If it weren’t documented, people would ask “why is it not listed in the manual?”

    “Does it actually do something and the documentation is misrepresenting the option?”

    No.

    “Did it provide some feature or functionality before?”

    Not that I know of. Perhaps it was originally added in anticipation of adding a feature that ended up not being developed. That’s only speculation on my part, though.

    “The latest is max_tmp_tables.”

    It was added in 3.23.0, and it’s been in the manual as described for quite a long time.

  2. says

    Paul is spot on (although see my latest post at http://www.pythian.com/news/2963/trivial-mysql-variable-of-the-day, old_alter_table is not actually documented, and it’s unclear whether or not changing the value does anything). I’ll add that the word “yet” speaks to whether or not it did something before — it did not — currently it doesn’t do anything “yet”, which to me means it never has done anything.

    I’ve been combing the status variables recently (hence my posts; I did one last week on the silliness that is the “old” and “new” variables) and “this variable is unused” shows up in the docs in some places. So to find the variables that don’t do anything, I used the search box on dev.mysql.com to search for “is unused” (and “do anything”) in the MySQL Reference v5.1 docs only, clicked on “repeat the seach with the omitted results included”, and found that I got many of the “options manual pages” and variables….

    From http://dev.mysql.com/doc/refman/5.1/en/server-options.html
    –log-tc
    –tc-heuristic-recover

    From http://dev.mysql.com/doc/refman/5.1/en/server-status-variables.html
    Tc_log_max_pages_used
    Tc_log_page_size

    From http://dev.mysql.com/doc/refman/5.1/en/privileges-provided.html
    the REFERENCES privilege

    From http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html
    rpl_recovery_rank

    From http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html
    date_format
    datetime_format
    table_lock_wait_timeout
    time_format

    And a bunch in the API:
    http://dev.mysql.com/doc/refman/5.1/en/mysql-options.html
    http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#sysvar_slave_exec_mode

    I’ll note for Paul — max_tmp_tables is the only variable/option that uses the phrasing “does not yet do anything” instead of “is unused”. Perhaps that should be fixed, for easier searching?