View Issue Details

This bug affects 3 person(s).
 26
IDProjectCategoryView StatusLast Update
17831Bug reportsInstallationpublic2022-01-18 10:46
Reporteraxel_m Assigned Toc_schmitz  
PrioritynoneSeveritycrash 
Status closedResolutionfixed 
Product Version5.2.x 
Summary17831: Database error when upgrading from 2.0.6 to 5.2.9
Description

When installing 5.2.9 the database needs to be upgraded from version 183 to 479. However last upgrade step (from version 478 to 479) throws an the following error (translated from German):

"An error occured during the database update. Error information:
CDbCommand could not execute the SQL statement: SQLSTATE[07002]: [Microsoft][ODBC Driver 17 for SQL Server]COUNT field incorrect or syntax error

File C:\inetpub\limesurvey\application\helpers\update\updatedb_helper.php, line 5047."

Steps To Reproduce

Steps to reproduce

Expected result

Database should be upgraded to the latest version

Actual result

Database upgrade fails. Any subsequent attempt fails, too.

TagsNo tags attached.
Bug heat26
Complete LimeSurvey version number (& build)limesurvey5.2.9+220110
I will donate to the project if issue is resolvedNo
BrowserGoogle Chrome
Database type & versionMicrosoft SQL Server 2017 (14.0.3022.28)
Server OS (if known)Microsoft Windows 2012 R2
Webserver software & version (if known)Microsoft IIS 8
PHP Version7.4.27

Users monitoring this issue

axel_m, xxJJxx

Activities

xxJJxx

xxJJxx

2022-01-13 08:47

reporter   ~67989

Ich schließe mich diesem Problem an. Ich habe das Problem von Version 5.2.6 auf 5.2.9 / DB 478 -> 479 siehe Bild.

ollehar

ollehar

2022-01-13 12:01

administrator   ~67990

Great, thanks for the report. We'll have a look.

ollehar

ollehar

2022-01-13 12:09

administrator   ~67991

Hm, I see 5047 has this line of code:

            $oDB->createCommand()->update("{{question_themes}}", $baseQuestionThemeEntry, 'name=:name', [':name' => $baseQuestionThemeEntry['name']]);

But no COUNT statement.

c_schmitz

c_schmitz

2022-01-13 12:55

administrator   ~67992

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=33096

c_schmitz

c_schmitz

2022-01-13 12:58

administrator   ~67993

Last edited: 2022-01-13 12:58

You can apply the fix ( see https://github.com/LimeSurvey/LimeSurvey/commit/a3dda2b515babc7fae9a349ae500a03dd8e9f484 ) manually and the update should complete after that without problems.

axel_m

axel_m

2022-01-13 13:25

reporter   ~67995

Looks perfect! Thank you very much!

LimeBot

LimeBot

2022-01-18 10:46

administrator   ~68039

Fixed in Release 5.2.10+220118

Related Changesets

LimeSurvey: master a3dda2b5

2022-01-13 13:54

c_schmitz


Details Diff
Fixed issue 17831: Database error when upgrading from 2.0.6 to 5.2.9 when using MSSQL Affected Issues
17831
mod - application/helpers/update/updatedb_helper.php Diff File

Issue History

Date Modified Username Field Change
2022-01-12 23:34 axel_m New Issue
2022-01-13 08:47 xxJJxx Note Added: 67989
2022-01-13 08:47 xxJJxx File Added: Unbenannt.JPG
2022-01-13 08:47 xxJJxx Bug heat 0 => 2
2022-01-13 10:37 xxJJxx File Deleted: Unbenannt.JPG
2022-01-13 10:40 xxJJxx Issue Monitored: xxJJxx
2022-01-13 10:40 xxJJxx Bug heat 2 => 4
2022-01-13 10:41 xxJJxx Bug heat 4 => 10
2022-01-13 11:15 axel_m Issue Monitored: axel_m
2022-01-13 11:15 axel_m Bug heat 10 => 12
2022-01-13 12:01 ollehar Note Added: 67990
2022-01-13 12:01 ollehar Bug heat 12 => 14
2022-01-13 12:09 ollehar Note Added: 67991
2022-01-13 12:55 c_schmitz Changeset attached => LimeSurvey master a3dda2b5
2022-01-13 12:55 c_schmitz Note Added: 67992
2022-01-13 12:55 c_schmitz Bug heat 14 => 16
2022-01-13 12:55 c_schmitz Assigned To => c_schmitz
2022-01-13 12:55 c_schmitz Resolution open => fixed
2022-01-13 12:57 c_schmitz Status new => resolved
2022-01-13 12:58 c_schmitz Note Added: 67993
2022-01-13 12:58 c_schmitz Note Edited: 67993
2022-01-13 13:09 guest Bug heat 16 => 22
2022-01-13 13:25 axel_m Note Added: 67995
2022-01-13 13:25 axel_m Bug heat 22 => 24
2022-01-18 10:46 LimeBot Note Added: 68039
2022-01-18 10:46 LimeBot Status resolved => closed
2022-01-18 10:46 LimeBot Bug heat 24 => 26