Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-37231

CBQ shell redirect output overwritten when using multiple source files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.5
    • Fix Version/s: 6.0.4, 6.5.1, 7.0.0
    • Component/s: query
    • Labels:
      None
    • Triage:
      Untriaged
    • Is this a Regression?:
      Unknown

      Description

      After specifying an output file with "\REDIRECT" and then providing two separate source files with "\SOURCE", only the last files queries are logged in the output file.

      Steps to recreate : 

      1. Create a cluster with query and the travel-sample bucket.
      2. Create two files, q1.n1ql and q2.n1ql (attached below)
      3. In cbq, redirect the output to a file with \REDIRECT <filename>
      4. Use \SOURCE q1.n1ql; 
      5. Use \SOURCE q2.n1ql;

      After this, the redirected file contains only the output of q2.n1ql as opposed to both sets of queries from both the files.

        Attachments

        1. q1.n1ql
          0.0 kB
        2. q2.n1ql
          0.2 kB

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

            Hide
            Sitaram.Vemulapalli Sitaram Vemulapalli added a comment - - edited

            Append results to the same redirected file by introducing FILE_APPEND_MODE
            		E.g. \REDIRECT +output_path
            		If there is "+" in front of output_path, open the file in append mode
            		Otherwise open in truncate mode
            When file is opened in Append mode Add timestamp to the redirected file at open.
            E.g.:
            -- <2019-12-31T09:10:06.618-08:00> : opened in append mode
            

            Show
            Sitaram.Vemulapalli Sitaram Vemulapalli added a comment - - edited Append results to the same redirected file by introducing FILE_APPEND_MODE E.g. \REDIRECT +output_path If there is "+" in front of output_path, open the file in append mode Otherwise open in truncate mode When file is opened in Append mode Add timestamp to the redirected file at open. E.g.: -- < 2019 - 12 -31T09: 10 : 06.618 - 08 : 00 > : opened in append mode
            Hide
            chang.liu Chang Liu (Inactive) added a comment -

            This has been fixed inside MB-37351:
            Build couchbase-server-6.0.4-3049 contains query commit e8fc316

            Show
            chang.liu Chang Liu (Inactive) added a comment - This has been fixed inside MB-37351 : Build couchbase-server-6.0.4-3049 contains query commit e8fc316
            Hide
            ajay.bhullar Ajay Bhullar added a comment -

            verified in 6.0.4-3072

            Show
            ajay.bhullar Ajay Bhullar added a comment - verified in 6.0.4-3072
            Hide
            ajay.bhullar Ajay Bhullar added a comment -

            did this get merged into 6.5.1 and 7.0.0? Kamini Jagtiani , if so what builds

            Show
            ajay.bhullar Ajay Bhullar added a comment - did this get merged into 6.5.1 and 7.0.0? Kamini Jagtiani , if so what builds
            Hide
            chang.liu Chang Liu (Inactive) added a comment - - edited

            Ajay Bhullar, this is a subtask of MB-37351, the fix for both of them is along with MB-37351.
            I saw you already verified MB-37351 in 7.0.0-1432 and 6.5.1-6201, they should also work for this fix.

            Show
            chang.liu Chang Liu (Inactive) added a comment - - edited Ajay Bhullar , this is a subtask of MB-37351 , the fix for both of them is along with MB-37351 . I saw you already verified MB-37351 in 7.0.0-1432 and 6.5.1-6201, they should also work for this fix.
            Hide
            ajay.bhullar Ajay Bhullar added a comment -

            verified in 6.5.1-6240, 7.0.0-1432

            Show
            ajay.bhullar Ajay Bhullar added a comment - verified in 6.5.1-6240, 7.0.0-1432

              People

              Assignee:
              ajay.bhullar Ajay Bhullar
              Reporter:
              thomas.dotters Thomas Dotters
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes

                    PagerDuty