Skip to content

Instantly share code, notes, and snippets.

@sts
sts / beg_redirect.map
Created November 3, 2023 19:49 — forked from sinfere/beg_redirect.map
HAProxy Redirecting based on an HTTP Query or a Map with a fallback redirect based on host header
# This file contains only partial paths to match on
# This file should reside in the same directory as the haproxy.cfg simply due to the way it is configured in the sample snippet-but they can go anywhere in the /etc/haproxy directory
/my-partial- https://subdomain3.mydomain.com/my-new-full-path
SELECT table_schema,
table_name,
data_type,
( CASE data_type
WHEN 'tinyint' THEN 255
WHEN 'smallint' THEN 65535
WHEN 'mediumint' THEN 16777215
WHEN 'int' THEN 4294967295
WHEN 'bigint' THEN 18446744073709551615
end >> IF(Locate('unsigned', column_type) > 0, 0, 1) ) AS MAX_VALUE,