MySQL crash while generating entity data model in Visual Studio 2019

0

When I try to generate the entity models from the existing database the mysqld service crashes. This does not occur with MySQL 8.0.20, only with 8.0.21. I was hoping to use the new json features added to the update but this problem is driving me nuts.

MySQL Installed

The entity wizard connects ok with the server and show the tables I want to import, when the importing process begin throws an exception "connection lost" and I see the mysqld.exe stopped.

The MySQL log show nothing useful except for part of the query generated by the wizard:

15:45:58 UTC - mysqld got exception 0xc0000005 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x1c9945fcfc0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
7ff7c812f74b    mysqld.exe!?get_full_info@Item_aggregate_type@@IEAAXPEAVItem@@@Z()
7ff7c81228d6    mysqld.exe!??0Item_aggregate_type@@QEAA@PEAVTHD@@PEAVItem@@@Z()
7ff7c83ab288    mysqld.exe!?prepare@SELECT_LEX_UNIT@@QEAA_NPEAVTHD@@PEAVQuery_result@@_K2@Z()
7ff7c841dd0e    mysqld.exe!?resolve_derived@TABLE_LIST@@QEAA_NPEAVTHD@@_N@Z()
7ff7c83d40d6    mysqld.exe!?resolve_placeholder_tables@SELECT_LEX@@QEAA_NPEAVTHD@@_N@Z()
7ff7c83d25aa    mysqld.exe!?prepare@SELECT_LEX@@QEAA_NPEAVTHD@@@Z()
7ff7c83ab191    mysqld.exe!?prepare@SELECT_LEX_UNIT@@QEAA_NPEAVTHD@@PEAVQuery_result@@_K2@Z()
7ff7c841dd0e    mysqld.exe!?resolve_derived@TABLE_LIST@@QEAA_NPEAVTHD@@_N@Z()
7ff7c83d40d6    mysqld.exe!?resolve_placeholder_tables@SELECT_LEX@@QEAA_NPEAVTHD@@_N@Z()
7ff7c83d25aa    mysqld.exe!?prepare@SELECT_LEX@@QEAA_NPEAVTHD@@@Z()
7ff7c83ab191    mysqld.exe!?prepare@SELECT_LEX_UNIT@@QEAA_NPEAVTHD@@PEAVQuery_result@@_K2@Z()
7ff7c841dd0e    mysqld.exe!?resolve_derived@TABLE_LIST@@QEAA_NPEAVTHD@@_N@Z()
7ff7c83d40d6    mysqld.exe!?resolve_placeholder_tables@SELECT_LEX@@QEAA_NPEAVTHD@@_N@Z()
7ff7c83d25aa    mysqld.exe!?prepare@SELECT_LEX@@QEAA_NPEAVTHD@@@Z()
7ff7c832980c    mysqld.exe!?prepare_inner@Sql_cmd_select@@MEAA_NPEAVTHD@@@Z()
7ff7c832942c    mysqld.exe!?prepare@Sql_cmd_dml@@UEAA_NPEAVTHD@@@Z()
7ff7c8325ef5    mysqld.exe!?execute@Sql_cmd_dml@@UEAA_NPEAVTHD@@@Z()
7ff7c822d36d    mysqld.exe!?mysql_execute_command@@YAHPEAVTHD@@_N@Z()
7ff7c822dfc9    mysqld.exe!?mysql_parse@@YAXPEAVTHD@@PEAVParser_state@@@Z()
7ff7c8226eb2    mysqld.exe!?dispatch_command@@YA_NPEAVTHD@@PEBTCOM_DATA@@W4enum_server_command@@@Z()
7ff7c8227e6e    mysqld.exe!?do_command@@YA_NPEAVTHD@@@Z()
7ff7c80726c8    mysqld.exe!?modify_thread_cache_size@Per_thread_connection_handler@@SAXK@Z()
7ff7c93322a1    mysqld.exe!?set_compression_level@Zstd_comp@compression@transaction@binary_log@@UEAAXI@Z()
7ff7c8f3739c    mysqld.exe!?my_thread_join@@YAHPEAUmy_thread_handle@@PEAPEAX@Z()
7fff75851542    ucrtbase.dll!_configthreadlocale()
7fff77ab6fd4    KERNEL32.DLL!BaseThreadInitThunk()
7fff77bfcec1    ntdll.dll!RtlUserThreadStart()

Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (1c999a99d08): SELECT
`Project7`.`C12` AS `C1`, 
`Project7`.`C1` AS `C2`, 
`Project7`.`C2` AS `C3`, 
`Project7`.`C3` AS `C4`, 
`Project7`.`C4` AS `C5`, 
`Project7`.`C5` AS `C6`, 
`Project7`.`C6` AS `C7`, 
`Project7`.`C7` AS `C8`, 
`Project7`.`C8` AS `C9`, 
`Project7`.`C9` AS `C10`, 
`Project7`.`C10` AS `C11`
FROM (SELECT
`UnionAll3`.`SchemaName` AS `C1`, 
`UnionAll3`.`Name` AS `C2`, 
`UnionAll3`.`ReturnTypeName` AS `C3`, 
`UnionAll3`.`IsAggregate` AS `C4`, 
`UnionAll3`.`C1` AS `C5`, 
`UnionAll3`.`IsBuiltIn` AS `C6`, 
`UnionAll3`.`IsNiladic` AS `C7`, 
`UnionAll3`.`C2` AS `C8`, 
`UnionAll3`.`C3` AS `C9`, 
`UnionAll3`.`C4` AS `C10`, 
`UnionAll3`.`C5` AS `C11`, 
1 AS `C12`
FROM ((SELECT
`Extent1`.`SchemaName`, 
`Extent1`.`Name`, 
`Extent1`.`ReturnTypeName`, 
`Extent1`.`IsAggregate`, 
1 AS `C1`, 
`Extent1`.`IsBuiltIn`, 
`Extent1`.`IsNiladic`, 
`UnionAll1`.`Name` AS `C2`, 
`UnionAll1`.`TypeName` AS `C3`, 
`UnionAll1`.`Mode` AS `C4`, 
`UnionAll1`.`Ordinal` AS `C5`
FROM (
        SELECT /* Funct
Connection ID (thread ID): 18
Status: NOT_KILLED

The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.

Is this a bug or some kind of configuration error on my part?

mysql
visual-studio
asked on Stack Overflow Aug 11, 2020 by Heitor Peron • edited Aug 12, 2020 by Jack J Jun - MSFT

1 Answer

0

This proved to be a bug in the new query optimizations, but I was able to find a workaround by disabling some of the optimizations on the server.

Here is the command I used:

Set global optimizer_switch='derived_merge=off,subquery_to_derived=off,prefer_ordering_index=off,semijoin=off';

Hope it helps until they fix the bug.

answered on Stack Overflow Sep 2, 2020 by Heitor Peron

User contributions licensed under CC BY-SA 3.0