Skip to content

parser.php missing a delete #1

@Outworldz

Description

@Outworldz

PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '14959ed2-06b3-4e61-bcac-b84d605ba68c' for key 'PRIMARY'' in C:\inetpub\Wordpress\Search\parser.php:254
Stack trace:
parser.php(254): PDOStatement->execute(Array)
parser.php(70): parse('Dreamlife.outwo...', '8081', '<?xml version="...')
CheckHost('Dreamlife.outwo...', '8081')
{main}
thrown in C:\inetpub\Wordpress\Search\parser.php on line 254

        // Missing delete - should be an atomic update_or_insert with a lock in case more than one parse.php is running.  This hack only works when one parser is alive and then just barely - parcels could be missing from search..

         $query = $db->prepare("DELETE FROM allparcels WHERE parcelUUID = ?");
        $query->execute( array($parceluuid) );

// put that in front of this:

        $query = $db->prepare("INSERT INTO allparcels VALUES(" .
                                ":r_uuid, :p_name, :o_uuid, :g_uuid, " .
                                ":landing, :p_uuid, :i_uuid, :area)");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions