Mantis Bugtracker          
testlink.org

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007952TestLinkDatabase MySQLpublic2017-05-29 14:002017-06-12 11:59
Reportersteffen 
Assigned Tofman 
PriorityhighSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
PlatformRaspberryPiOSRaspbian GNU/LinuxOS Version8 (jessie)
Product Version1.9.16 (2016 Q4) 
Fixed in Version 
Summary0007952: Restoring Backupfile produces DB Access Error (invalid default value)
Description- The server we are using is RaspberryPi 3.

- Restoring a backupfile (file from a hosted webspace - testlink-1.9.16; PHP 7.*) to the DB causes
  "ERROR 1067 (42000) at line 20654: Invalid default value for 'creation_ts'"

- backupfile is dated 2017-05-22

- Testlink shows after logging in:
DB Access Error - debug_print_backtrace() OUTPUT START
 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)
            Having this additional Information could be useful for reporting
            issue to development TEAM.
 ==============================================================================
#0 database->exec_query(/* debugMsg */ SELECT basename FROM plugins WHERE enabled=1 ) called at [/var/www/testlink-1.9.16/lib/functions/plugin_api.php:495]
#1 plugin_register_installed() called at [/var/www/testlink-1.9.16/lib/functions/plugin_api.php:514]
0000002 plugin_init_installed() called at [/var/www/testlink-1.9.16/lib/functions/common.php:497]
0000003 testlinkInitPage(database Object ([db] => ADODB_mysqli Object ([databaseType] => mysqli,[dataProvider] => mysql,[hasInsertID] => 1,[hasAffectedRows] => 1,[metaTablesSQL] => SELECT
            TABLE_NAME,
            CASE WHEN TABLE_TYPE = 'VIEW' THEN 'V' ELSE 'T' END
        FROM INFORMATION_SCHEMA.TABLES
        WHERE TABLE_SCHEMA=,[metaColumnsSQL] => SHOW COLUMNS FROM `%s`,[fmtTimeStamp] => 'Y-m-d H:i:s',[hasLimit] => 1,[hasMoveFirst] => 1,[hasGenID] => 1,[isoDates] => 1,[sysDate] => CURDATE(),[sysTimeStamp] => NOW(),[hasTransactions] => 1,[forceNewConnect] => 1,[poorAffectedRows] => 1,[clientFlags] => 0,[substr] => substring,[port] => 3306,[socket] => ,[_bindInputArray] => ,[nameQuote] => `,[optionFlags] => Array ([0] => Array ([0] => 5,[1] => 0)),[arrayClass] => ADORecordSet_array_mysqli,[multiQuery] => ,[_genIDSQL] => update %s set id=LAST_INSERT_ID(id+1);,[_genSeqSQL] => create table if not exists %s (id int not null),[_genSeqCountSQL] => select count(*) from %s,[_genSeq2SQL] => insert into %s values (%s),[_dropSeqSQL] => drop table if exists %s,[database] => testlink,[host] => localhost,[user] => tl_user,[password] => not stored,[debug] => ,[maxblobsize] => 262144,[concat_operator] => +,[length] => length,[random] => rand(),[upperCase] => upper,[fmtDate] => 'Y-m-d',[true] => 1,[false] => 0,[replaceQuote] => \',[charSet] => ,[metaDatabasesSQL] => ,[uniqueOrderBy] => ,[emptyDate] => ,[emptyTimeStamp] => ,[lastInsID] => ,[hasTop] => ,[readOnly] => ,[genID] => 0,[raiseErrorFn] => ,[cacheSecs] => 3600,[memCache] => ,[memCacheHost] => ,[memCachePort] => 11211,[memCacheCompress] => ,[sysUTimeStamp] => ,[noNullStrings] => ,[numCacheHits] => 0,[numCacheMisses] => 0,[pageExecuteCountRows] => 1,[uniqueSort] => ,[leftOuter] => ,[rightOuter] => ,[ansiOuter] => ,[autoRollback] => ,[fnExecute] => ,[fnCacheExecute] => ,[blobEncodeType] => ,[rsPrefix] => ADORecordSet_,[autoCommit] => 1,[transOff] => 0,[transCnt] => 0,[fetchMode] => 2,[null2null] => null,[bulkBind] => ,[_oldRaiseFn] => ,[_transOK] => ,[_connectionID] => mysqli Object ([affected_rows] => ,[client_info] => ,[client_version] => ,[connect_errno] => ,[connect_error] => ,[errno] => ,[error] => ,[error_list] => ,[field_count] => ,[host_info] => ,[info] => ,[insert_id] => ,[server_info] => ,[server_version] => ,[stat] => ,[sqlstate] => ,[protocol_version] => ,[thread_id] => ,[warning_count] => ),[_errorMsg] => ,[_errorCode] => ,[_queryID] => 1,[_isPersistentConnection] => ,[_evalAll] => ,[_affected] => ,[_logsql] => ,[_transmode] => ,[] => Array (),[databaseName] => testlink),[queries_array] => Array (),[is_connected] => 1,[nQuery] => 0,[overallDuration] => 0,[dbType] => mysqli,[] => 0,[] => 0), 1) called at [/var/www/testlink-1.9.16/lib/general/mainPage.php:28]

- restoring a backupfile dated 2017-02-17 (file from a hosted webspace - testlink-1.9.15; PHP 5.*) does work

- backup-/restore-script is from testlink_installation_manual and does work with DB after installing Testlink. Does work with file dated 2017-02-17 as well
Steps To Reproduce1. backup working testlink
2. restore file dated 2017-05-22
Additional Information- The same issue comes up with a "normal" ( not raspberry pi ) server with ubuntu:
   - Server-Version: 5.7.18-0ubuntu0.16.04.1 - (Ubuntu)
   - PHP 7.1.5-1+deb.sury.org~xenial+2 (cli)

- Same issue with v1.9.15 and v1.9.17
TagsNo tags attached.
Database (MySQL,Postgres,etc)MySQL
BrowserChrome, FF, IE
PHP Version7.0.19
TestCaseID
QA Team - Task Workflow StatusTBD
Attached Files

- Relationships

-  Notes
(0026410)
fman (administrator)
2017-05-29 18:40

Seems to be the usual issue with DATE & TIMESTAMP fields defaults between different MySQL issues.
you need to change the default value according to your mysql version
(0026477)
steffen (reporter)
2017-06-12 11:36

Thanks for the fast reply!
According to your Suggestion, I was able to find a Problem with the backupfile itself, which was trying to create new tables with invalid default values!
-> changed the backupfile and could restore the data without a problem.

- Issue History
Date Modified Username Field Change
2017-05-29 14:00 steffen New Issue
2017-05-29 18:40 fman Note Added: 0026410
2017-06-12 11:36 steffen Note Added: 0026477
2017-06-12 11:59 fman QA Team - Task Workflow Status => TBD
2017-06-12 11:59 fman Status new => resolved
2017-06-12 11:59 fman Resolution open => fixed
2017-06-12 11:59 fman Assigned To => fman



Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker