during update.php from dev 2011-Črv-28 to 1.10 got this:


   user warning: BLOB/TEXT column 'duration' can't have a default value query: ALTER TABLE role_expire_length CHANGE `duration` `duration` TINYTEXT DEFAULT '' in H:\Zend\Apache2\htdocs\vvv.cz\includes\database.mysql-common.inc on line 528.
    user warning: Data truncated for column 'duration' at row 1 query: UPDATE role_expire_length SET duration=CONCAT(duration,' days') WHERE LENGTH(duration)>0 in H:\Zend\Apache2\htdocs\vvv.cz\sites\all\modules\role_expire\role_expire.install on line 226.



he following queries were executed
role_expire module
Update #6124

    Failed: ALTER TABLE {role_expire_length} CHANGE `duration` `duration` TINYTEXT DEFAULT ''
    Failed: UPDATE role_expire_length SET duration=CONCAT(duration,' days') WHERE LENGTH(duration)>0 

CommentFileSizeAuthor
#2 role_expire-1302440-02.patch12.94 KBsharplesa

Comments

eL’s picture

Issue summary: View changes

repair

sharplesa’s picture

Assigned: Unassigned » sharplesa

Good catch. This query works fine on Linux, but I see in the mysql documentation that on more strict platforms, you cannot have a default value for TEXT fields. (See http://dev.mysql.com/doc/refman/5.0/en/blob.html, user comment by Bryce Nesbitt)

Thanks for the bug report.

sharplesa’s picture

Status: Active » Needs review
StatusFileSize
new12.94 KB

I'm about ready to roll out 1.11 if stewsnooze agrees. It will apply the following patch to 1.10.

When applied, this patch will fold in patches and address the following issues:

  1. #1302440: Failed: ALTER TABLE and Failed: UPDATE role_expire_length (this issue)
  2. #1299534: Incorrect SQL in update 6124
  3. #1286010: Expiration input doesn't appear on user add form with additional elements
  4. #792364: Table prefixes are missing
  5. #707042: Cron: integration with Role Watchdog (and possibly other user role modules) - by folding in kentr's patch.
  6. #690680: Role expiry isn't shown on user profile
  7. #543716: "Administer Permissions" requirement - on Administer Users rather than Administer Permissions.

I also spent a lot of time clarifying language.

sharplesa’s picture

Status: Needs review » Fixed

Addressed by role_expire 6.x-1.11, posted today (2011-10-30).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

not from 1.9 but from dev to 1.10