Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
system.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2007 at 18:23 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
killes@www.drop.org commentedhow common is this setting? I didn't even know you could change that...
Comment #2
Chris Johnson commentedI'm not sure this patch will completely solve the problem of someone changing those values in their MySQL database. If the suggested patch was 100% correct and covered 100% of the cases where changed
auto_increment_incrementandauto_increment_offset valuesmight cause Drupal to fail, I would say go ahead and commit the patch, because it is small and simple. But I am not confident it meets those criteria.The chances of someone changing those values in their database for legitimate reasons is exceedingly small. Here are some quotes from the MySQL documentation page where they are described:
Here is the reason these 2 variables exist at all: http://dev.mysql.com/doc/refman/5.0/en/replication-auto-increment.html
So it seems that a Drupal site would need this patch only in 2 cases:
It seems like it would be useful to have Drupal capable of running on MySQL master to master replication. But I think it will take some extensive testing to prove a patch correct for such a situation.
Comment #3
oremj commentedAnother time that this maybe set is if the user has a master-master setup, but does not want to run drupal on both masters. For example they want to run it on master 2 only, but have the benefit of it being replicated to master 1 in case a failover is needed.
Comment #4
cshields commentedeek. killes, this is the way our new db boxes are setup (in the master-master setup that Jeremy talks about). So if this is a problem it may cause problems when moving drupal.org over. Might want to test with scratch.drupal.org on juniper. For instance, juniper is set to auto_increment in steps of 2 (as is the other master poplar, but one increments in even numbers and the other increments in odd). Rumor has it that oremj found this bug using the same cluster.
Cheers!
Comment #5
killes@www.drop.org commentedI think this will only affect new installs, not moved ones.
Comment #6
drummCommitted to 5.x.
This has all changed in 6.x, so it might not be needed.
Comment #7
(not verified) commentedComment #8
scor commentedThis problem appears in 6.x as well, because with a auto_increment_increment == 2 for example, the role IDs will be messed up in the db:
which is inconsistent with the values of DRUPAL_ANONYMOUS_RID and DRUPAL_AUTHENTICATED_RID defined in bootstrap.inc.
EDIT: marked Greyed out checkbox appears with no label when editing user #1 as duplicate.
Comment #9
marquardt commentedI've just ran into the same issue; in my case, the LoginToboggan module (see this issue) which makes use of DRUPAL_AUTHENTICATED_RID failed as the latter did not point to the actual role ID. I've re-rolled the patch above which resolved the problem for me.
EDIT: I should have mentioned that the patch is against Drupal 6.10.
Comment #10
marquardt commentedComment #11
robin monks commentedSubscribing from http://drupal.org/node/222511
Comment #12
tuxick commentedsystem.install is even inconsistent:
db_query("INSERT INTO {permission} (rid, perm, tid) VALUES (%d, '%s', %d)", 1, 'access content', 0);
db_query("INSERT INTO {permission} (rid, perm, tid) VALUES (%d, '%s', %d)", 2, 'access comments, access content, post comments, post comments without approval', 0);
Using magic numbers instead of the defines from bootstrap.inc, BUT at least it doesn't rely on auto_increment here.
So i don't see any reason why not to do the same for {role}, as the patch suggests.
I haven't seen any other problems using drupal on mysql master-master replication.
Comment #13
bjaspan commentedsubscribe
Comment #14
liliplanet commentedHi, I have the same problem, users do not receive 'authenticated role' after verification email link. It's just blank in the user/user/list.
Patched my Drupal 6.x13 with #9, but still no joy. Users verify their email, but no role assigned.
Any suggestions would be greatly appreciated :)
Comment #15
marquardt commentedThe patch affects the setup of the Drupal data base at install time; patching an existing installation has no impact. You would have to install a Drupal instance from scratch.
Comment #16
bjaspan commentedsubscribe
Comment #17
nnewton commentedHere is a new patch for this issue, it combines the patch from http://drupal.org/node/254734, this patch and fixes a couple of the "magic numbers". It also edits the uid generation to not "waste" auto_increment values in the generation of uid 0.
Please let me know if I missed anything, as I'd like to get this issue fixed for D6.
Comment #18
nnewton commentedSetting version to 6.x-dev on this.
Comment #19
nnewton commentedThere was some concern that this patched would not work on postgresql. I just tested that on postgres 8.3 with success. Anyone else have any issues with this? This issue in various forms has been languishing for awhile now.
Comment #20
bjaspan commentedWhy is there no testbot results?
Comment #21
killes@www.drop.org commentedI think this patch is incomplete it should also take the inout formats in the next lines into account. We've had problems there when setting up l.d.o
Comment #22
nnewton commentedWe discussed this in Paris. I originally didn't think this was going to be a problem, but I believe Gerhard is right. The attached patch adds explicit setting of the fid to the filters inserts. In my testing, filters work correctly on auto_increment offsets.
-N
Comment #23
meranakliid commentedplz look at the issue http://drupal.org/node/679048
thx
Comment #24
meranakliid commentedplz look at the issue http://drupal.org/node/679048
thx
Comment #25
scor commentedmarked #679048: how to install drupal on a database with different server variables as duplicate.
Comment #26
meranakliid commentedi tried this patch .. but still having the same result..
table structures
uid name pass
0
1 user1 21a350caaf1df67c3685593d7826d2df
3 user2 21232f297a57a5a743894a0e4a801fc3
and another node table :
nid vid type
1 1 page
3 3 page
5 5 page
Comment #27
scor commented@meranakliid, did you reinstall Drupal after applying the patch?
Comment #28
pirmin commentedMy issue (http://drupal.org/node/737850) is a duplicate of this.
I applied this patch (#22) to 6.16 which seems to have solved my authorization issue on a mysql replicated, auto_increment>1 drupal backend.
Note that I started with a fresh install, applied the patch and then installed Drupal.
With these permissions, the anonymous user already can see the front page after install (Welcome...) as expected (Access Content is enabled for anonymous).
Comment #29
scor commentedsee related #739576: Many Drupal 7 tests fail with auto_increment* > 1. Let's keep this issue for D6 since we have a somewhat mature patch, and Drupal 7 issues are pretty different.
Comment #32
a_fortes commented#22: drupal_installer_6_2.patch queued for re-testing.
Comment #34
allan.jude commentedAnother table that is effected is the filter_formats
if the 'filtered html' doesn't have id=1, then modules/filter/filter.module goes in to an infinite loop until memory or execution time is exhausted.