From: Francis Dupont Date: Sun, 21 May 2023 12:42:31 +0000 (+0200) Subject: [#2867] Made binaddr index ascending X-Git-Tag: Kea-2.3.8~103 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56f59eef1f9df5266f17dafbd5add7a13c4cf6d3;p=thirdparty%2Fkea.git [#2867] Made binaddr index ascending --- diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index b1eb357aeb..d64bff6a5d 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -5303,7 +5303,7 @@ DELIMITER ; -- Add the binary version of the IPv6 address for v6 BLQ prefix filter. ALTER TABLE lease6 ADD COLUMN binaddr BINARY(16) DEFAULT NULL; -CREATE INDEX lease6_by_binaddr ON lease6 (binaddr); +CREATE INDEX lease6_by_binaddr ON lease6 (binaddr ASC); -- Create table for v6 BLQ by-relay-id. CREATE TABLE lease6_relay_id ( diff --git a/src/share/database/scripts/mysql/upgrade_017_to_018.sh.in b/src/share/database/scripts/mysql/upgrade_017_to_018.sh.in index ae53ffa8b4..95924119d2 100644 --- a/src/share/database/scripts/mysql/upgrade_017_to_018.sh.in +++ b/src/share/database/scripts/mysql/upgrade_017_to_018.sh.in @@ -191,7 +191,7 @@ DELIMITER ; -- Add the binary version of the IPv6 address for v6 BLQ prefix filter. ALTER TABLE lease6 ADD COLUMN binaddr BINARY(16) DEFAULT NULL; -CREATE INDEX lease6_by_binaddr ON lease6 (binaddr); +CREATE INDEX lease6_by_binaddr ON lease6 (binaddr ASC); -- Create table for v6 BLQ by-relay-id. CREATE TABLE lease6_relay_id ( diff --git a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql index cee8e730e2..0b20665a9b 100644 --- a/src/share/database/scripts/pgsql/dhcpdb_create.pgsql +++ b/src/share/database/scripts/pgsql/dhcpdb_create.pgsql @@ -5640,6 +5640,7 @@ UPDATE lease6 SET duid = E'\\x000000' WHERE duid = E'\\x00'; -- Add the binary version of the IPv6 address for v6 BLQ prefix filter. ALTER TABLE lease6 ADD COLUMN binaddr BYTEA DEFAULT NULL; +CREATE INDEX lease6_by_binaddr ON lease6 (binaddr ASC); -- Create table for v6 BLQ by-relay-id. CREATE TABLE lease6_relay_id ( diff --git a/src/share/database/scripts/pgsql/upgrade_016_to_017.sh.in b/src/share/database/scripts/pgsql/upgrade_016_to_017.sh.in index 72a1db15bc..e84b5cf5f2 100644 --- a/src/share/database/scripts/pgsql/upgrade_016_to_017.sh.in +++ b/src/share/database/scripts/pgsql/upgrade_016_to_017.sh.in @@ -43,6 +43,7 @@ UPDATE lease6 SET duid = E'\\\\x000000' WHERE duid = E'\\\\x00'; -- Add the binary version of the IPv6 address for v6 BLQ prefix filter. ALTER TABLE lease6 ADD COLUMN binaddr BYTEA DEFAULT NULL; +CREATE INDEX lease6_by_binaddr ON lease6 (binaddr ASC); -- Create table for v6 BLQ by-relay-id. CREATE TABLE lease6_relay_id (