250601 0:18:05 [ERROR] D:\NetClient6\MariaDB 10.6\bin\mysqld.exe got exception 0xc0000005 ; Sorry, we probably made a mistake, and this is a bug. Your assistance in bug reporting will enable us to fix this for the next release. To report this bug, see https://mariadb.com/kb/en/reporting-bugs about how to report a bug on https://jira.mariadb.org/. Please include the information from the server start above, to the end of the information below. Server version: 10.6.21-MariaDB source revision: 066e8d6aeabc13242193780341e0f845528105de The information page at https://mariadb.com/kb/en/how-to-produce-a-full-stack-trace-for-mariadbd/ contains instructions to obtain a better version of the backtrace below. Following these instructions will help MariaDB developers provide a fix quicker. Attempting backtrace. Include this in the bug report. (note: Retrieving this information may fail) Thread pointer: 0x17c6c7db268 server.dll!st_select_lex::save_leaf_tables()[sql_lex.cc:5790] server.dll!JOIN::optimize_inner()[sql_select.cc:2242] server.dll!JOIN::optimize()[sql_select.cc:1929] server.dll!st_select_lex_unit::optimize()[sql_union.cc:2137] server.dll!mysql_derived_optimize()[sql_derived.cc:1014] server.dll!mysql_handle_single_derived()[sql_derived.cc:200] server.dll!JOIN::optimize_inner()[sql_select.cc:2429] server.dll!JOIN::optimize()[sql_select.cc:1929] server.dll!mysql_derived_optimize()[sql_derived.cc:1045] server.dll!mysql_handle_single_derived()[sql_derived.cc:200] server.dll!JOIN::optimize_inner()[sql_select.cc:2429] server.dll!JOIN::optimize()[sql_select.cc:1929] server.dll!mysql_derived_optimize()[sql_derived.cc:1045] server.dll!mysql_handle_single_derived()[sql_derived.cc:200] server.dll!JOIN::optimize_inner()[sql_select.cc:2429] server.dll!mysql_select()[sql_select.cc:5182] server.dll!handle_select()[sql_select.cc:573] server.dll!execute_sqlcom_select()[sql_parse.cc:6422] server.dll!mysql_execute_command()[sql_parse.cc:4013] server.dll!sp_instr_stmt::exec_core()[sp_head.cc:3860] server.dll!sp_lex_keeper::reset_lex_and_exec_core()[sp_head.cc:3569] server.dll!sp_instr_stmt::execute()[sp_head.cc:3761] server.dll!sp_head::execute()[sp_head.cc:1443] server.dll!sp_head::execute_procedure()[sp_head.cc:2486] server.dll!do_execute_sp()[sql_parse.cc:3093] server.dll!Sql_cmd_call::execute()[sql_parse.cc:3336] server.dll!mysql_execute_command()[sql_parse.cc:6179] server.dll!Prepared_statement::execute()[sql_prepare.cc:5272] server.dll!Prepared_statement::execute_loop()[sql_prepare.cc:4678] server.dll!mysql_stmt_execute_common()[sql_prepare.cc:3593] server.dll!mysqld_stmt_execute()[sql_prepare.cc:3367] server.dll!dispatch_command()[sql_parse.cc:1840] server.dll!do_command()[sql_parse.cc:1421] server.dll!tp_callback()[threadpool_common.cc:252] KERNEL32.DLL!QueryPerformanceCounter() ntdll.dll!TpReleaseWork() ntdll.dll!RtlInitializeResource() KERNEL32.DLL!BaseThreadInitThunk() ntdll.dll!RtlUserThreadStart() Connection ID (thread ID): 59710 Status: NOT_KILLED Query (0x17c34a32580): SELECT DISTINCT eq.EquipCode , INET6_NTOA(es.ip) AS IP ,PriorityOrder FROM tcm_equip eq INNER JOIN tcm_equip_opfunc op ON eq.Id = op.EquipId AND op.OP020 = 1 INNER JOIN tcm_equip_status es ON eq.Id = es.EquipId AND es.Status = 'ON' INNER JOIN tpo_equip_config ec ON eq.Id = ec.EquipId INNER JOIN ( SELECT dt.EquipId , dt.PolicyId , @RN2 := IF(@EquipId = dt.EquipId, @RN2 + 1, 1) AS RowNum2 , @EquipId := dt.EquipId AS dummy , dt.FullPath , dt.PriorityOrder FROM ( SELECT dt.PriorityOrder , dt.EquipId , dt.PolicyId , dt.FullPath FROM ( SELECT 1 AS PriorityOrder, wTemplate.EquipId, wTemplate.PolicyId, wTemplate.FullPath FROM ( SELECT @RN := IF(@WorkDate = tTemplate.EquipId, @RN + 1, 1) AS ROWNUM, @workDate := tTemplate.EquipId AS dummy, tTemplate.* FROM ( SELECT eq.Id AS EquipId , emap.PolicyId , NULL AS FullPath , emap.priority FROM tcm_equip eq INNER JOIN tpo_policy_equip_map emap ON eq.Id = emap.EquipId AND eq.UserId IS NULL JOIN tcm_equip_status es ON emap.EquipId = es.EquipId JOIN tcm_timezone_info tz ON es.TimeZoneId = tz.TimeZoneId WHERE eq.ServerId = NAME_CONST('iServerId',5) AND DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') ORDER BY emap.EquipId ASC, emap.Priority DESC LIMIT 18446744073709551615 ) AS tTemplate CROSS JOIN (SELECT @RN := 0, @workDate := NULL) AS R ) wTemplate WHERE wTemplate.ROWNUM = 1 UNION ALL SELECT 2 AS PriorityOrder , eq.Id AS EquipId , umap.PolicyId , NULL AS FullPath FROM tcm_equip eq INNER JOIN tpo_policy_user_map umap ON eq.UserId = umap.UserId INNER JOIN tpo_policy p ON umap.PolicyId = p.Id AND p.Type = 'E' JOIN tcm_user u ON umap.UserId = u.Id JOIN tcm_timezone_info tz ON u.TimeZoneId = tz.TimeZoneId WHERE eq.ServerId = NAME_CONST('iServerId',5) AND DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') UNION ALL SELECT 3 AS PriorityOrder , eq.Id AS EquipId , m.PolicyId , NULL AS FullPath FROM tcm_equip eq INNER JOIN tpo_user_group_map ugm ON eq.UserId = ugm.UserId INNER JOIN tpo_policy_group_map m ON ugm.GroupId = m.GroupId INNER JOIN tpo_policy p ON m.PolicyId = p.Id AND p.Type = 'E' JOIN tcm_user u ON ugm.UserId = u.Id JOIN tcm_timezone_info tz ON u.TimeZoneId = tz.TimeZoneId WHERE eq.ServerId = NAME_CONST('iServerId',5) AND DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') UNION ALL SELECT 4 AS PriorityOrder , etemp.EquipId AS EquipId , dmap.PolicyId , de.FullPath FROM tcm_dept de INNER JOIN tpo_policy_dept_map dmap ON de.Id = dmap.DeptId INNER JOIN tpo_policy p ON dmap.PolicyId = p.Id AND p.Type = 'E' INNER JOIN ( SELECT eq.Id AS EquipId , eq.DeptId , de.FullPath , u.TimeZoneId FROM tcm_equip eq INNER JOIN tcm_user u ON eq.UserId = u.Id INNER JOIN tcm_dept de ON u.DeptId = de.Id AND eq.ServerId = NAME_CONST('iServerId',5) ) etemp ON etemp.FullPath LIKE CONCAT(de.FullPath, '%') JOIN tcm_timezone_info tz ON etemp.TimeZoneId = tz.TimeZoneId WHERE DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') UNION ALL SELECT 5 AS PriorityOrder , eq.Id AS EquipId , umap.PolicyId , NULL AS FullPath FROM tcm_equip eq INNER JOIN tpo_policy_special_user_map umap ON eq.UserId = umap.UserId INNER JOIN tpo_policy p ON umap.PolicyId = p.Id AND p.Type = 'P' JOIN tcm_user u ON umap.UserId = u.Id JOIN tcm_timezone_info tz ON u.TimeZoneId = tz.TimeZoneId INNER JOIN tpo_special_user su ON umap.UserId = su.UserId AND EndDateTime >= DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) WHERE eq.ServerId = NAME_CONST('iServerId',5) UNION ALL SELECT 6 AS PriorityOrder, wTemplate.EquipId, wTemplate.PolicyId, wTemplate.FullPath FROM ( SELECT @RN := IF(@WorkDate = tTemplate.EquipId, @RN + 1, 1) AS ROWNUM, @workDate := tTemplate.EquipId AS dummy, tTemplate.* FROM ( SELECT eq.Id AS EquipId , umap.PolicyId , NULL AS FullPath , umap.priority FROM tcm_equip eq INNER JOIN tpo_policy_user_map umap ON eq.UserId = umap.UserId INNER JOIN tpo_policy p ON umap.PolicyId = p.Id AND p.Type = 'G' JOIN tcm_user u ON eq.UserId = u.Id JOIN tcm_timezone_info tz ON u.TimeZoneId = tz.TimeZoneId WHERE eq.ServerId = NAME_CONST('iServerId',5) AND DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') ORDER BY eq.Id ASC, umap.priority DESC LIMIT 18446744073709551615 ) AS tTemplate CROSS JOIN (SELECT @RN := 0, @workDate := NULL) AS R ) wTemplate WHERE wTemplate.ROWNUM = 1 UNION ALL SELECT 7 AS PriorityOrder, wTemplate.EquipId, wTemplate.PolicyId, wTemplate.FullPath FROM ( SELECT @RN := IF(@WorkDate = tTemplate.EquipId, @RN + 1, 1) AS ROWNUM, @workDate := tTemplate.EquipId AS dummy, tTemplate.* FROM ( SELECT eq.Id AS EquipId , m.PolicyId , NULL AS FullPath , m.priority FROM tcm_equip eq INNER JOIN tpo_user_group_map ugm ON eq.UserId = ugm.UserId INNER JOIN tpo_policy_group_map m ON ugm.GroupId = m.GroupId INNER JOIN tpo_policy p ON m.PolicyId = p.Id AND p.Type = 'G' JOIN tcm_user u ON eq.UserId = u.Id JOIN tcm_timezone_info tz ON u.TimeZoneId = tz.TimeZoneId WHERE eq.ServerId = NAME_CONST('iServerId',5) AND DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') ORDER BY eq.Id ASC, m.priority DESC LIMIT 18446744073709551615 ) AS tTemplate CROSS JOIN (SELECT @RN := 0, @workDate := NULL) AS R ) wTemplate WHERE wTemplate.ROWNUM = 1 UNION ALL SELECT 8 AS PriorityOrder, wTemplate.EquipId, wTemplate.PolicyId, wTemplate.FullPath FROM ( SELECT @RN := IF(@WorkDate = tTemplate.EquipId, @RN + 1, 1) AS ROWNUM, @workDate := tTemplate.EquipId AS dummy, tTemplate.* FROM ( SELECT etemp.EquipId AS EquipId , dmap.PolicyId , de.FullPath , dmap.Priority FROM tcm_dept de INNER JOIN tpo_policy_dept_map dmap ON de.Id = dmap.DeptId INNER JOIN tpo_policy p ON dmap.PolicyId = p.Id AND p.Type = 'G' INNER JOIN ( SELECT eq.Id AS EquipId , eq.DeptId , de.FullPath , u.TimeZoneId FROM tcm_equip eq INNER JOIN tcm_user u ON eq.UserId = u.Id INNER JOIN tcm_dept de ON u.DeptId = de.Id AND eq.ServerId = NAME_CONST('iServerId',5) ) etemp ON etemp.FullPath LIKE CONCAT(de.FullPath, '%') JOIN tcm_timezone_info tz ON etemp.TimeZoneId = tz.TimeZoneId WHERE DATE(DATE_ADD(NOW(),INTERVAL tz.UtcOffSetShort HOUR_MINUTE)) BETWEEN IFNULL(StartDate,'1970-01-01') AND IFNULL(EndDate,'9999-01-01') ORDER BY etemp.EquipId ASC, de.FullPath DESC, dmap.Priority DESC LIMIT 18446744073709551615 ) AS tTemplate CROSS JOIN (SELECT @RN := 0, @workDate := NULL) AS R ) wTemplate WHERE wTemplate.ROWNUM = 1 ) dt ORDER BY dt.EquipId, dt.PriorityOrder, dt.FullPath DESC LIMIT 18446744073709551615 ) dt ) dt ON eq.Id = dt.EquipId INNER JOIN tpo_policy sp ON dt.PolicyId = sp.Id WHERE IFNULL(sp.Revision, '') != IFNULL(ec.EquipRevisionUsed, '') AND dt.RowNum2 = 1 Optimizer switch: index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,index_merge_sort_intersection=off,engine_condition_pushdown=off,index_condition_pushdown=on,derived_merge=on,derived_with_keys=on,firstmatch=on,loosescan=on,materialization=on,in_to_exists=on,semijoin=on,partial_match_rowid_merge=on,partial_match_table_scan=on,subquery_cache=on,mrr=off,mrr_cost_based=off,mrr_sort_keys=off,outer_join_with_cache=on,semijoin_with_cache=on,join_cache_incremental=on,join_cache_hashed=on,join_cache_bka=on,optimize_join_buffer_size=on,table_elimination=on,extended_keys=on,exists_to_in=on,orderby_uses_equalities=on,condition_pushdown_for_derived=on,split_materialized=on,condition_pushdown_for_subquery=on,rowid_filter=on,condition_pushdown_from_having=on,not_null_range_scan=off,hash_join_cardinality=off,cset_narrowing=off Writing a core file at D:\NetClient6\MariaDB 10.6\data Minidump written to D:\NetClient6\MariaDB 10.6\data\mysqld.dmp