Skip to content
Snippets Groups Projects
Select Git revision
0 results

Sql.pmod

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Stephen R. van den Berg authored
    As reported by Jeff Hungerford:
    
    When there is:
    - No connection at present.
    - Two or more threads try to open an initial connection to the database
      simultaneously.
    
    You can trigger this:
    
    Attempting to clone an unfinished program
    /usr/local/pike/8.0.175/lib/modules/Sql.pmod/Sql.pike:342:
        Sql.Sql()->create("localhost:5432","foo","bar","CENSORED",UNDEFINED)
    
    This could be caused by a race in the Pike-core class-cloning code which
    is not racefree when two threads try to instantiate the same object
    at roughly the same instant.
    
    This patch attempts a workaround to detect the race and loop until
    it finishes without problems.  It would be better if this could be
    fixed in the Pike-core.
    f339d7f8
    History
    Name Last commit Last update
    ..