Browse 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 12 years ago
parent
commit
56099e3711
1 changed files with 6 additions and 0 deletions
  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)"