Browse Source

[2972] Added explicit transaction start and commit to create schema
SQL statement. This corrects a MySQL flush timing issue that causes
the checkVersion unit test to fail under some Debian VMs.

Thomas Markwalder 12 years ago
parent
commit
6849529f7e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/lib/dhcpsrv/tests/schema_copy.h

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

@@ -42,6 +42,7 @@ const char* destroy_statement[] = {
 // Creation of the new tables.
 
 const char* create_statement[] = {
+    "START TRANSACTION",
     "CREATE TABLE lease4 ("
         "address INT UNSIGNED PRIMARY KEY NOT NULL,"
         "hwaddr VARBINARY(20),"
@@ -84,6 +85,7 @@ const char* create_statement[] = {
         ")",
 
     "INSERT INTO schema_version VALUES (1, 0)",
+    "COMMIT",
 
     NULL
 };