Bug #86737 tmpdir set to root of drive lead to spam;Invalid (old?) table or database name '
Submitted: 18 Jun 2017 14:35 Modified: 27 Nov 2017 13:04
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:8.0.3 OS:Windows
Assigned to: CPU Architecture:Any
Tags: regression, SPAM

[18 Jun 2017 14:35] Shane Bester
Description:
This is a recent regression in trunk.
When tmpdir is set to root of a drive, error log gets spammed.

The code that prints out the error only executes on non-debug builds:

    if (errors) // Old 5.0 name
    {
#ifndef DBUG_OFF
      if (!stay_quiet) {
#endif /* DBUG_OFF */
        LogErr(ERROR_LEVEL, ER_INVALID_OR_OLD_TABLE_OR_DB_NAME, from);
#ifndef DBUG_OFF
      }
#endif /* DBUG_OFF */
      /*

mysqld.exe!filename_to_tablename
mysqld.exe!dd_parse_tbl_name
mysqld.exe!ha_innobase::open
mysqld.exe!handler::ha_open
mysqld.exe!open_tmp_table
mysqld.exe!instantiate_tmp_table
mysqld.exe!QEP_tmp_table::prepare_tmp_table
mysqld.exe!QEP_tmp_table::put_record
mysqld.exe!sub_select_op
mysqld.exe!evaluate_join_record
mysqld.exe!sub_select
mysqld.exe!do_select
mysqld.exe!JOIN::exec
mysqld.exe!Sql_cmd_dml::execute_inner
mysqld.exe!Sql_cmd_dml::execute
mysqld.exe!mysql_execute_command
mysqld.exe!mysql_parse
mysqld.exe!dispatch_command
mysqld.exe!do_command
mysqld.exe!handle_connection

How to repeat:
On a release (aka, non-debug) build run mysqld with --tmpdir=h:/
or the root of another available drive.

-- -----------------------
drop table if exists t;
create table t(a blob,b blob)engine=innodb;
insert into t values('a','b'),('c','d'),('e','f');
select * from t group by a,b order by b desc,a desc;
-- -----------------------

Suggested fix:
Looks like that line of code was last touched by this:
WL#9344: Logging services: error messages
[18 Jun 2017 14:36] MySQL Verification Team
workaround is to set --tmpdir=h:/tmp  or some subdirectory instead of root of drive.

spam looks like this:

2017-06-18T13:18:35.648221Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.648721Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.668724Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.715730Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.716230Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.729232Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.729732Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.777738Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.777738Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.797240Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.799741Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.851747Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.893252Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.914255Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.951260Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.957261Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.969262Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:35.997266Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.004266Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.015268Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.039771Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.085777Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.093278Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.108280Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.108780Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.139784Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.155786Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.156286Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.277801Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.278301Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.301304Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.312806Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.404317Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.411818Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.413318Z 6 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.427320Z 8 [ERROR] Invalid (old?) table or database name 'h:'
2017-06-18T13:18:36.429821Z 8 [ERROR] Invalid (old?) table or database name 'h:'
[27 Nov 2017 13:04] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.4 release, and here's the changelog entry:

 Setting tmpdir to the root of a drive caused "Invalid (old?) table or
database name" error messages to be printed to the error log.