Rick Hillegas created DERBY-6943: ------------------------------------ Summary: Undefined behavior of SYSCS_DIAG.ERROR_LOG_READER() when using rolling log files Key: DERBY-6943 URL: https://issues.apache.org/jira/browse/DERBY-6943 Project: Derby Issue Type: Bug Components: Services Affects Versions: 10.13.1.1 Reporter: Rick Hillegas
The behavior of SYSCS_DIAG.ERROR_LOG_READER() is undefined when the engine is booted with -Dderby.stream.error.style=rollingFile. At a minimum, it should scan at least one of the rolling files. Instead, it raises an exception saying that it can't find derby.log. The following script shows this behavior: {noformat} connect 'jdbc:derby:memory:db;create=true'; -- correctly succeeds if using ordinary diagnostic logging -- INCORRECTLY RAISES 'No such file or directory' if -Dderby.stream.error.style=rollingFile is set SELECT count(*) FROM TABLE (SYSCS_DIAG.ERROR_LOG_READER()) AS T1; -- correctly succeeds if using ordinary diagnostic logging -- correctly raises 'No such file or directory' if -Dderby.stream.error.style=rollingFile is set SELECT count(*) FROM TABLE (SYSCS_DIAG.ERROR_LOG_READER('derby.log')) AS T1; -- correctly raises 'No such file or directory' if using ordinary logging -- correctly succeeds if -Dderby.stream.error.style=rollingFile is set SELECT count(*) FROM TABLE (SYSCS_DIAG.ERROR_LOG_READER('derby-0.log')) AS T1; {noformat} We should decide on a correct behavior for SYSCS_DIAG.ERROR_LOG_READER() when the -Dderby.stream.error.style=rollingFile property is set. Here are some options: 1) Scan all of the rolling diagnostic log files, starting at derby-0.log and continuing through the last in the series. 2) Scan just the first rolling diagnostic log file. 3) Scan just the last (current) diagnostic log file. -- This message was sent by Atlassian JIRA (v6.4.14#64029)