View Issue Details

This bug affects 1 person(s).
IDProjectCategoryView StatusLast Update
18614Bug reportsInstallationpublic2023-02-02 18:07
Reporterriqcles Assigned To 
Status newResolutionopen 
Product Version5.5.x 
Summary18614: lime_questions ERROR: Value '27373432210' is out of bounds for type integer at character 52

I logged into my database to see what's wrong when I perform the data integrity test.

I did the following to select tables:

select 'DROP TABLE ' AS constant1 ,
-- substr(table_name,24, 4) as "year",
-- substr(table_name,28, 2) as "month",
-- substr(table_name,29, 2) as "day"
' WATERFALL; ' AS constant2

from information_schema.tables

where table_catalog = 'limesurvey'
and table_schema = 'public'
and table_type = 'BASE TABLE'
and tablename 'lime%_survey_9912%'

This works fine, and generates the list of affected tables for me....

But looking at the log file, we see that errors on the selection of the lime_questions table are present:

2023-02-02 11:12:27.075 CET [28495] ERROR: Value '28815429493' is out of bounds for type integer at character 52
2023-02-02 11:12:27.075 CET [28495] INSTRUCTION: SELECT * FROM "lime_questions" "t" WHERE "t".."qid"='28815429493' AND "t".."sid"=139916 LIMIT 1

the value for each line (if I have sub questions) exceeds the limit of the number of characters for the type integer.
I have 11 characters instead of 10 maximum.

Looking in more detail, I see that if in the code of the sub-question does not start with a letter (ex: SQ1) and that we only have numbers, the request will take the code of the sub-question which is a title, as the internal code of the subquestion.

Users imported a template questionnaire, which contained sub-questions with only numbers, and as they have a lot of duplicate questionnaires (2000 lines of errors with the sub-questions), the processing time during the integrity check data, then cleaning (which crashes for me) takes a long time.

Steps To Reproduce

Create a quiz with an array question
replace the code of the sub-question with several digits

Run data integrity test.

Go see the log on PostgreSQL server (or other).

TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)Version 5.4.5+221010
I will donate to the project if issue is resolvedNo
Database type & versionPostgresql 13
Server OS (if known)
Webserver software & version (if known)
PHP Version7.4.32


related to 16690 acknowledged Unable to use checkintegrity on big instance 
related to 17458 closedDenisChenu Check integrety broke with SQL error 

Users monitoring this issue

User List There are no users monitoring this issue.




2023-02-02 17:57


sous_questions.png (29,117 bytes)   
sous_questions.png (29,117 bytes)   
sous_questions_2.png (59,981 bytes)   
sous_questions_2.png (59,981 bytes)   
sous_questions_3.png (29,370 bytes)   
sous_questions_3.png (29,370 bytes)   

Issue History

Date Modified Username Field Change
2023-02-02 17:57 riqcles New Issue
2023-02-02 17:57 riqcles File Added: sous_questions.png
2023-02-02 17:57 riqcles File Added: sous_questions_2.png
2023-02-02 17:57 riqcles File Added: sous_questions_3.png
2023-02-02 18:06 DenisChenu Relationship added related to 16690
2023-02-02 18:07 DenisChenu Relationship added related to 17458