Last modified: 2010-05-15 15:38:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 4797 - MySQL error 1048 - "column user_id cannot be null" when creating users
MySQL error 1048 - "column user_id cannot be null" when creating users
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
Other Linux
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2006-01-30 01:29 UTC by Russ
Modified: 2010-05-15 15:38 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Russ 2006-01-30 01:29:39 UTC



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...!!?


1: "Create an account or Login" (hyperlink) ->
2: [Fill in all fields] ->
3: "New Account" (button) ->

"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)".
Comment 1 Brion Vibber 2006-01-30 01:32:17 UTC
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.
Comment 2 Rob Church 2006-01-30 01:34:21 UTC
(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.
Comment 3 Russ 2006-01-30 01:49:41 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.