Bug #111621 Crash occured when run sql query on 8022 debug environment
Submitted: 29 Jun 2023 12:03 Modified: 3 Jul 2023 1:20
Reporter: yujie wang Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0.22 OS:Any
Assigned to: CPU Architecture:Any

[29 Jun 2023 12:03] yujie wang
Description:
Crash occured when run sql query on 8022 debug environment,and the result of release environment is also not correct

How to repeat:
source tbl_3_all_type2index_desc.sql 
source tbl_3_all_typeindex_desc.sql 
SELECT count(*) FROM tbl_3_all_type2index_desc where (varbinary_col,varchar_col) > (select varbinary_col,varchar_col from tbl_3_all_typeindex_desc order by 1,2 limit 1);

Suggested fix:
Crash doesn't occur when run sql query on 8022 debug environment,and the result of release environment is also correct
[29 Jun 2023 12:22] yujie wang
ignore 'how to repeat',the following is the repeat steps:
source tbl_1_all_type2index_desc.sql
source tbl_3_all_typeindex_desc.sql
SELECT COUNT(*) FROM tbl_1_all_type2index_desc where (varchar_col,binary_col) < (select varchar_col,binary_col from tbl_3_all_typeindex_desc order by 1,2 limit 1);
[29 Jun 2023 13:15] MySQL Verification Team
HI Mr. wang,

Thank you for taking the time to report a problem.  Unfortunately you are not using a current version of the product you reported a problem with -- the problem might already be fixed. Please download a new version from http://www.mysql.com/downloads/. In short, try to repeat the crash with 8.0.33.

If you are able to reproduce the bug with version 8.0.33, please send the entire repeatable test case, including the files that you mention.  Please, also do not include the mentions of resources that are not ours, like "8022 debug environment". That means nothing to us. if you repeat the problem with 8.0.33,  please  include the SQL files in the bug report, by using "Files" tab.  Also include all other relevant info. If you get a crash in 8.0.33, then send us a stack trace too .......

Again, thank you for your continued support of MySQL.

Unsupported.
[30 Jun 2023 1:02] yujie wang
table files for sql query

Attachment: tbl_1_all_type2index_desc.sql (application/octet-stream, text), 44.63 KiB.

[30 Jun 2023 2:00] yujie wang
table files for sql query

Attachment: tbl_3_all_typeindex_desc.sql (application/octet-stream, text), 68.60 KiB.

[30 Jun 2023 2:20] yujie wang
the table files have added,and the result of 8.0.33 is same with 8.0.22,which is incorrect

8.0.33:
mysql> SELECT COUNT(*) FROM tbl_1_all_type2index_desc where (varchar_col,binary_col) < (select varchar_col,binary_col from tbl_3_all_typeindex_desc order by 1,2 limit 1);
+----------+
| COUNT(*) |
+----------+
|       24 |
+----------+
1 row in set (0.00 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.33    |
+-----------+
1 row in set (0.00 sec)

8.0.22
mysql> SELECT COUNT(*) FROM tbl_1_all_type2index_desc where (varchar_col,binary_col) < (select varchar_col,binary_col from tbl_3_all_typeindex_desc order by 1,2 limit 1);
+----------+
| COUNT(*) |
+----------+
|       24 |
+----------+
1 row in set (0.01 sec)

mysql> select version();
+-----------+
| version() |
+-----------+
| 8.0.22    |
+-----------+
1 row in set (0.00 sec)
[30 Jun 2023 12:59] MySQL Verification Team
Hi ,

We have a couple of additional questions for you.

First of all, does your test case crashes production binary or debug binary or both ???

This is very important since crashes in debug binary get far smaller priority.

If you get a crash in 8.0.33, please send us a full stacktrace from the error log.

Thanks in advance.
[30 Jun 2023 15:07] MySQL Verification Team
Hi Mr. wang,

We have ran your test case on both release and debug versions of 8.0.33.

We have got the same answer with both:

 SELECT COUNT(*) FROM tbl_1_all_type2index_desc where (varchar_col,binary_col) < (select varchar_col,binary_col from tbl_3_all_typeindex_desc order by 1,2 limit 1);
+----------+
| COUNT(*) |
+----------+
|       24 |
+----------+
1 row in set (0.09 sec)

and no crash what so ever !!!!!!

Can't repeat.
[3 Jul 2023 1:20] yujie wang
got it,thanks for your time,and i agree with you