Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
user.module
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
30 May 2007 at 05:15 UTC
Updated:
15 Jun 2007 at 03:50 UTC
this patch include 2 part:
if caseboth change are just safety checking, and will not change the programming logic. on the other hand, the 2nd change will be much oracle friendly and so increase cross DB compatibility.
| Comment | File | Size | Author |
|---|---|---|---|
| drupal-6.x-dev-user_sql_friendly-1.0.patch | 704 bytes | hswong3i |
Comments
Comment #1
hswong3i commentedmy partner (mike2854: http://drupal.org/user/31933) report that:
BTW, as the patch is just a safty checking, it seems harmless in current status.
Comment #2
hswong3i commentedjust setup a drupal-6-dev testbed with MySQL 5.0.38 and PHP 5.2.0-10. test passed: user is able to logout, no harmful reaction.
i will test it under oracle once again afterward ;)
Comment #3
hswong3i commentedas mike (http://drupal.org/user/31933) provide the original patch, which it is totally not acceptable among different DB, i rework it as current patch, which use
db_unlock_table():mike just test my patch once again, and it is also function under oracle. it is now ready to commit ;)
Comment #4
dries commentedI don't understand why the patch in #1 is necessary. We're unlocking something which has never been locked to begin with. Maybe this is necessary due to a bug in your Oracle database layer.
I'm not inclined to commit this patch until we understand what is going on. I don't understand what you were saying in #3 but maybe it was part of the answer.
If you could provide a bit more (background) information about why this is necessary, we'd be able to better understand why this is needed. Thanks.
Comment #5
hswong3i commentedas like as the case of block.module (http://drupal.org/node/147865): your question is totally correct. it is not happened within mysql, and so we need to take some special handling within oracle, in order to ensure the successful of
COMMITbefore user logout.since oracle are expected to run numbers of DML, store within queue, and run them once during
COMMIT. before anyCOMMIT, no change will be taken to DB architecture. on the other hand, user are also able to roll back or give up change before runningCOMMIT. only DDL will take effect to DB architecture immediately.within our oracle driver implementation, we force to run
COMMITfor every call ofdb_query(): this will keep the oracle driver functionality as like as mysql, which also more close to the requirement of drupal usage. this is not required by mysql driver, as mysql don't have such concept aboutCOMMIT: every call ofdb_query()will immediately reflect to DB structure.and that's why we will need to take some extra handle with this topic :(
Comment #6
hswong3i commentedComment #7
hswong3i commentedproblem solved!
as mentioned in #5, it should be oracle-driver-only problem. i double check the driver architecture, rewrite db_unlock_tables() as independence with db_query(), rewrite most DB related function to use db_unlock_tables() before return, so force all transaction to be committed.
mike and i check it for many time, and no long have locking during user logout. if this problem never happened among other DB driver, this thread should marked as fixed ;)
Comment #8
(not verified) commented