Install error due to defined DEFAULT field
| Project: | Links Package |
| Version: | 6.x-1.0 |
| Component: | Code: links.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | syscrusher |
| Status: | needs review |
Jump to:
Hello,
I installed LINKS for the first time today on my 6.9/MySQL 5 install and received the error below.
user warning: BLOB/TEXT column 'url' can't have a default value query: CREATE TABLE links ( `lid` INT unsigned NOT NULL auto_increment, `url_md5` CHAR(32) NOT NULL DEFAULT '', `url` TEXT NOT NULL DEFAULT '', `link_title` VARCHAR(255) NOT NULL DEFAULT '', `last_click_time` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (lid), UNIQUE KEY url_ix (url_md5), UNIQUE KEY title_ix (link_title, lid), UNIQUE KEY stale_ix (last_click_time, lid) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.inc on line 515.
I removed all references of default being defined in links.install and reinstalled and everything worked fine. Attached is the updated .install.
Thanks!
| Attachment | Size |
|---|---|
| links.install.txt | 5.34 KB |

#1
This must be peculiar to the Windows version of MySQL, because the CREATE TABLE statement above works fine under Linux. Nevertheless, the default value for that particular column is not essential -- only the NOT NULL part really matters. So I'll drop the default from the TEXT column in the next version of the links.install file.
I don't have access to a Windows test environment. Do you have a test web site where you could regression test the new version of links.install for me?
Thanks for the bug report.
Kind regards,
Scott
#2
I looked into this closer -- there is a non-fatal warning issued under Linux as well. Again, should be fixed in the developer version that will be posted tonight.
Scott
#3
The change is in CVS as the head of the DRUPAL-6--1 branch. This should show up on the download list tonight, or you can get it from CVS now by doing a checkout with "-rDRUPAL-6--1".
Scott