View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
04415 | Bug reports | Import/Export | public | 2010-06-11 15:53 | 2010-07-17 17:25 |
Reporter | Matijs | Assigned To | c_schmitz | ||
Priority | normal | Severity | block | ||
Status | closed | Resolution | fixed | ||
Product Version | 1.90b | ||||
Fixed in Version | 1.90RC3 | ||||
Summary | 04415: Import of survey times out | ||||
Description | When importing a CSV survey the page would time ut - while the database got terribly busy. | ||||
Steps To Reproduce | Import any survey. | ||||
Additional Information | The function GetNewSurveyID expected to get a NULL back instead of FALSE when GetOne() finds no data. Diff file included. | ||||
Tags | No tags attached. | ||||
Attached Files | importsurvey.php.diff (754 bytes)
Index: importsurvey.php =================================================================== --- importsurvey.php (revision 8829) +++ importsurvey.php (working copy) @@ -1680,7 +1680,7 @@ { global $connect, $dbprefix; $isresult = $connect->GetOne("SELECT sid FROM {$dbprefix}surveys WHERE sid=$oldsid"); - if (!is_null($isresult)) + if (false !== $isresult) { // Get new random ids until one is found that is not used do @@ -1688,7 +1688,7 @@ $newsid = getRandomID(); $isresult = $connect->GetOne("SELECT sid FROM {$dbprefix}surveys WHERE sid=$newsid"); } - while (!is_null($isresult)); + while (false !== $isresult); return $newsid; } else | ||||
Bug heat | 8 | ||||
Complete LimeSurvey version number (& build) | 1.90 | ||||
I will donate to the project if issue is resolved | |||||
Browser | |||||
Database type & version | MySQL 5.1 | ||||
Server OS (if known) | Windows | ||||
Webserver software & version (if known) | IIS | ||||
PHP Version | 5.2 + 5.3 | ||||
I am sorry but the patch is bogus. http://phplens.com/lens/adodb/docs-adodb.htm#getone it is supposed to return Null if the record is not found. Which DB driver are you using? |
|
Probably mysqli which returns false... adodb for mysqli seems to be a little buggy. So mysql does false on error, null on empty while mysqli does only false. |
|
Ah sorry. I didn't know adodb was from a separate project. I'll bump the bug to them and create a new temprary patch that fixes the mysqli driver. (I will do this somewhen next week.) |
|
Matijs, how about it? |
|
"I'll bump the bug to them" -> maybe you can add the link to the ticket here so we can follow progress. Thanks! |
|
http://phplens.com/lens/lensforum/msgs.php?id=18407 I patched our packaged class accodingly. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2010-06-11 15:53 | Matijs | New Issue | |
2010-06-11 15:53 | Matijs | Status | new => assigned |
2010-06-11 15:53 | Matijs | Assigned To | => user372 |
2010-06-11 15:53 | Matijs | File Added: importsurvey.php.diff | |
2010-06-16 22:08 | c_schmitz | Assigned To | user372 => c_schmitz |
2010-06-16 22:09 | c_schmitz | Note Added: 12230 | |
2010-06-16 22:10 | c_schmitz | Note Edited: 12230 | |
2010-06-16 22:10 | c_schmitz | Status | assigned => feedback |
2010-06-17 09:17 | mdekker | Note Added: 12244 | |
2010-06-17 09:21 | mdekker | Note Edited: 12244 | |
2010-06-17 12:51 | Matijs | Note Added: 12247 | |
2010-06-17 12:51 | Matijs | Status | feedback => assigned |
2010-06-29 20:37 | c_schmitz | Note Added: 12311 | |
2010-06-29 20:37 | c_schmitz | Status | assigned => feedback |
2010-06-29 20:39 | c_schmitz | Priority | urgent => normal |
2010-07-13 02:18 | Mazi | Note Added: 12396 | |
2010-07-17 17:25 | c_schmitz | Note Added: 12441 | |
2010-07-17 17:25 | c_schmitz | Status | feedback => closed |
2010-07-17 17:25 | c_schmitz | Resolution | open => fixed |
2010-07-17 17:25 | c_schmitz | Fixed in Version | => 1.90RC3 |