This function calls the mysql_file_pwrite function. It is clear here that the actual operation is to write files. It is determined that the file fails to be written. The reason why the file is written is tmp
This function calls the mysql_file_pwrite function. It is clear here that the actual operation is to write files. It is determined that the file fails to be written. The reason why the file is written is/tmp
The following error occurs in the online database:
Incorrect key file for table '/tmp/# SQL _1194_1.myi'; try to repair it
Got an error from unknown thread, XXXX/storage/myisam/mi_write.c: 223
By viewing the source code, the mi_write function reports an error in row 223.
Mi_write.c: 44
/* Write new record to database */
Int mi_write (MI_INFO * info, uchar * record)
Here is a piece of err processing logic. The function to jump to err is the write_record function of row 142 in mi_write.c. The implementation of this function is the _ mi_write_static_record function.
Mi_statrec.c: 21
Int _ mi_write_static_record (MI_INFO * info, const uchar * record)
The logic of the specific operation is not displayed yet. Continue to debug the Code. This function calls the mi_nommap_pwrite function.
Mi_dynrec.c: 255
/* Wrapper for mysql_file_pwrite in case if mmap isn't used */
Size_t mi_nommap_pwrite (MI_INFO * info, const uchar * Buffer,
Size_t Count, my_off_t offset, myf MyFlags)
This function calls the mysql_file_pwrite function. It is clear here that the actual operation is to write files. It is determined that the file fails to be written. The reason why the file is written is/tmp. It is found that the table has a complex SQL query and uses a temporary table. In addition, the temporary table size even reaches 1 GB, resulting in insufficient space in/tmp, leading to errors.