[MDEV-20542] Windows, compiling : enable /d2OptimizeHugeFunctions for MySQLParse() Created: 2019-09-09  Updated: 2020-03-25  Resolved: 2020-03-25

Status: Closed
Project: MariaDB Server
Component/s: Compiling, Platform Windows
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.2.29

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

MSVC massively scales down on optimization depending of the function size.
bison generated MySQLParse() is considered "huge" by the compiler . I verified this by adding /we4883 flag to compiler options. That makes making (usually inactive) warning "function size prevents optimization" an error.

There is a switch that allows optimizations also for such functions, /d2OptimizeHugeFunctions.
(docs https://support.microsoft.com/en-nz/help/3207317/visual-c-optimizer-fixes-for-visual-studio-2015-update-3)

MySQL 8.0 is using it, according to
https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-13.html


Generated at Thu Feb 08 09:00:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.