SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000506SiT!otherpublic2009-02-19 15:482009-08-16 14:39
Reporterivan 
Assigned Toivan 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version3.50Fixed in Version3.50 
Summary0000506: Incorrect integer value
DescriptionWith newer MySQL versions an integer cannot be set to '', a blank value must be NULL instead. Since we use '' in many places throughout SiT from setup_schema and beyond, this is a major barrier to using SiT with newer SQL versions.

A work-around is to run

SET sql_mode = '';

before the SQL you want to run, but obviously this is not practical with the number of queries we have in SiT.

See also:

http://bugs.mysql.com/bug.php?id=18551 [^]

http://dev.mysql.com/doc/refman/5.0/en/server-sql-mode.html [^]
Additional InformationApplication Warning [512]
Incorrect integer value: '' for column 'userid' at row 1 in /var/www/helpdesks/sit/lib/functions.inc.php @ line 2728 trigger_error() journal()

Warning [2]
Cannot modify header information - headers already sent by (output started at /var/www/helpdesks/sit/lib/functions.inc.php:2337) in /var/www/helpdesks/sit/logout.php @ line 32 setcookie()

This warning may be caused by a problem that occurred before the page was displayed, or sometimes by a syntax error or extra whitespace in your config file.

Warning [2]
Cannot modify header information - headers already sent by (output started at /var/www/helpdesks/sit/lib/functions.inc.php:2337) in /var/www/helpdesks/sit/logout.php @ line 38 header()

This warning may be caused by a problem that occurred before the page was displayed, or sometimes by a syntax error or extra whitespace in your config file.
TagsNo tags attached.
Attached Files

- Relationships
related to 0000765closedivan SQL errors on fresh install of 3.50beta2 

-  Notes
User avatar (0001077)
ivan (administrator)
2009-05-19 16:39

SiT 3.45 was shipped with the SET sql_mode = ''; command in the new install schema.

A user has reported in the forum that this statement caused install problems, actually an invalid syntax error. I'm running the exact same versions of PHP and MySQL and cannot reproduce this.

See
http://sitracker.org/forum/viewtopic.php?f=4&t=1416793 [^]
User avatar (0001126)
paulh (administrator)
2009-05-27 21:43

We probably need to be more careful throught all of SiT using strings and ints in the correct place in our sql rather than strings throught, not only will this resolve this sort of problem it will bring a performance increase
User avatar (0001142)
ivan (administrator)
2009-05-27 22:17

Paul, have you any idea as to why it was a syntax error for the user on the forum? SET sql_mode = ''; seemed to fix the problem reported in this bug but as mentioned it fails quite badly for that guy.
User avatar (0001149)
ivan (administrator)
2009-05-29 12:04
edited on: 2009-05-29 14:03

Related to STRICT_ALL_TABLES or STRICT_TRANS_TABLES mode I think

Background reading:
http://dev.mysql.com/doc/refman/5.1/en/faqs-sql-modes.html [^]
http://ronaldbradford.com/blog/why-sql_mode-is-important-part-i-2008-07-17/ [^]
http://dev.mysql.com/tech-resources/articles/mysql-data-integrity.html [^]

User avatar (0001150)
ivan (administrator)
2009-05-29 14:06

Made some changes in trunk svn r5418 which I hope resolves this issue. Please reopen if you experience problems with later builds.
User avatar (0001660)
ivan (administrator)
2009-08-16 14:39

Released in 3.50rc1

- Issue History
Date Modified Username Field Change
2009-02-19 15:48 ivan New Issue
2009-03-05 14:31 ivan Status new => confirmed
2009-05-19 16:39 ivan Note Added: 0001077
2009-05-19 16:39 ivan Target Version => 3.50
2009-05-27 21:43 paulh Note Added: 0001126
2009-05-27 22:17 ivan Note Added: 0001142
2009-05-29 12:04 ivan Note Added: 0001149
2009-05-29 12:05 ivan Status confirmed => assigned
2009-05-29 12:05 ivan Assigned To => ivan
2009-05-29 14:03 ivan Note Edited: 0001149
2009-05-29 14:06 ivan Note Added: 0001150
2009-05-29 14:06 ivan Status assigned => resolved
2009-05-29 14:06 ivan Fixed in Version => Current SVN
2009-07-11 11:10 ivan Relationship added related to 0000765
2009-08-16 13:16 ivan Fixed in Version Current SVN => 3.50
2009-08-16 14:39 ivan Note Added: 0001660
2009-08-16 14:39 ivan Status resolved => closed


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker