{"action":"created","issue":{"url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/180","labels_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/180/labels{/name}","comments_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/180/comments","events_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/180/events","html_url":"https://github.com/balderdashy/sails-mysql/issues/180","id":54242941,"number":180,"title":"Stack overflow in lib/connections/spawn.js#L85","user":{"login":"ws6","id":3187494,"avatar_url":"https://avatars.githubusercontent.com/u/3187494?v=3","gravatar_id":"","url":"https://api.github.com/users/ws6","html_url":"https://github.com/ws6","followers_url":"https://api.github.com/users/ws6/followers","following_url":"https://api.github.com/users/ws6/following{/other_user}","gists_url":"https://api.github.com/users/ws6/gists{/gist_id}","starred_url":"https://api.github.com/users/ws6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ws6/subscriptions","organizations_url":"https://api.github.com/users/ws6/orgs","repos_url":"https://api.github.com/users/ws6/repos","events_url":"https://api.github.com/users/ws6/events{/privacy}","received_events_url":"https://api.github.com/users/ws6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-13T20:21:58Z","updated_at":"2015-01-16T20:50:08Z","closed_at":null,"body":"Please remove the below section which causes a serious stack overflow(it has recursive behavor just by reading the code).\r\nAnd also after  I tested it, depletion would not affect any connection issues. \r\nhttps://github.com/balderdashy/sails-mysql/blob/master/lib/connections/spawn.js#L85\r\n \r\n\r\n\r\n var oldQuery = liveConnection.query;\r\nliveConnection.query = function (statement) {\r\n      // Turn the arguments into a usable array\r\n      var args = [].slice.call(arguments);\r\n      // Remove the callback that's there currently, then wrap it with\r\n      // our own which populates the original query.\r\n      var cb = args.pop();\r\n      args.push(function (err) {\r\n        if (err) err.query = statement;\r\n        cb.apply(this, arguments);\r\n      });\r\n      oldQuery.apply(liveConnection, args);\r\n    };"},"comment":{"url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/comments/70319950","html_url":"https://github.com/balderdashy/sails-mysql/issues/180#issuecomment-70319950","issue_url":"https://api.github.com/repos/balderdashy/sails-mysql/issues/180","id":70319950,"user":{"login":"devinivy","id":3150233,"avatar_url":"https://avatars.githubusercontent.com/u/3150233?v=3","gravatar_id":"","url":"https://api.github.com/users/devinivy","html_url":"https://github.com/devinivy","followers_url":"https://api.github.com/users/devinivy/followers","following_url":"https://api.github.com/users/devinivy/following{/other_user}","gists_url":"https://api.github.com/users/devinivy/gists{/gist_id}","starred_url":"https://api.github.com/users/devinivy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devinivy/subscriptions","organizations_url":"https://api.github.com/users/devinivy/orgs","repos_url":"https://api.github.com/users/devinivy/repos","events_url":"https://api.github.com/users/devinivy/events{/privacy}","received_events_url":"https://api.github.com/users/devinivy/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T20:50:08Z","updated_at":"2015-01-16T20:50:08Z","body":"Brilliant!  Was just about to make an issue for this."}}