Last modified: 2010-05-15 15:38:22 UTC
environment: ----------- MySQL-4.1.16 PHP-5.1.2 Apache-1.3.34 MediaWiki-1.5.6 general: -------- MediaWiki generated an error message when adding a new user account from same IP range as existing accounts (different details, different email address, different user/pass etc) - weird thing is there were entries in the wiki_user table already...!!? specifics: ---------- 1: "Create an account or Login" (hyperlink) -> 2: [Fill in all fields] -> 3: "New Account" (button) -> 4: "Database error From [My]Wiki A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "User::addToDatabase". MySQL returned error "1048: Column 'user_id' cannot be null (localhost)".
This sounds like either the table definition is bogus (missing the autoincrement field option) or MySQL is configured in some very strange nonstandard way which causes it to behave differently.
(In reply to comment #0) In order to check if it's the first part of comment #1 or not, please run DESCRIBE <table>, where <table> is the name of the user table, including the database prefix.
I ran #>DESC wiki_user; and the auto_increment attribute was indeed missing from the table definition! Strange. However - I would not discount the possibility that someone here (inc myself) could have messed this up. I have altered the table and the bug no longer occurs. Please advise if the "WORKSFORME" value of the new Bug Status is incorrect and I will change it, otherwise my thanks to you both.