Installing this module, i got the following error :

user warning: Invalid default value for '_thumbs' query: CREATE TABLE node_fileshare ( vid INT(4) UNSIGNED DEFAULT '0' NOT NULL , nid INT(4) UNSIGNED DEFAULT '0' NOT NULL , _filepath VARCHAR(255) NOT NULL , _thumbs BOOL DEFAULT 'FALSE' NOT NULL , _modify BOOL DEFAULT 'FALSE' NOT NULL , PRIMARY KEY (vid,nid) ) TYPE = MYISAM /*!40100 DEFAULT CHARACTER SET utf8 */ in....

also, TYPE=MYISAM is deprecated

so I updated the creation code as this in my fileshare.mysql file

CREATE TABLE node_fileshare (
    vid INT(4) UNSIGNED DEFAULT '0' NOT NULL ,
    nid INT(4) UNSIGNED DEFAULT '0' NOT NULL ,
    _filepath VARCHAR(255) NOT NULL ,
    _thumbs BOOL DEFAULT FALSE NOT NULL ,
    _modify BOOL DEFAULT FALSE NOT NULL ,
PRIMARY KEY (vid,nid) ) ENGINE = MYISAM /*!40100 DEFAULT CHARACTER SET utf8 */

no more error.

CommentFileSizeAuthor
#3 unquote-mysql.patch.txt781 bytesdman

Comments

JamieR’s picture

Thank you. I'm a postgreSQL guy, so any help fine tuning the MySQL is appreciated. I'll update the repository soon.

JamieR’s picture

Assigned: Unassigned » JamieR
Status: Active » Fixed

I just removed the whole spec of 'MYISAM' cvs updated.

dman’s picture

StatusFileSize
new781 bytes

Still broken.
Looks like you quoted the 'FALSE' values.

diff -u -r1.2 fileshare.install
--- fileshare.install	7 Jul 2006 04:58:15 -0000	1.2
+++ fileshare.install	13 Jul 2006 10:12:56 -0000
@@ -13,8 +13,8 @@
 					vid INT(4) UNSIGNED DEFAULT '0' NOT NULL ,
 					nid INT(4) UNSIGNED DEFAULT '0' NOT NULL ,
 					_filepath VARCHAR(255) NOT NULL ,
-					_thumbs BOOL DEFAULT 'FALSE' NOT NULL ,
-					_modify BOOL DEFAULT 'FALSE' NOT NULL ,
+					_thumbs BOOL DEFAULT FALSE NOT NULL ,
+					_modify BOOL DEFAULT FALSE NOT NULL ,
 					PRIMARY KEY (vid,nid)
 				) 

--- on preview I see it's full of tabs. You may not care, but coding standards stop confusion when patching.

Here's my version of the same task It doesn't have the ability to delete, and it doesn't have its own database table, but it doesn't cause errors in IE either. (touchwood)

JamieR’s picture

Thanks for the feedback - I updated the version in cvs and did some code cleanup.

But where was your module when I went looking a couple months ago! I never would have made this if that was around! Grrr...
And if you want to lend a hand debugging the IE errors feel free... ;) I should have a windows environment up in VMware on my Linux machine soon though... so I can troubleshoot IE in a couple weeks.

Anonymous’s picture

Status: Fixed » Closed (fixed)
blalond’s picture

Version: » 4.7.x-1.x-dev

I got this to work using phpMyAdmin:

CREATE TABLE `node_fileshare` (
`vid` INT( 4 ) UNSIGNED NOT NULL DEFAULT '0',
`nid` INT( 4 ) UNSIGNED NOT NULL DEFAULT '0',
`_filepath` VARCHAR( 255 ) NOT NULL ,
`_thumbs` BOOL NOT NULL DEFAULT 'FALSE',
`_modify` BOOL NOT NULL DEFAULT 'FALSE',
PRIMARY KEY ( `vid` , `nid` )
) TYPE = MYISAM ;