You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Rick Hillegas (JIRA)" <ji...@apache.org> on 2011/08/26 15:15:30 UTC

[jira] [Created] (DERBY-5391) The syscs_diag.error_log_reader() vti does not work on derby error logs created since 10.7.1

The syscs_diag.error_log_reader() vti does not work on derby error logs created since 10.7.1
--------------------------------------------------------------------------------------------

                 Key: DERBY-5391
                 URL: https://issues.apache.org/jira/browse/DERBY-5391
             Project: Derby
          Issue Type: Bug
          Components: SQL
    Affects Versions: 10.8.1.2, 10.7.1.1, 10.9.0.0
            Reporter: Rick Hillegas


The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.

To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:

  select * from table (syscs_diag.error_log_reader( )) as t1;

You will get an empty result.

This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5391:
---------------------------------

    Attachment: derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff

Attaching derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff. This rev of the patch includes a test case which runs the vtis against a current derby.log. This should help prevent these vtis from breaking if we change the format of logged timestamps again. I will run the full regression suite against this version of the patch. It is ready for review. Thanks.

Touches the same files as the previous rev.


> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff, derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5391:
---------------------------------

    Description: 
The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.

To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:

  select * from table (syscs_diag.error_log_reader( )) as t1;

You will get an empty result.

This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".

The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:

  select * from table (syscs_diag.statement_duration()) as t1;



  was:
The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.

To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:

  select * from table (syscs_diag.error_log_reader( )) as t1;

You will get an empty result.

This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".

        Summary: The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1  (was: The syscs_diag.error_log_reader() vti does not work on derby error logs created since 10.7.1)

> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Kathey Marsden (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kathey Marsden reassigned DERBY-5391:
-------------------------------------

    Assignee: Rick Hillegas
    
> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>            Assignee: Rick Hillegas
>             Fix For: 10.7.1.4, 10.8.2.2, 10.9.0.0
>
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff, derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13092863#comment-13092863 ] 

Rick Hillegas commented on DERBY-5391:
--------------------------------------

Regression tests passed cleanly for me on derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff. Committed to trunk at subversion revision 1162827. Ported to 10.8 branch at subversion revision 1162832.

> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff, derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13094027#comment-13094027 ] 

Rick Hillegas commented on DERBY-5391:
--------------------------------------

Ported 1162827 from trunk to the 10.7 branch at subversion revision 1163355.

> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff, derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5391:
---------------------------------

    Issue & fix info: [Patch Available, Repro attached]  (was: [Repro attached])

> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff, derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5391:
---------------------------------

    Attachment: derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff

Attaching derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff. I have not run the full regression suite yet. To prevent this kind of regression from creeping in again, I think that we need to add a test case which runs these vtis against the current shape of derby.log, not just a canned derby.log from an old release.

The preceding rev of the patch fixed the error log vti. This rev of the patch also fixes the statement duration vti.

In addition, this patch adjusts the existing regression test to account for the following behavioral change: The first varchar column of these vtis gives a string rendering of the timestamp. When run against old (pre-10.7) error logs, the leading column of these vtis now includes the GMT timezone indicator which appears in the log.

To summarize the formatting change of that first column:

1) Before 10.7, that column looked like this:

2006-12-15 16:14:58.280

2) Now, when you run these vtis on pre-10.7 logs, the column looks like this:

2006-12-15 16:14:58.280 GMT

3) And, when you run these vtis on 10.7 (or later) logs, the column looks like this:

Fri Aug 26 10:53:23 PDT 2011


Touches the following files:

--------

M      java/engine/org/apache/derby/diag/StatementDuration.java
M      java/engine/org/apache/derby/diag/ErrorLogReader.java

Fixes to the vtis.

--------

M      java/testing/org/apache/derbyTesting/functionTests/tests/lang/SysDiagVTIMappingTest.java

Fix to the existing regression test.


> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas resolved DERBY-5391.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 10.9.0.0
                   10.8.1.6
                   10.7.1.4

> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>             Fix For: 10.7.1.4, 10.8.1.6, 10.9.0.0
>
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff, derby-5391-01-ac-fixErrorLogReaderAndStatementDuration.diff, derby-5391-01-ad-fixErrorLogReaderAndStatementDuration.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (DERBY-5391) The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1

Posted by "Rick Hillegas (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-5391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Hillegas updated DERBY-5391:
---------------------------------

    Attachment: derby-5391-01-aa-fixErrorLogReader.diff

Attaching derby-5391-01-aa-fixErrorLogReader.diff. This is the first rev of a fix for the ErrorLogReader problem. This fixes the vti so that it can handle the new and the old timestamp formats. I haven't run any regression tests against this patch. Just a proof-of-concept.

> The syscs_diag.error_log_reader() and syscs_diag.statement_duration() vtis do not work on derby error logs created since 10.7.1
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-5391
>                 URL: https://issues.apache.org/jira/browse/DERBY-5391
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1, 10.8.1.2, 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5391-01-aa-fixErrorLogReader.diff
>
>
> The format of timestamps in Derby logs seems to have changed. As a result, the ErrorLogReader vti can't parse the text of derby.log. That vti is looking for the literal string "GMT" in order to locate timestamps.
> To reproduce the problem, run ij with -Dderby.language.logStatementText=true and issue the following query:
>   select * from table (syscs_diag.error_log_reader( )) as t1;
> You will get an empty result.
> This regression was not caught by our tests because SysDiagVTIMappingTest uses a hardcoded derby.log created by version "10.3.0.0 alpha".
> The same problem seems to have broken the statement duration vti too. The following query returns an empty result from 10.7 onward:
>   select * from table (syscs_diag.statement_duration()) as t1;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira