MantisBT - v1.1 Release (Closed)
View Issue Details
0000201v1.1 Release (Closed)[All Projects] Generalpublic2009-07-08 12:072009-09-09 22:39
Assigned Tocaseydk 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.1 
Summary0000201: Unable to upload file in files module
DescriptionIt is impossible to upload any file to web2project.
This is problem of file_checkout field in files table. This field is "not null" and doesn§t have default value. Under MYSQL "strict" configuration this causes an error - see in additional information.
In MySQL manual I found following explanation:
MySQL 5.0 and higher have a strict mode. The Windows Installer from enables this strict mode by default.
Additional InformationError message:
query failed(INSERT INTO `files`(`file_version_id`,`file_real_filename`,`file_name`,`file_description`,`file_type`,`file_owner`,`file_date`,`file_size`,`file_version`,`file_category`,`file_folder`,`file_helpdesk_item`) VALUES (1,'92474a54ecca23d48','XP_inst.txt','sdanfadsf','text/plain','2','2009-07-08 21:00:26',712,'1','0','0','1')) - error was: Field 'file_checkout' doesn't have a default value
TagsNo tags attached.
Attached Files

2009-07-21 06:28   
This can be fixed on the MySQL side by going in to the my.ini in the MySql root directory.

change this line:
# Set the SQL mode to strict
# Set the SQL mode to strict
then resart the service

This will however disable error checking on dates i.e. you can input a month of 13.

there are several other places that a datetime does not have a default value (2 that I have seen in the contacts module), if you wanted to correct it in the code.

2009-07-28 21:15   
After some digging into this, I've determined that it only happens on new installations, not conversions from dotProject. While still not good, it's better than it could be.

The proper way of resolving this one is to run this command:

ALTER TABLE `files` CHANGE `file_checkout` `file_checkout` VARCHAR(16) NOT NULL DEFAULT '';

I've already written an update script - to be included in v1.1 - that will automatically apply this. This was committed in r537.
2009-09-09 22:39   
Closed for release.

Issue History
2009-07-08 12:07MiraKlimNew Issue
2009-07-12 05:08caseydkProjectPending Requests => v1.1 Release (Closed)
2009-07-21 06:28joeNote Added: 0000346
2009-07-21 06:28joeNote Edited: 0000346
2009-07-28 21:15caseydkStatusnew => resolved
2009-07-28 21:15caseydkResolutionopen => fixed
2009-07-28 21:15caseydkAssigned To => caseydk
2009-07-28 21:15caseydkNote Added: 0000360
2009-09-09 22:39caseydkStatusresolved => closed
2009-09-09 22:39caseydkNote Added: 0000441
2009-09-09 22:39caseydkFixed in Version => 1.1