Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#7 closed enhancement (fixed)

Concurrent inserts not possible with postgres

Reported by: arjones@… Owned by: rainer
Priority: minor Milestone:
Component: main Version: 2.1.1a
Keywords: Cc:

Description

With postgres, multiple concurrent inserts into the database are not possible currently.

Change History (2)

comment:1 by Andrew Jones, 19 years ago

In the same vein, but a different part of the code, if strcmp() returns zero, the strings being compared are guaranteed to be the same length. Thus, the following small patch:

--- sh_hash.c.orig      2006-01-11 21:11:15.000000000 +0100
+++ sh_hash.c   2006-01-12 00:26:32.000000000 +0100
@@ -671,8 +671,7 @@
       while (1)
        {
          if (p && p->fullpath &&
-             0 == strcmp(s->fullpath, p->fullpath) &&
-             strlen(s->fullpath) == strlen(p->fullpath))
+             0 == strcmp(s->fullpath, p->fullpath))
            {
              q = p->next;
              SH_FREE(p->fullpath);

comment:2 by rainer, 19 years ago

Resolution: fixed
Status: newclosed

Thanks for pointing out. Actually, in zAVLTree only zAVLSearch matters for the runtime (and the code in sh_hash.c is already fixed in svn), but it's nice to see someone else having a good look at the code and spotting such issues. Comitted as r16.

Note: See TracTickets for help on using tickets.