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

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T6797, the corresponding Phabricator task for complete and up-to-date bug report information.
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
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
1.5.x
Other Linux
: High major (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  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: ---


Attachments

Description Russ 2006-01-30 01:29:39 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)".
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.


Navigation
Links