In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1201 [In-Portal CMS] Install / Upgrages bug report always 2012-02-01 14:16 2012-07-25 05:31
Dmitry  
alex  
normal  
closed 5.1.0  
fixed  
 
none 5.2.0-B2  
https://groups.google.com/d/topic/in-portal-bugs/lY-iH4s5BWs/discussion
Fixed Fatal error during Installation on States import with MySQL in Strict Mode
1
0001201: Fatal error during Installation on States import with MySQL in Strict Mode
On 2nd Installation STEP SQL error due to MySQL being in Strict Mode (default in Windows)

" Error: (1364) Field 'l1_Name' doesn't have a default value

Last Database Query:
INSERT INTO CountryStates (CountryStateId, Type, StateCountryId,
IsoCode, ShortIsoCode) VALUES
(1, 1, NULL, 'AFG', 'AF'),
(2, 1, NULL, 'ALB', 'AL'),
(3, 1, NULL, 'DZA', 'DZ'),
(4, 1, NULL, 'ASM', 'AS'),
(5, 1, NULL, 'AND', 'AD'),
(6, 1, NULL, 'AGO', 'AO'),
(7, 1, NULL, 'AIA', 'AI'),
(8, 1, NULL, 'ATA', 'AQ'),
(9, 1, NULL, 'ATG', 'AG'),
(10, 1, NULL, 'ARG', 'AR'),
(11, 1, NULL, 'ARM', 'AM'),
(12, 1, NULL, 'ABW', 'AW'),
(13, 1, NULL, 'AUS', 'AU'),
(14, 1, NULL, 'AUT', 'AT'),
(15, 1, NULL, 'AZE', 'AZ'),
.....
(308, 2, 225, 'AZ', NULL),
(307, 2, 225, 'AK', NULL),
(306, 2, 225, 'AL', NULL)


Additionally, all developers agreed to enable MYSQL STRICT mode by default via DBG during project development.
My System is:
In-Portal version: in-portal_5_2_0_B1
MySQL Server version: 5.1.45
MySQL client version: 5.1.11
OS: Windows web Server2008
IIS: 6.0 SP1
PHP version: php-5.2.6-nts-Win32
related to 0000948closed  (5.2.0)alex In-Portal CMS Change in "Forgot Password" logic 
related to 0000645closed  (5.2.0)alex In-Portal CMS User / Group Access restriction by IP 
related to 0000964closed  (5.2.0)alex In-Portal CMS Improvements to user Login field 
related to 0000058closed  (5.2.0)alex In-Portal CMS Add Timezone Field to User record 
related to 0000279closed  (5.1.0)alex In-Portal CMS Phrases of state and country names 
related to 0001050closed  (5.2.0)!COMMUNITY In-Portal CMS Ability to access Disabled Section with Direct Link 
related to 0000883closed  (5.2.0)alex In-Portal CMS Site domain-based agents 
related to 0001126closed  (5.2.0)Dmitry In-Commerce Implement Smart Filters 
related to 0001129closed  (5.2.0)alex In-Portal CMS Report Review 
related to 0000107closed  (5.1.0)alex In-Portal CMS Implement "MemCached" functionality 
related to 0000950closed  (5.2.0)alex In-Portal CMS Log CURL requests to database table instead of file 
patch sql_error_on_install_520b1.patch (8,104) 2012-02-06 04:15
http://tracker.in-portal.org/file_download.php?file_id=1505&type=bug
patch invalid_integer_value_fix.patch (452) 2012-02-07 08:32
http://tracker.in-portal.org/file_download.php?file_id=1507&type=bug
Issue History
2012-07-25 05:31 alex Note Added: 0004978
2012-07-25 05:31 alex Status resolved => closed
2012-02-07 08:36 alex Note Added: 0004450
2012-02-07 08:33 alex Changeset attached 5.2.x r15107
2012-02-07 08:32 alex File Added: invalid_integer_value_fix.patch
2012-02-06 04:19 alex Note Added: 0004447
2012-02-06 04:19 alex Status reviewed and tested => resolved
2012-02-06 04:19 alex Fixed in Version => 5.2.0-B2
2012-02-06 04:19 alex Resolution open => fixed
2012-02-06 04:19 alex Assigned To !COMMUNITY => alex
2012-02-06 04:19 alex Changeset attached 5.2.x r15105
2012-02-06 04:19 alex Note Added: 0004446
2012-02-06 04:19 alex Status needs testing => reviewed and tested
2012-02-06 04:18 alex Note Edited: 0004445 bug_revision_view_page.php?bugnote_id=0004445#r975
2012-02-06 04:16 alex Note Added: 0004445
2012-02-06 04:16 alex Assigned To => !COMMUNITY
2012-02-06 04:16 alex Developer => alex
2012-02-06 04:16 alex Status active => needs testing
2012-02-06 04:15 alex File Added: sql_error_on_install_520b1.patch
2012-02-06 04:09 alex Relationship added related to 0000950
2012-02-06 04:09 alex Relationship added related to 0000107
2012-02-06 04:08 alex Relationship added related to 0001129
2012-02-06 04:07 alex Relationship added related to 0001126
2012-02-06 04:07 alex Relationship added related to 0000883
2012-02-06 04:06 alex Relationship added related to 0001050
2012-02-06 04:06 alex Relationship added related to 0000279
2012-02-06 04:05 alex Relationship added related to 0000058
2012-02-06 04:04 alex Relationship added related to 0000964
2012-02-06 04:03 alex Relationship added related to 0000645
2012-02-06 04:02 alex Estimate Points 0 => 1
2012-02-06 04:02 alex Description Updated bug_revision_view_page.php?rev_id=973#r973
2012-02-06 04:02 alex Relationship added related to 0000948
2012-02-01 14:16 Dmitry New Issue
2012-02-01 14:16 Dmitry Reference => https://groups.google.com/d/topic/in-portal-bugs/lY-iH4s5BWs/discussion
2012-02-01 14:16 Dmitry Change Log Message => Fixed Fatal error during Installation on States import with MySQL in Strict Mode
2012-02-01 14:16 Dmitry Estimate Points => 0

Notes
(0004445)
alex   
2012-02-06 04:16   
(edited on: 2012-02-06 04:18)
As you can see majority of STRICT MODE incompatible SQLs were added in 5.2.0-B1 version, but CountryStates SQL that is mentioned in task description was there since 5.1.0 version.

I've also found, that creating VARCHAR NOT NULL column without specifying DEFAULT value would result in such error (http://forums.mysql.com/read.php?10,361859,361862#msg-361862).

This problem is caused by phpMyAdmin script, that we're using, since it creates VARCHAR columns by default this way.

(0004446)
alex   
2012-02-06 04:19   
Will test all together later.
(0004447)
alex   
2012-02-06 04:19   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0001201: Fatal error during Installation on States import with MySQL in Strict Mode
(0004450)
alex   
2012-02-07 08:36   
Patch "invalid_integer_value_fix.patch" fixes SQL error on module approve/decline because ID field in Modules table is string, while MasterId field in ChangeLogs table, where it was inserted is integer.
(0004978)
alex   
2012-07-25 05:31   
Since 5.2.0 version was released.