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

CBQ shell redirect off not returning the results to the console

    XMLWordPrintable

Details

    • Untriaged
    • Unknown

    Description

      Post REDIRECT OFF the N1QL queries output is not redirected to Console.

      Steps to recreate:

      1. Create a cluster with index, query services and load travel-sample bucket
      2. Create two files, q1.n1ql and q2.n1ql (attached below), each will have a set of N1QL queries
      3. Create another file main1.n1ql (attached below) and call above q1.n1ql by redirecting output to a file and then call q2.n1ql to write the result to a file

      \REDIRECT q1_output.out; 
      \SOURCE q1.n1ql; 
      \REDIRECT OFF; 
      \SOURCE q2.n1ql; 
      \QUIT;  

      Execute main1.n1ql from CBQ

      cbq -u Administrator -p password -engine=http://localhost:8091/ -f main1.n1ql 

      The output of the above command is:

      Connected to : http://localhost:8091/. Type Ctrl-D or \QUIT to exit. Path to history file for the shell : /root/.cbq_history \REDIRECT q1_output.out; \SOURCE q1.n1ql;  

      q1_output.out file has output for q1.n1ql, but the output of q2.n1ql is not redirected to console.

      Attachments

        1. main1.n1ql
          0.1 kB
        2. q1.n1ql
          0.0 kB
        3. 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

            People

              ajay.bhullar Ajay Bhullar
              ajay.upputuri Ajay Upputuri
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty