Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008111TestLinkDatabase MySQLpublic2017-10-16 19:002017-10-23 17:15
Reportertjosephine 
Assigned Tofman 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformLinuxOSMySQL serverOS Version5.6.21
Product Version1.9.16 (2016 Q4) 
Fixed in Version1.9.17 (2017 Q2) 
Summary0008111: Not able to create the "UDFStringHTMLTags" function when upgrading my MySQL database
DescriptionWe upgraded TestLink to last fix package version and were not able to run successfully the db_udf_update.sql located in folder
\install\sql\alter_tables\1.9.17\mysql\DB.1.9.17\step1

Our MySQL database version is 5.6.21 hosted on a linux server.

Error message (see attachment):
ErrorCode:1418:This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you "might" want to use the less safe log_bin_trust_function_creations variable)

1. What is the impact to not have this function defined in our MySQL database?
2. is it critical for TestLink?

Thanks
Steps To ReproduceThis error was generated when upgrading our MySQL database 5.6.21 on Linux server.
Additional InformationNo error on Windows machine using xampp and MySQL 5.6.16.
The function "UDFStripHTMLTags" was created successfully.
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserChrome v.58
PHP Version5.6.14
TestCaseID
QA Team - Task Workflow StatusREADY FOR TESTING
Attached Filespng file icon ErrorCode_1418.png [^] (69,266 bytes) 2017-10-16 19:00


png file icon Screen Shot 2017-10-21 at 16.14.42.png [^] (43,202 bytes) 2017-10-21 14:15

- Relationships

-  Notes
(0026945)
fman (administrator)
2017-10-18 20:44

function is needed for new searh feature
(0026953)
tjosephine (reporter)
2017-10-19 17:15

Fixed by adding in the declaration DETERMINISTIC, READS SQL DATA

USE `YOUR_TL_DBNAME`; /* Replace before run */
DROP function IF EXISTS `UDFStripHTMLTags`;

DELIMITER $$
USE `YOUR_TL_DBNAME`$$ /* Replace before run */
CREATE FUNCTION `UDFStripHTMLTags`(Dirty varchar(4000)) RETURNS varchar(4000) CHARSET utf8
DETERMINISTIC
READS SQL DATA
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$$

DELIMITER ;

How to test that the new function `UDFStripHTMLTags` is working as expected?
(0026955)
fman (administrator)
2017-10-21 14:13
edited on: 2017-10-21 14:16

you need to use the new search feature => SEE attached image

(0026964)
tjosephine (reporter)
2017-10-23 13:20

Working fine! Thanks

- Issue History
Date Modified Username Field Change
2017-10-16 19:00 tjosephine New Issue
2017-10-16 19:00 tjosephine File Added: ErrorCode_1418.png
2017-10-18 20:44 fman QA Team - Task Workflow Status => TBD
2017-10-18 20:44 fman View Status private => public
2017-10-18 20:44 fman Note Added: 0026945
2017-10-19 17:15 tjosephine Note Added: 0026953
2017-10-21 14:13 fman Note Added: 0026955
2017-10-21 14:15 fman File Added: Screen Shot 2017-10-21 at 16.14.42.png
2017-10-21 14:15 fman Note View State: 0026955: public
2017-10-21 14:16 fman Note Edited: 0026955 View Revisions
2017-10-21 14:16 fman Assigned To => fman
2017-10-21 14:16 fman Status new => feedback
2017-10-23 13:20 tjosephine Note Added: 0026964
2017-10-23 13:20 tjosephine Status feedback => assigned
2017-10-23 17:15 fman QA Team - Task Workflow Status TBD => READY FOR TESTING
2017-10-23 17:15 fman Status assigned => resolved
2017-10-23 17:15 fman Fixed in Version => 1.9.17 (2017 Q2)
2017-10-23 17:15 fman Resolution open => fixed



Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker