Put a separate transaction around allocate_clear
authorAlan T. DeKok <aland@freeradius.org>
Mon, 25 Nov 2013 15:19:16 +0000 (10:19 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 25 Nov 2013 20:23:35 +0000 (15:23 -0500)
to deal with MySQL issues.  It reduces deadlocks

src/modules/rlm_sqlippool/rlm_sqlippool.c

index 7d2ae16..821fd92 100644 (file)
@@ -584,6 +584,18 @@ static int sqlippool_postauth(void *instance, REQUEST * request)
                          (char *) NULL, 0);
 
        /*
+        * COMMIT
+        */
+       sqlippool_command(data->allocate_commit, sqlsocket, data, request,
+                         (char *) NULL, 0);
+
+       /*
+        * BEGIN
+        */
+       sqlippool_command(data->allocate_begin, sqlsocket, data, request,
+                         (char *) NULL, 0);
+
+       /*
         * FIND
         */
        allocation_len = sqlippool_query1(allocation, sizeof(allocation),