MantisBT

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005536ATutorUpgradingpublic2014-09-19 14:392016-01-01 09:59
Reportergreg 
Assigned Togreg 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version2.2 
Summary0005536: Upgrade from 2.1 to 2.2 DB error
DescriptionThere have been a couple posts regarding db connect errors when upgrading from v2.1 to 2.2

http://www.atutor.ca/view/7/24848/1.html [^]
TagsNo tags attached.
Affects versionSVN
SVN Revision#
Attached Files

- Relationships

-  Notes
(0006990)
greg (administrator)
2014-09-20 11:19
edited on: 2014-09-20 11:23

The problem is the query at line 226 in include/classes/sqlutility.class.php expect $result to return the number of affected rows, but the ALTER statement does not return any affected_rows, always returning 0. Thus when an ALTER statement is run the conditions that follow think the query has failed, when infact it was successful.

See line
https://github.com/atutor/ATutor/blob/master/include/classes/sqlutility.class.php#L226-L227 [^]

Another means is needed to determine if the ALTER statement was run successfully.

(0006991)
greg (administrator)
2014-09-20 11:56

Change
if($result > 0){

to

if(queryDB($prefixed_query[0], array()) !== false){
(0006992)
greg (administrator)
2014-09-20 12:01

replaced test on $result with test of false on queryDB() ALTER query

Updated 2.2 bundle released, replacing the previous 2.2 bundle on sourceforge
(0007172)
greg (administrator)
2016-01-01 09:59

closed for 2.2.1

- Related Changesets
ATutor: master c62d8393
Timestamp: 2014-09-20 12:00:12
Author: atutor
Details ] Diff ]
5536 replace test on with test of false on queryDB() ALTER query
mod - include/classes/sqlutility.class.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-09-19 14:39 greg New Issue
2014-09-20 11:19 greg Note Added: 0006990
2014-09-20 11:22 greg Note Edited: 0006990 View Revisions
2014-09-20 11:23 greg Note Edited: 0006990 View Revisions
2014-09-20 11:56 greg Note Added: 0006991
2014-09-20 12:01 greg SVN Revision# => f70b9ff..c62d839 master -> master
2014-09-20 12:01 greg Note Added: 0006992
2014-09-20 12:01 greg Status new => resolved
2014-09-20 12:01 greg Fixed in Version => 2.2
2014-09-20 12:01 greg Resolution open => fixed
2014-09-20 12:01 greg Assigned To => greg
2014-09-20 12:02 greg Changeset attached => ATutor master c62d8393
2015-09-18 19:43 anonymous SVN Revision# f70b9ff..c62d839 master -> master =>
2016-01-01 09:59 greg Note Added: 0007172
2016-01-01 09:59 greg Status resolved => closed


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker