View Issue Details

This bug affects 1 person(s).
 4
IDProjectCategoryView StatusLast Update
09793Bug reportsInstallationpublic2015-07-29 13:05
Reporterfvanderstarre Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary09793: Token table upgrade to db version 179 goes wrong (mssql)
Description

After upgrading from db version 178 to 181, token table columns firstname, lastname, email and token are defined as "nvarchar(1)" in the database.

Steps To Reproduce

See above

Additional Information

updatedb_helper.php statements:
alterColumn($sTableName, 'email', "string(254)");
alterColumn($sTableName, 'firstname', "string(150)");
alterColumn($sTableName, 'lastname', "string(150)");
from function upgradeTokenTables179() and
"alterColumn($sTableName, 'token', "string(35) COLLATE SQL_Latin1_General_CP1_CS_AS");" (function upgradeTokenTables181()).
Statement executed against the database looks like: "ALTER TABLE [tokens_29964] ALTER COLUMN [firstname] nvarchar NULL". The length parameter is missing!
You may have to look at application\core\db\MssqlSchema.php?
Note: we are also using FreeTDS.

TagsNo tags attached.
Bug heat4
Complete LimeSurvey version number (& build)2.06+ 150629
I will donate to the project if issue is resolvedNo
BrowserAny
Database type & versionMS SQL server 2008 10.0.5500.0 (X64)
Server OS (if known)DB server: Windows NT 6.1 <X64> build 7601 SP1
Webserver software & version (if known)Linux RHEL 7, Apache 2.4.6
PHP Version5.4.43

Users monitoring this issue

There are no users monitoring this issue.

Activities

fvanderstarre

fvanderstarre

2015-07-24 11:54

reporter   ~32800

I am also wondering about this statement in updatedb_helper.php (function upgradeTokens179):
$oDB->createCommand("UPDATE {$sTableName} set email={$sSubstringCommand}email,1,254)")->execute();
Length of email column is set to 254 only AFTER this statement. What's the use?

c_schmitz

c_schmitz

2015-07-24 12:08

administrator   ~32802

This is already fixed in 150723

fvanderstarre

fvanderstarre

2015-07-24 13:40

reporter   ~32806

I'm sorry Carsten, but the issue does not seem to be fixed. I applied update 206plus_150723 (with modified version of updatedbhelper.php, see 09791), but got the same result: columns in table token.... with varchar(1) definition for email, token, firstname and lastname.

c_schmitz

c_schmitz

2015-07-24 16:19

administrator   ~32813

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

c_schmitz

c_schmitz

2015-07-24 16:28

administrator   ~32814

Fix committed to develop branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=15619

c_schmitz

c_schmitz

2015-07-29 13:05

administrator   ~32826

Version 2.06+ Build 150729 released

Related Changesets

LimeSurvey: master 8250f98f

2015-07-24 14:19:03

c_schmitz

Details Diff
Fixed issue 09793: Token table upgrade goes wrong on MSSQL Affected Issues
09793
mod - application/core/db/MssqlSchema.php Diff File

LimeSurvey: develop 852b0586

2015-07-24 14:27:55

c_schmitz

Details Diff
Fixed issue 09793: Token table upgrade goes wrong on MSSQL Affected Issues
09793
mod - application/core/db/SmartColumnTypeTrait.php Diff File

Issue History

Date Modified Username Field Change
2015-07-24 11:16 fvanderstarre New Issue
2015-07-24 11:46 c_schmitz Assigned To => sammousa
2015-07-24 11:46 c_schmitz Status new => assigned
2015-07-24 11:54 fvanderstarre Note Added: 32800
2015-07-24 12:08 c_schmitz Note Added: 32802
2015-07-24 12:08 c_schmitz Status assigned => closed
2015-07-24 12:08 c_schmitz Resolution open => fixed
2015-07-24 12:08 c_schmitz Fixed in Version => 2.06+
2015-07-24 12:09 c_schmitz Assigned To sammousa =>
2015-07-24 13:40 fvanderstarre Note Added: 32806
2015-07-24 13:40 fvanderstarre Status closed => feedback
2015-07-24 13:40 fvanderstarre Resolution fixed => reopened
2015-07-24 14:29 c_schmitz Assigned To => c_schmitz
2015-07-24 14:29 c_schmitz Status feedback => assigned
2015-07-24 16:19 c_schmitz Changeset attached => LimeSurvey master 8250f98f
2015-07-24 16:19 c_schmitz Note Added: 32813
2015-07-24 16:26 c_schmitz Status assigned => resolved
2015-07-24 16:26 c_schmitz Resolution reopened => fixed
2015-07-24 16:28 c_schmitz Changeset attached => LimeSurvey develop 852b0586
2015-07-24 16:28 c_schmitz Note Added: 32814
2015-07-29 13:05 c_schmitz Note Added: 32826
2015-07-29 13:05 c_schmitz Status resolved => closed