Parcourir la source

[2909] Updated schema_copy.h to more accurately reflect the database schema

When the MySql lease manager tests create the database, they now also
create all the indexes as well.
Stephen Morris il y a 12 ans
Parent
commit
56099e3711
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      src/lib/dhcpsrv/tests/schema_copy.h

+ 6 - 0
src/lib/dhcpsrv/tests/schema_copy.h

@@ -51,6 +51,10 @@ const char* create_statement[] = {
         "subnet_id INT UNSIGNED"
         ") ENGINE = INNODB",
 
+    "CREATE INDEX lease4_by_hwaddr_subnet_id ON lease4 (hwaddr, subnet_id)",
+
+    "CREATE INDEX lease4_by_client_id_subnet_id ON lease4 (client_id, subnet_id)",
+
     "CREATE TABLE lease6 ("
         "address VARCHAR(39) PRIMARY KEY NOT NULL,"
         "duid VARBINARY(128),"
@@ -63,6 +67,8 @@ const char* create_statement[] = {
         "prefix_len TINYINT UNSIGNED"
         ") ENGINE = INNODB",
 
+    "CREATE INDEX lease6_by_iaid_subnet_id_duid ON lease6 (iaid, subnet_id, duid)",
+
     "CREATE TABLE lease6_types ("
         "lease_type TINYINT PRIMARY KEY NOT NULL,"
         "name VARCHAR(5)"