Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table does not unlock after delete #33

Closed
johanneshahn opened this issue Aug 12, 2012 · 6 comments
Closed

Table does not unlock after delete #33

johanneshahn opened this issue Aug 12, 2012 · 6 comments

Comments

@johanneshahn
Copy link

Hi,
i get some DB errors (Could not get lock in "runQuery" ...) when i delete a triple and after that insert a new one.
Think theres a missing release/unlock Table after delete.
In class ARC2_StoreDeleteQueryHandler function cleanValueTables().

Ill add $this->store->releaseLock(); at the end of function near line 229.

Error is gone.

@craigdietrich
Copy link
Contributor

This seems easy enough -- I'll make the change and run a pull request.

Though, curious if there is a reason that the line 229 is commented out:
//mysql_query($sql, $con);
https://github.com/semsol/arc2/blob/master/store/ARC2_StoreDeleteQueryHandler.php

This goes pretty far back, so I'm guessing @bnowack had a reason?

@samuell
Copy link
Contributor

samuell commented Jun 29, 2016

@craigdietrich Was there a pull request for this? (Interested in an unambiguous fix for the problem :) )

@samuell
Copy link
Contributor

samuell commented Jun 29, 2016

Ok, so I tried to apply this myself. Seems to work great.

For future ref: I generated a patch from the original file with .orig added before .php, and the newly changed file like so:

[samuel arc2]$ diff -p store/ARC2_StoreDeleteQueryHandler{.orig,}.php

Resulting in this patch:

*** store/ARC2_StoreDeleteQueryHandler.orig.php Wed Jun 29 15:20:18 2016
--- store/ARC2_StoreDeleteQueryHandler.php      Wed Jun 29 15:19:17 2016
*************** class ARC2_StoreDeleteQueryHandler exten
*** 226,231 ****
--- 226,233 ----
        WHERE G.g IS NULL AND T1.t IS NULL AND T2.t IS NULL
      ';
      //mysql_query($sql, $con);
+     /* release lock */
+     $this->store->releaseLock();
    }

    /*  */

samuell added a commit to samuell/arc2 that referenced this issue Jun 29, 2016
bnowack added a commit that referenced this issue Jun 30, 2016
Fix issue #33 (Table does not unlock after delete)
@bnowack
Copy link
Collaborator

bnowack commented Jun 30, 2016

Thanks guys!

@bnowack bnowack closed this as completed Jun 30, 2016
@craigdietrich
Copy link
Contributor

Thanks all!

@jvieille
Copy link

jvieille commented Mar 9, 2017

This foinally solved a decade long issue on Drupal File Framework!
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants