Closed (duplicate)
Project:
Drupal core
Version:
x.y.z
Component:
database system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Oct 2003 at 14:03 UTC
Updated:
19 Jan 2006 at 15:45 UTC
As long as we are dedicated to using sequences, we should change all auto-increment fields into integer fields in the database setup scripts. We occassionally rely on these auto-increment fields when we should not and this causes seldom noticed bugs in the application.
The current bug, which i will submit a patch for, is the access table. The INSERT into this table assumes auto-increment which is not available on all DBs. The INSERT succeeds, but later any delete will fail. Since delete of an access rule is very infrequent, this bug has not been noticed for a long long time.
Comments
Comment #1
killes@www.drop.org commentedI agree with Moshe. I will submit a patch to remove the field for the locale table.
Comment #2
moshe weitzman commentedThe new profile tables use auto-increment instead of sequences.
Comment #3
killes@www.drop.org commentedI have found that auto-increment fields aren't neccessarily evil. The new locale.module uses them too for performance reasons.
Comment #4
moshe weitzman commentedof course they aren't evil. they's useful. but we, as a project, have to decide if we want to support DBs which don't provide sequences. if we don't care about this, we should be able to get rid of sequences table. this will require some code changes too, since we'll have to ask the DB what 'nid' was assigned on a new post (for example).
Comment #5
killes@www.drop.org commentedI admit my cluelessness: Which dbs do not have auto-increments?
I recall that there was somemajor discussion before introducing the sequences table. IIRC we wanted to be sure to get unique node IDs. The sequences mechanism achieves this by locking the table while with auto-increments it could happen that you would not be sure which ID you got. But this was a while ago and my memories might be fading.
Comment #6
killes@www.drop.org commentedSupporting databases without autoincrement is IMHO a feature request.
Comment #7
moshe weitzman commentedhttp://drupal.org/node/38585