6.0.0-alpha12
6/8/25

[#9363] 2_nag_upgrade_autoincrement.php error with MySQL
Summary 2_nag_upgrade_autoincrement.php error with MySQL
Queue Nag
Queue Version Git master
Type Bug
State Not A Bug
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 11/04/2010 (5330 days ago)
Due
Updated 11/04/2010 (5330 days ago)
Assigned 11/04/2010 (5330 days ago)
Resolved 11/04/2010 (5330 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
11/04/2010 04:00:27 PM Michael Rubinsky Comment #9 Reply to this comment
Where ever this comes from, this is a NOT NULL field, so it must 
have a default value different than NULL.
Yea, sorry. MySQL can show NULL as the default value, when in fact it 
is not really NULL.

http://bugs.mysql.com/bug.php?id=34198

I think the point is that there *is* no default value for that field. 
Not sure where the '0' came from.
11/04/2010 03:57:22 PM Jan Schneider Comment #8
State ⇒ Not A Bug
Reply to this comment
Worked fine after fixing this.
11/04/2010 03:55:28 PM Jan Schneider Comment #7 Reply to this comment
Or no default value at all, I see.
11/04/2010 03:52:14 PM Jan Schneider Comment #6 Reply to this comment
Where ever this comes from, this is a NOT NULL field, so it must have 
a default value different than NULL.
11/04/2010 03:46:17 PM Michael Rubinsky Comment #5 Reply to this comment
In fact, most of those '0' default values are shown as NULL for me.
11/04/2010 03:41:39 PM Michael Rubinsky Comment #4 Reply to this comment
What does DESCRIBE show?
Of the current nag_shares table? (this is not a fresh install)

+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| share_id        | int(11)      | NO   | PRI | 0       |       |
I'm not sure how/why there is a default value of '0' for that field. 
The install I haven't migrated yet shows 'NULL' there, as does the 
install I have run a fresh install on.

11/04/2010 03:33:44 PM Jan Schneider Comment #3 Reply to this comment
What does DESCRIBE show?
Of the current nag_shares table? (this is not a fresh install)

+-----------------+--------------+------+-----+---------+-------+
| Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| share_id        | int(11)      | NO   | PRI | 0       |       |
| share_name      | varchar(255) | NO   | MUL |         |       |
| share_owner     | varchar(255) | YES  | MUL | NULL    |       |
| share_flags     | smallint(6)  | NO   |     | 0       |       |
| perm_creator    | smallint(6)  | NO   | MUL | 0       |       |
| perm_default    | smallint(6)  | NO   | MUL | 0       |       |
| perm_guest      | smallint(6)  | NO   | MUL | 0       |       |
| attribute_name  | varchar(255) | NO   |     |         |       |
| attribute_desc  | varchar(255) | YES  |     | NULL    |       |
| attribute_color | varchar(7)   | YES  |     | NULL    |       |
+-----------------+--------------+------+-----+---------+-------+

11/04/2010 03:09:15 PM Michael Rubinsky Comment #2
State ⇒ Feedback
Reply to this comment
I'm not seeing this with either a new install or migration of existing 
table. I don't see where the share_id field would even have a default 
value either.  What does DESCRIBE show?
11/04/2010 12:49:15 PM Jan Schneider Comment #1
Priority ⇒ 2. Medium
Type ⇒ Bug
Summary ⇒ 2_nag_upgrade_autoincrement.php error with MySQL
Queue ⇒ Nag
Assigned to Michael Rubinsky
Milestone ⇒
Patch ⇒ No
State ⇒ Assigned
Reply to this comment
2010-11-04T12:45:22+00:00 INFO: -- changeColumn(nag_shares, share_id, 
integer, array(null => false, autoincrement => true))
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid 
default value for 'share_id'

Saved Queries