This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> | |
<xsl:template match="/"> | |
<!-- This stylesheet will be loaded by the browser, when the Lua script, below --> | |
<!-- inserts a reference to it in the XML error response from S3. --> | |
<!-- Place this file in the bucket as /error.xsl --> | |
<!-- set the Content-Type to text/xsl and make the file public --> | |
<!-- also you should probably remove this comment block :) --> | |
<html> | |
<title>We’ve encountered a problem</title> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- With the addition of Lua to HAProxy 1.6, we can generate a custom error message | |
-- to any client requesting a connection, identifying the proxy that returned the error | |
-- by its ec2 instance ID (or any other meaningful identifier in your environment), | |
-- providing a cleaner method of reporting failure to the caller than just opening and closing the connection, | |
-- which would be the default behavior with no backend servers healthy, and could lead to | |
-- troubleshooting the wrong thing. | |
-- the response packet we craft is a valid packet in the MySQL client/server protocol, | |
-- so any client should understand and be able to report the error back up the stack; viz.: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS `nest_generic_rebuild` $$ | |
CREATE PROCEDURE `nest_generic_rebuild` () | |
MODIFIES SQL DATA | |
BEGIN | |
DECLARE counter INT DEFAULT 0; | |
DECLARE nest_depth INT DEFAULT 1; | |
DECLARE my_left_id INT; | |
DECLARE my_nest_depth INT; |