The IDE crashes 100% of the time when I try to paste the below code in any stored procedure where any of the variables are already DECLARE'd. For example, if I have var_result_details JSON; already declared "above" where I'm pasting this, it ALWAYS crashes (in any stored procedure).
So it appears the IDE crashes when duplicate variable declarations are pasted.
Code: Select all
DECLARE var_result_details json DEFAULT JSON_OBJECT('update_results',JSON_ARRAY());
DECLARE debug_location text charset utf8mb4 DEFAULT 'initialization' ;
DECLARE debug_definition JSON DEFAULT JSON_OBJECT('stored_procedure', 'update_person_data');
DECLARE debug_details JSON DEFAULT JSON_OBJECT('source', debug_definition, 'parameters',
JSON_OBJECT('in_account_main_id',in_account_main_id,'in_JSON',in_JSON));
-- == [ERROR HANDLING] ========================================
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
GET DIAGNOSTICS @sp_error_count = NUMBER;
GET DIAGNOSTICS CONDITION @sp_error_count @sp_error_state = RETURNED_SQLSTATE,
@sp_error_number = MYSQL_ERRNO, @sp_error_message = MESSAGE_TEXT;
ROLLBACK; SET out_result = FALSE;
CALL internal_error_handler(JSON_OBJECT('source','SQL','type','exit','location',debug_location),
NULL, debug_details, out_result_details);
END;
-- == [PREPARE] ========================================
IF (setting_debug_system(DEBUG_SP)) THEN CALL internal_debug_stack_log(debug_definition, debug_details); END IF;-- == [MAIN CODE] ========================================