View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19072 | Bug reports | _ Unknown | public | 2023-09-07 12:10 | 2023-09-18 09:10 |
Reporter | dcastro | Assigned To | DenisChenu | ||
Priority | low | Severity | crash | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.2.x | ||||
Summary | 19072: CDbException [Microsoft][ODBC Driver 18 for SQL Server]COUNT field incorrect or syntax error. Select Count | ||||
Description | I have upgraded the platform from 3.22 to 6.2.1 and now i´m getting an error CDbException when i try to execute this query: "... | ||||
Steps To Reproduce | This error occurs when I make a statement with filter in the survey menu | ||||
Tags | No tags attached. | ||||
Bug heat | 10 | ||||
Complete LimeSurvey version number (& build) | 6.2.6 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | Google Chrome | ||||
Database type & version | SqlServer 2016 | ||||
Server OS (if known) | |||||
Webserver software & version (if known) | |||||
PHP Version | 8.0.29 | ||||
We don't really have the resources to debug and fix SQL Server issues, but feel free to apply a pull request with the solution. |
|
What is the DB version in the database when this issue happen ? |
|
|
|
The DBVersion is 614. Sorry the "where" is not correct, the correct one is: WHERE (t.gsid=:gsid OR parentGroup2.gsid=:gsid OR parentGroup3.gsid=:gsid OR parentGroup4.gsid=:gsid OR parentGroup5.gsid=:gsid). Bound with :gsid=8 |
|
OK : then surely on other SQL version : MS SQL didn't accept one param for multiple value. |
|
But if I run the same request with the ms sql client on the machine, the result is correct. /opt/mssql-tools18/bin/sqlcmd -S xxxxxxx -U xxxxxxx -P xxxxxx -C -q "SELECT COUNT(DISTINCT [t].[sid]) FROM [dbo].[lime_surveys] [t] LEFT JOIN lime_surveys_groups parentGroup1 ON t.gsid = parentGroup1.gsid LEFT JOIN lime_surveys_groups parentGroup2 ON parentGroup1.parent_id = parentGroup2.gsid LEFT JOIN lime_surveys_groups parentGroup3 ON parentGroup2.parent_id = parentGroup3.gsid LEFT JOIN lime_surveys_groups parentGroup4 ON parentGroup3.parent_id = parentGroup4.gsid LEFT JOIN lime_surveys_groups parentGroup5 ON parentGroup4.parent_id = parentGroup5.gsid LEFT OUTER JOIN [dbo].[lime_surveys_languagesettings] [correct_relation_defaultlanguage] ON ([correct_relation_defaultlanguage].[surveyls_language]=[t].[language]) AND ([correct_relation_defaultlanguage].[surveyls_survey_id]=[t].[sid]) LEFT OUTER JOIN [dbo].[lime_users] [owner] ON ([t].[owner_id]=[owner].[uid]) LEFT OUTER JOIN [dbo].[lime_surveys_groups] [surveygroup] ON ([t].[gsid]=[surveygroup].[gsid]) WHERE (t.gsid=8 OR parentGroup2.gsid=8 OR parentGroup3.gsid=8 OR parentGroup4.gsid=8 OR parentGroup5.gsid=8)"
(1 rows affected) |
|
Yes, but MSSQL didn't accept Need About
This is in version.php; i mean the current DBVersion set in database : lime_settings_global |
|
The version is 614 attached image with this |
|
But then : update done until end ? Then
What action ? All action ? and send the HTML produced here. |
|
Got it :) |
|
@dcastro : please apply the patch and test |
|
I have applied the patch and now everything works. Will this patch be incorporated into the code of the next version? Thanks. |
|
Hi @dcastro, thank you for confirming the fix. Yes, it will be a part of the next version. |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=35478 |
|
Fixed in Release 6.2.7+230918 |
|
LimeSurvey: master ea588db9 2023-09-14 17:53 Committer: GitHub Details Diff |
Fixed issue 19072: CDbException with Microsoft SQL Server (#3431) Dev: MSSQL didn't allow one param for multiple value Dev: create 5 different params Co-authored-by: Denis Chenu <shnoulle@localhost.localdomain> |
Affected Issues 19072 |
|
mod - application/models/Survey.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-09-07 12:10 | dcastro | New Issue | |
2023-09-07 12:39 | ollehar | Priority | none => low |
2023-09-07 13:21 | ollehar | Note Added: 76894 | |
2023-09-07 13:21 | ollehar | Bug heat | 0 => 2 |
2023-09-07 16:24 | DenisChenu | Note Added: 76900 | |
2023-09-07 16:24 | DenisChenu | Bug heat | 2 => 4 |
2023-09-07 16:24 | DenisChenu | Note Added: 76901 | |
2023-09-08 08:11 | dcastro | Note Added: 76912 | |
2023-09-08 08:11 | dcastro | Bug heat | 4 => 6 |
2023-09-08 08:54 | DenisChenu | Note Added: 76913 | |
2023-09-08 10:25 | dcastro | Note Added: 76914 | |
2023-09-08 10:44 | DenisChenu | Note Added: 76915 | |
2023-09-08 14:29 | dcastro | Note Added: 76920 | |
2023-09-08 14:29 | dcastro | File Added: DBVersion_limesurvey.jpg | |
2023-09-08 16:11 | DenisChenu | Note Added: 76924 | |
2023-09-08 16:13 | DenisChenu | Assigned To | => DenisChenu |
2023-09-08 16:13 | DenisChenu | Status | new => assigned |
2023-09-08 16:13 | DenisChenu | Note Added: 76925 | |
2023-09-08 16:22 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2023-09-08 16:22 | DenisChenu | Status | assigned => ready for code review |
2023-09-08 16:22 | DenisChenu | Note Added: 76926 | |
2023-09-08 16:23 | DenisChenu | Note Added: 76927 | |
2023-09-11 08:45 | dcastro | Note Added: 76935 | |
2023-09-14 14:09 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-09-14 14:09 | gabrieljenik | Status | ready for code review => ready for testing |
2023-09-14 15:12 | DenisChenu | Assigned To | DenisChenu => tibor.pacalat |
2023-09-14 15:12 | DenisChenu | Status | ready for testing => ready for merge |
2023-09-14 15:54 | tibor.pacalat | Status | ready for merge => resolved |
2023-09-14 15:54 | tibor.pacalat | Resolution | open => fixed |
2023-09-14 15:55 | tibor.pacalat | Note Added: 77046 | |
2023-09-14 15:55 | tibor.pacalat | Bug heat | 6 => 8 |
2023-09-14 16:15 | DenisChenu | Changeset attached | => LimeSurvey master ea588db9 |
2023-09-14 16:15 | DenisChenu | Note Added: 77047 | |
2023-09-14 16:15 | DenisChenu | Assigned To | tibor.pacalat => DenisChenu |
2023-09-18 09:10 | LimeBot | Note Added: 77086 | |
2023-09-18 09:10 | LimeBot | Status | resolved => closed |
2023-09-18 09:10 | LimeBot | Bug heat | 8 => 10 |