Welcome to Geeklog, Anonymous Wednesday, October 09 2024 @ 07:10 pm EDT
Geeklog Forums
" 1062: Duplicate entry '0' for key 1." question again
Masabu
Anonymous
Hello I found someone asked same question before, but it was left unresolved, here I am trying to give more detail,
I encountered this issue after I installed "Media Gallery" plugin, I do not encouter this problem with my other site with exactly same setting. My environment is 1.4.0sr2, version of my sql is 4.0.16-log ?
When I try to add user, geeklog gives back error, and error.log says
Sun Jul 9 16:39:39 2006 - 1062: Duplicate entry '0' for key 1. SQL in question: INSERT INTO gl_users (username,email,regdate,cookietimeout,passwd,fullname) VALUES ('test','xxx@gmail.com','2006-07-09 16:39:39','28800','xxxx','Guest User')
I figured something was wrong with DB. so here is the table of gl_users of my not-working sql database
mysql> describe gl_users;
+----------------+----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+----------------------+------+-----+---------------------+-------+
| uid | mediumint(8) | | PRI | 0 | |
| username | varchar(16) | | MUL | | |
| remoteusername | varchar(60) | YES | | NULL | |
| remoteservice | varchar(60) | YES | | NULL | |
| fullname | varchar(80) | YES | MUL | NULL | |
| passwd | varchar(32) | | MUL | | |
| email | varchar(96) | YES | MUL | NULL | |
| homepage | varchar(96) | YES | | NULL | |
| sig | varchar(160) | | | | |
| regdate | datetime | | | 0000-00-00 00:00:00 | |
| photo | varchar(128) | YES | | NULL | |
| cookietimeout | int(8) unsigned | YES | | 0 | |
| theme | varchar(64) | YES | | NULL | |
| language | varchar(64) | YES | | NULL | |
| pwrequestid | varchar(16) | YES | MUL | NULL | |
| status | smallint(5) unsigned | | | 1 | |
+----------------+----------------------+------+-----+---------------------+-------+
16 rows in set (0.00 sec)
The result of describe command for color=red>correctly functioning geeklog is as below
mysql> describe gl_users;
+----------------+----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+----------------------+------+-----+---------------------+----------------+
| uid | mediumint(8) | | PRI | NULL | auto_increment |
| username | varchar(16) | | MUL | | |
| remoteusername | varchar(60) | YES | | NULL | |
| remoteservice | varchar(60) | YES | | NULL | |
| fullname | varchar(80) | YES | MUL | NULL | |
| passwd | varchar(32) | | MUL | | |
| email | varchar(96) | YES | MUL | NULL | |
| homepage | varchar(96) | YES | | NULL | |
| sig | varchar(160) | | | | |
| regdate | datetime | | | 0000-00-00 00:00:00 | |
| photo | varchar(128) | YES | | NULL | |
| cookietimeout | int(8) unsigned | YES | | 28800 | |
| theme | varchar(64) | YES | | NULL | |
| language | varchar(64) | YES | | NULL | |
| pwrequestid | varchar(16) | YES | MUL | NULL | |
| status | smallint(5) unsigned | | | 1 | |
+----------------+----------------------+------+-----+---------------------+----------------+
16 rows in set (0.00 sec)
Can someone give me some clue? I can see some default values seem to be changed after I installed media gallery, (that is my suspect, but may not be true), many thanks.
Masabu
I encountered this issue after I installed "Media Gallery" plugin, I do not encouter this problem with my other site with exactly same setting. My environment is 1.4.0sr2, version of my sql is 4.0.16-log ?
When I try to add user, geeklog gives back error, and error.log says
Sun Jul 9 16:39:39 2006 - 1062: Duplicate entry '0' for key 1. SQL in question: INSERT INTO gl_users (username,email,regdate,cookietimeout,passwd,fullname) VALUES ('test','xxx@gmail.com','2006-07-09 16:39:39','28800','xxxx','Guest User')
I figured something was wrong with DB. so here is the table of gl_users of my not-working sql database
Text Formatted Code
mysql> describe gl_users;
+----------------+----------------------+------+-----+---------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+----------------------+------+-----+---------------------+-------+
| uid | mediumint(8) | | PRI | 0 | |
| username | varchar(16) | | MUL | | |
| remoteusername | varchar(60) | YES | | NULL | |
| remoteservice | varchar(60) | YES | | NULL | |
| fullname | varchar(80) | YES | MUL | NULL | |
| passwd | varchar(32) | | MUL | | |
| email | varchar(96) | YES | MUL | NULL | |
| homepage | varchar(96) | YES | | NULL | |
| sig | varchar(160) | | | | |
| regdate | datetime | | | 0000-00-00 00:00:00 | |
| photo | varchar(128) | YES | | NULL | |
| cookietimeout | int(8) unsigned | YES | | 0 | |
| theme | varchar(64) | YES | | NULL | |
| language | varchar(64) | YES | | NULL | |
| pwrequestid | varchar(16) | YES | MUL | NULL | |
| status | smallint(5) unsigned | | | 1 | |
+----------------+----------------------+------+-----+---------------------+-------+
16 rows in set (0.00 sec)
The result of describe command for color=red>correctly functioning geeklog is as below
Text Formatted Code
mysql> describe gl_users;
+----------------+----------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+----------------------+------+-----+---------------------+----------------+
| uid | mediumint(8) | | PRI | NULL | auto_increment |
| username | varchar(16) | | MUL | | |
| remoteusername | varchar(60) | YES | | NULL | |
| remoteservice | varchar(60) | YES | | NULL | |
| fullname | varchar(80) | YES | MUL | NULL | |
| passwd | varchar(32) | | MUL | | |
| email | varchar(96) | YES | MUL | NULL | |
| homepage | varchar(96) | YES | | NULL | |
| sig | varchar(160) | | | | |
| regdate | datetime | | | 0000-00-00 00:00:00 | |
| photo | varchar(128) | YES | | NULL | |
| cookietimeout | int(8) unsigned | YES | | 28800 | |
| theme | varchar(64) | YES | | NULL | |
| language | varchar(64) | YES | | NULL | |
| pwrequestid | varchar(16) | YES | MUL | NULL | |
| status | smallint(5) unsigned | | | 1 | |
+----------------+----------------------+------+-----+---------------------+----------------+
16 rows in set (0.00 sec)
Can someone give me some clue? I can see some default values seem to be changed after I installed media gallery, (that is my suspect, but may not be true), many thanks.
Masabu
15
18
Quote
All times are EDT. The time is now 07:10 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content