View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
14135Bug reportsStatisticspublic2019-04-30 09:10
Reportersonerkaya Assigned Todominikvitt 
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.13.x 
Fixed in Version3.15.x 
Summary14135: Auswertung der Umfrage generiert einen Abfragefehler
Description

Bei der Berechnung der Summe, Durchschnitt und Maximum kommen Zahlen vor mit 9 Stellen vor Komma. Die Abfrage ist jedoch limitiert auf 10.6 bzw. vor Komma 4 Stellen.

DB Abfrage auf die Umfragen:

limesurveydb=> select "853874X100X1330" from lime_survey_853874;
853874X100X1330

797507866.0000000000
432447463.0000000000
432597859.0000000000
442916575.0000000000
(…)

Die Spalte hat folgenden Datentyp:
853874X100X1330 numeric(30,10)

Fehlermeldung bei der Abfrage:

2018-09-27 08:41:56.826 CEST - 73 - 8519 - 160.63.237.161 - limesurveyowner@limesurveydb ERROR: numeric field overflow
2018-09-27 08:41:56.826 CEST - 74 - 8519 - 160.63.237.161 - limesurveyowner@limesurveydb DETAIL: A field with precision 10, scale 6 must round to an absolute value less than 10^4.
2018-09-27 08:41:56.826 CEST - 75 - 8519 - 160.63.237.161 - limesurveyowner@limesurveydb STATEMENT: SELECT STDDEV(CAST("853874X100X1330" AS DECIMAL(10,6))) as stdev, SUM(CAST("853874X100X1330" AS DECIMAL(10,6))) as sum, AVG(CAST("853874X100X1330" AS DECIMAL(10,6))) as average, MIN(CAST("853874X100X1330" AS DECIMAL(10,6))) as minimum, MAX(CAST("853874X100X1330" AS DECIMAL(10,6))) as maximum FROM lime_survey_853874 WHERE "853874X100X1330" IS NOT NULL

Kann bei der Abfrage Einfluss auf die CAST Funktion genommen werden?

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)limesurvey3.14.6+180821
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgreSQL 10.5
Server OS (if known)Windows Server 2016
Webserver software & version (if known)IIS 10
PHP VersionPHP 7.1.19

Users monitoring this issue

There are no users monitoring this issue.

Activities

Mazi

Mazi

2019-01-08 10:50

updater   ~50125

A short translation: When calculating sum, avg or max for the statistics, numeric values can have 9 digits before the comma/separator but the query is limited to (10,6) which only includes 4 digits, see error message: "A field with precision 10, scale 6 must round to an absolute value less than 10^4."

I assume this is easy to fix by adjusting the CAST function?!

dominikvitt

dominikvitt

2019-01-09 13:32

developer   ~50134

https://github.com/LimeSurvey/LimeSurvey/commit/745fa58e35ab75bb9503baed806ac4496ca3b23c

guest

guest

2019-01-15 09:27

viewer   ~50199

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

Related Changesets

LimeSurvey: master 745fa58e

2019-01-09 13:21:12

Dominik Vitt

Details Diff
Fixed issue 14135: Evaluation of survey statistics generates a query error when using PostgreSQL DB server Affected Issues
14135
mod - application/helpers/admin/statistics_helper.php Diff File

Issue History

Date Modified Username Field Change
2018-10-08 14:43 sonerkaya New Issue
2018-10-08 14:43 sonerkaya Status new => assigned
2018-10-08 14:43 sonerkaya Assigned To => markusfluer
2019-01-08 10:46 c_schmitz Assigned To markusfluer => dominikvitt
2019-01-08 10:47 c_schmitz Category LimeSurvey Website => Statistics
2019-01-08 10:50 Mazi Note Added: 50125
2019-01-09 13:32 dominikvitt Status assigned => resolved
2019-01-09 13:32 dominikvitt Resolution open => fixed
2019-01-09 13:32 dominikvitt Fixed in Version => 3.15.x
2019-01-09 13:32 dominikvitt Note Added: 50134
2019-01-15 09:27 Changeset attached => LimeSurvey master 745fa58e
2019-01-15 09:27 guest Note Added: 50199
2019-04-30 09:10 c_schmitz Status resolved => closed