1# 2# BUG#11747548:DETECT ORPHAN TEMP-POOL FILES, AND HANDLE GRACEFULLY. 3# 4#Set up. 5set global internal_tmp_disk_storage_engine = myisam; 6CREATE TABLE pid_table(pid_no INT); 7CREATE TABLE t1 (a BLOB); 8INSERT INTO t1 VALUES (1), (2); 9#Create MYD and MYI files for intrinsic temp table. 10LOAD DATA LOCAL INFILE 'pid_file' INTO TABLE pid_table; 11#Reports an error since the temp file already exists. 12SELECT a FROM t1 ORDER BY rand(1); 13ERROR HY000: Can't create or write to file 14#With patch, the query executes successfully. 15SELECT a FROM t1 ORDER BY rand(1); 16a 171 182 19#cleanup 20DROP TABLE t1, pid_table; 21set global internal_tmp_disk_storage_engine = InnoDB; 22