Bug #103515 Bug report: strange output in mysql server
Submitted: 28 Apr 2021 9:31 Modified: 28 Apr 2021 9:39
Reporter: Zuming Jiang Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S3 (Non-critical)
Version:latest version (8.0.24), 8.0.23 OS:Ubuntu (18.04)
Assigned to: CPU Architecture:x86 (Intel)

[28 Apr 2021 9:31] Zuming Jiang
Description:
I used my fuzzing tool to test mysql server, and found a test case that can mysql server output strange content.

Mysql server installation:
1)git clone https://github.com/mysql/mysql-server.git
2) cd mysql-server
3) mkdir build; cd build
4) cmake ../ -DWITH_ASAN=ON
5) make -j8 && sudo make install

How to repeat:
Test command:
export ASAN_OPTIONS=detect_leaks=0
/usr/local/mysql/bin/mysqld_safe &
/usr/local/mysql/bin/mysql -uroot -p123456(your password)
mysql> drop database if exists test_db;
mysql> create database test_db;
mysql> source fuzz.sql;

output:
ERROR 1146 (42S02) at line 15 in file: 'fuzz.sql': Table './tmp/#sql1d97_a_1' doesn't exist

Note: fuzz.sql doesn't have any table named './tmp/#sql1d97_a_1'.

Suggested fix:
I have simplified the content of fuzz.sql, and I hope fuzz.sql can help you reproduce the bug and fix it.
[28 Apr 2021 9:32] Zuming Jiang
fuzz.sql for reproducing the bug

Attachment: fuzz.sql (application/octet-stream, text), 1.19 KiB.

[28 Apr 2021 9:39] MySQL Verification Team
Hello Zuming Jiang,

Thank you for the report and test case.

regards,
Umesh