In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
1002 [In-Portal CMS] Database bug report always 2011-02-14 11:59 2011-03-30 09:53
alex  
alex  
normal  
closed 5.1.2-B1  
fixed  
 
none 5.1.2-RC1  
https://groups.google.com/d/topic/in-portal-bugs/Geuk3rup1ys/discussion
Fixes critical database error processing
0
0001002: Process critical database errors even when debug mode is off
If any error will happen during database query execution, then:
* in debug mode: fatal error will be raised and script execution stops
* in non-debug mode: warning is raised and script continues to execute

It works pretty well actually, since (as we thought before) no MySQL error could be important enough to stop script execution for regular users (not developers).

We was wrong actually, since these errors require reconnecting to MySQL server to fix them:
* #2006 - MySQL server has gone away
* #2013 - Lost connection to MySQL server during query


In case on of these errors will happen during database query execution, then we should:
1. disconnect and connect to MySQL again
2. try to run database query that raised an error
3. do 3 retries and if we still got an error, then

- act the same as before
OR
- die?
child of 0000953closed  (5.1.2)alex Incorrect database query error reporting 
patch processing_of_mysql_has_gone_away_error.patch (5,178) 2011-02-18 02:13
http://tracker.in-portal.org/file_download.php?file_id=951&type=bug
patch improved_db_error_processing.patch (5,794) 2011-02-18 02:17
http://tracker.in-portal.org/file_download.php?file_id=952&type=bug
Issue History
2011-03-30 09:53 Dmitry Note Added: 0003321
2011-03-30 09:53 Dmitry Status resolved => closed
2011-02-19 06:16 alex Note Added: 0003279
2011-02-19 06:16 alex Status reviewed and tested => resolved
2011-02-19 06:16 alex Fixed in Version => 5.1.2-RC1
2011-02-19 06:16 alex Resolution open => fixed
2011-02-19 06:16 alex Assigned To !COMMUNITY => alex
2011-02-19 06:16 alex Changeset attached 5.1.x r14236
2011-02-18 16:57 Dmitry Note Added: 0003276
2011-02-18 16:57 Dmitry Status needs testing => reviewed and tested
2011-02-18 02:19 alex Note Added: 0003273
2011-02-18 02:19 alex Assigned To => !COMMUNITY
2011-02-18 02:19 alex Developer => alex
2011-02-18 02:19 alex Status active => needs testing
2011-02-18 02:17 alex File Added: improved_db_error_processing.patch
2011-02-18 02:16 alex Note Added: 0003272
2011-02-18 02:16 alex Target Version Icebox => 5.1.2
2011-02-18 02:13 alex Relationship added child of 0000953
2011-02-18 02:13 alex File Added: processing_of_mysql_has_gone_away_error.patch
2011-02-14 11:59 alex New Issue
2011-02-14 11:59 alex Reference => https://groups.google.com/d/topic/in-portal-bugs/Geuk3rup1ys/discussion
2011-02-14 11:59 alex Change Log Message => Fixes critical database error processing

Notes
(0003272)
alex   
2011-02-18 02:16   
Moving to 5.1.2, since it's database error handing and catching an error, when it happens is a high priority.
(0003273)
alex   
2011-02-18 02:19   
By testing "improved_db_error_processing.patch" file you'll be testing both this 0001002 and 0000953 tasks.
(0003276)
Dmitry   
2011-02-18 16:57   
Patch with functionalities tested good and can be committed into 5.1.2-RC1.
(0003279)
alex   
2011-02-19 06:16   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0001002: Process critical database errors even when debug mode is off
(0003321)
Dmitry   
2011-03-30 09:53   
Closing, since 5.1.2 release has been released.