MySQL中的错误调用过程:错误代码:2013。查询期间与MySQL服务器的连接断开

时间:2018-11-08 16:21:19

标签: mysql mysql-workbench mysql-error-2013

我需要MySQL方面的帮助,当我调用特定过程时,Workbench失去连接,MySQL80 Windows服务被捕!

我已经尝试在Edit-> Preferences-> SQL Editor-> DBMS连接读取超时(以秒为单位)上设置更高的参数(600)。

我不知道它是否可以解决问题,但这是我的程序:

!=

如果我分别调用所有查询(显然具有相同的参数),我没有任何问题!

服务器日志:

DELIMITER //

DROP PROCEDURE IF EXISTS drop_unfinished //

CREATE PROCEDURE drop_unfinished(
        OUT p_return    INT,
        IN  p_forum_id  INT
    ) 
    COMMENT 'Drops all unscraped batches for the given forum'
    READS SQL DATA
BEGIN
    DECLARE v_limit INT; 
    DECLARE v_offset INT; 
    DECLARE v_scraped_batches INT;
    DECLARE v_scraped_topics INT;
    DECLARE v_edit_time DATETIME;
    DECLARE v_start_time DATETIME;
    DECLARE EXIT HANDLER FOR SQLEXCEPTION SET p_return = -1; 

    SELECT scraped_topics, scraped_batches, edit_time
    INTO v_scraped_topics, v_scraped_batches, v_edit_time
    FROM dashboard_view
    WHERE forum_id = p_forum_id;

    SET v_limit = 25;
    SET v_offset = IF(v_scraped_batches = 1, 0, v_limit * v_scraped_batches);

    CREATE TEMPORARY TABLE 
    IF NOT EXISTS topic_ids
    SELECT topic_id 
    FROM topics 
    WHERE edit_time > v_edit_time 
    LIMIT v_scraped_topics 
    OFFSET v_offset;

    DELETE FROM logs 
    WHERE step_time > v_edit_time
    AND parent_id = p_forum_id
    AND object_id IN (SELECT topic_id FROM topic_ids);

    DELETE FROM torrents_tmp 
    WHERE forum_id = p_forum_id
    AND topic_id IN (SELECT topic_id FROM topic_ids);

    DELETE FROM ed2k_links_tmp 
    WHERE forum_id = p_forum_id
    AND topic_id IN (SELECT topic_id FROM topic_ids);

    DELETE FROM posts_tmp 
    WHERE forum_id = p_forum_id
    AND topic_id IN (SELECT topic_id FROM topic_ids);

    COMMIT;

    DROP TEMPORARY TABLE topic_ids;

    SET p_return = 0;
END
//

DELIMITER ;

2 个答案:

答案 0 :(得分:0)

您的my.ini [mysqld]部分要考虑的建议

python opencv/platforms/osx/build_framework.py osx

这些更改对于实现实例的稳定性是必需的。

查看您的程序,将尝试在星期五下午对您的程序发表评论。 某些请求的数据仅在Linux系统上可用。 要确定计算机上的RAM,请右键单击任务栏左侧的“窗口”图标,然后单击“系统”,您应该会看到服务器上有多少RAM。

有关其他建议,请查看个人资料,网络个人资料以获取联系信息,并通过Skype与我们取得联系。

答案 1 :(得分:0)

我通过更新DBMS解决了!这是我的MySQL版本的错误!