MantisBT - TestLink
View Issue Details
0008670TestLink0 - User too Lazy to analize defined categoriespublic2019-05-21 13:182019-11-21 16:52
stef-lhm 
fman 
normalmajoralways
assignedopen 
1.9.19 (2019 Q1) 
 
MySQL
5.6.25
TBD
0008670: Full text search - DB Access Error - Data too long for column 'Dirty'
No matter what i am searching for, i get an DB Access Error on full test search always.

This is the entry in userlog: (i think the number of testcases could be a problem) We are now at a point, where the number of users and testcases leeds up to more and more errors in TestLink.


[19/May/21 12:27:49][ERROR][5e3869771811c14245bd190db289265d][DATABASE]
ERROR ON exec_query() - database.class.php
1406 - Data too long for column 'Dirty' at row 1 - SELECT LVN.testcase_id,



Query failed: errorcode[1406]
    errormsg:Data too long for column 'Dirty' at row 1
No tags attached.
related to 0008674resolved fman Configuration option to exclude use of UDFStripHTMLTags() 
txt x.txt (27,257) 2019-05-23 21:09
http://mantis.testlink.org/file_download.php?file_id=5156&type=bug
Issue History
2019-05-21 13:18stef-lhmNew Issue
2019-05-21 17:39fmanNote Added: 0028847
2019-05-23 21:07fmanQA Team - Task Workflow Status => TBD
2019-05-23 21:07fmanDescription Updatedbug_revision_view_page.php?rev_id=5843#r5843
2019-05-23 21:08fmanDescription Updatedbug_revision_view_page.php?rev_id=5844#r5844
2019-05-23 21:09fmanFile Added: x.txt
2019-05-23 21:10fmanNote Added: 0028852
2019-05-23 21:11fmanNote Added: 0028853
2019-05-23 21:11fmanNote Edited: 0028853bug_revision_view_page.php?bugnote_id=28853#r5846
2019-05-23 21:16fmanNote Added: 0028854
2019-05-23 21:16fmanSummaryFull text search - DB Access Error => Full text search - DB Access Error - Data too long for column 'Dirty'
2019-05-23 21:17fmanAssigned To => fman
2019-05-23 21:17fmanStatusnew => feedback
2019-05-24 10:22stef-lhmNote Added: 0028860
2019-05-24 10:22stef-lhmStatusfeedback => assigned
2019-05-24 12:57fmanNote Added: 0028861
2019-05-27 06:57stef-lhmNote Added: 0028870
2019-05-27 07:05fmanNote Added: 0028871
2019-05-27 07:15stef-lhmNote Added: 0028873
2019-05-28 17:47fmanRelationship addedrelated to 0008674
2019-05-29 08:05stef-lhmNote Added: 0028883
2019-11-21 16:52hejuNote Added: 0029308

Notes
(0028847)
fman   
2019-05-21 17:39   
issue is related to amount of test cases, that creates a very big IN CLAUSE

I'm going to refactor it
(0028852)
fman   
2019-05-23 21:10   
Issue is related to the Dirty column in the UDF.
(0028853)
fman   
2019-05-23 21:11   
Please can you change the function definition in your db?
CREATE DEFINER=`root`@`localhost` FUNCTION `UDFStripHTMLTags`
(Dirty varchar(40000)) RETURNS varchar(40000)  CHARSET utf8
BEGIN
DECLARE iStart, iEnd, iLength int;
   WHILE Locate( '<', Dirty ) > 0 And Locate( '>', Dirty, Locate( '<', Dirty )) > 0 DO
      
BEGIN
        SET iStart = Locate( '<', Dirty ), iEnd = Locate( '>', Dirty, Locate('<', Dirty ));
        
SET iLength = ( iEnd - iStart) + 1;
        IF iLength > 0 THEN
          BEGIN
            SET Dirty = Insert( Dirty, iStart, iLength, '');
          END;
        END IF;
      END;
    END WHILE;
RETURN Dirty;
END;


(0028854)
fman   
2019-05-23 21:16   
Please use the script provided in the file:
testlink_create_udf0.sql

and do the changes there

please provide feedback
(0028860)
stef-lhm   
2019-05-24 10:22   
do i understand you correct? I should change the install/sql/mysql/testlink_create_udf0.sql with the "40000" instead of "4000"?
and than? should i start that script or should i just retry?
(0028861)
fman   
2019-05-24 12:57   
you need to take the text present in : testlink_create_udf0.sql
change 4000 with 40000
execute in mysql with CREATE OR REPLACE ...

then retry

The issue does not seem to be related to test case qty but to the size of data present in some TEXT fields like summary, preconditions, etc
(0028870)
stef-lhm   
2019-05-27 06:57   
the result is:
ERROR 1074 (42000): Column length too big for column '' (max = 21845);
use BLOB or TEXT instead
(0028871)
fman   
2019-05-27 07:05   
Hi

would you mind to provide your MySQL version?
(0028873)
stef-lhm   
2019-05-27 07:15   
5.7.25
(0028883)
stef-lhm   
2019-05-29 08:05   
https://github.com/TestLinkOpenSourceTRMS/testlink-code/commit/2d8b518a6de15ab97f102e86e50dba64fc89ec28 [^]

works fine.

thanx a lot
(0029308)
heju   
2019-11-21 16:52   
hi @stef-lhm,

had the same issue with recent TL version from git (including the commit above).

As well I saw the following error when changing the db:
ERROR 1074 (42000): Column length too big for column '' (max = 21845);
use BLOB or TEXT instead

In the end I replaced the varchar type for function in and output to TEXT in the db. Now the search works w/o problems.

Did you do this as well?