Bug #83708 | uint expression is used for the value that is passed as my_off_t for DDL log | ||
---|---|---|---|
Submitted: | 6 Nov 2016 17:38 | Modified: | 18 Mar 2020 17:20 |
Reporter: | Valeriy Kravchuk | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
Version: | 5.7 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | DDL, ddl_log.log |
[6 Nov 2016 17:38]
Valeriy Kravchuk
[6 Nov 2016 19:11]
MySQL Verification Team
Visual studio assembly: ; 721 : if (mysql_file_pread(file_id, file_entry_buf, io_size, io_size * entry_no, ; 722 : MYF(MY_WME)) != io_size) mov eax, DWORD PTR io_size$[rsp] imul eax, DWORD PTR entry_no$[rsp] mov eax, eax mov ecx, DWORD PTR io_size$[rsp] mov DWORD PTR [rsp+48], 16 mov QWORD PTR [rsp+40], rax mov QWORD PTR [rsp+32], rcx mov r9, QWORD PTR file_entry_buf$[rsp] mov r8d, DWORD PTR file_id$[rsp] mov edx, 722 ; 000002d2H lea rcx, OFFSET FLAT:$SG172779 call ?inline_mysql_file_pread@@YA_KPEBDIHPEAE_K2H@Z ; inline_mysql_file_pread Now I casted it; Does the following look better? ; 721 : if (mysql_file_pread(file_id, file_entry_buf, (size_t)io_size, (my_off_t)((my_off_t)io_size * (my_off_t)entry_no), ; 722 : MYF(MY_WME)) != io_size) mov eax, DWORD PTR io_size$[rsp] mov ecx, DWORD PTR entry_no$[rsp] imul rax, rcx mov ecx, DWORD PTR io_size$[rsp] mov DWORD PTR [rsp+48], 16 mov QWORD PTR [rsp+40], rax mov QWORD PTR [rsp+32], rcx mov r9, QWORD PTR file_entry_buf$[rsp] mov r8d, DWORD PTR file_id$[rsp] mov edx, 722 ; 000002d2H lea rcx, OFFSET FLAT:$SG172783 call ?inline_mysql_file_pread@@YA_KPEBDIHPEAE_K2H@Z ; inline_mysql_file_pread
[7 Nov 2016 15:34]
MySQL Verification Team
Hi Valerii, Based on your and Shane's exposition, I have concluded that this is truly a bug. Fully verified.
[21 Apr 2017 10:56]
Dmitry Lenev
Posted by developer: The below patch which has been pushed into mysql-trunk (should appear in 8.0.2) removes code in question. So I am closing this bug as "Fixed". -------------------------------------------------------------------------------- commit 6aa762d6e1a801c5c1dcc54d7e12bafc2acdeabd Author: Dmitry Lenev <dmitry.lenev@oracle.com> Date: Fri Apr 21 09:52:09 2017 +0300 Removed old partitioning DDL implementation which is no longer in use. After WL#8971 "Deprecate and remove partition engine" and WL#9559 "InnoDB_New_DD: Support in-place ALTER PARTITION" code implementing "fast" partitioning DDL (fast_alter_partition_table() and related functions) became unused. This patch removes this dead code (including DDL_LOG implementation used by it) as a follow-up to the above WLs.
[28 Apr 2017 2:00]
Jon Stephens
Fixed in MySQL 8.0.2. This is cleanup of dead code only and makes no user-visible changes, so no changelog entry is required. Closed.
[18 Mar 2020 14:58]
Jon Stephens
This actually was part of of DDL log removal, which completely escaped my notice at the time, and which is certainly a user-visible change. Will be fixing the documentation about this shortly.
[18 Mar 2020 17:20]
Jon Stephens
Removal of ddl log file now noted in the MySQL 8.0 Manual. Setting back to Closed.