github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/sql/logictest/testdata/logic_test/run_control (about)

     1  # LogicTest: !3node-tenant
     2  query error job with ID 1 does not exist
     3  PAUSE JOB 1
     4  
     5  query error could not parse "foo" as type int
     6  PAUSE JOB 'foo'
     7  
     8  query error could not parse "foo" as type int
     9  CANCEL JOBS SELECT 'foo'
    10  
    11  query error too many columns in CANCEL JOBS data
    12  CANCEL JOBS VALUES (1,2)
    13  
    14  query error pq: CANCEL JOBS data column 1 \(job_id\) must be of type int, not type oid
    15  CANCEL JOB 1::OID
    16  
    17  statement ok count 0
    18  PAUSE JOB (SELECT id FROM system.jobs LIMIT 0)
    19  
    20  statement ok count 0
    21  PAUSE JOBS SELECT id FROM system.jobs LIMIT 0
    22  
    23  query error could not parse "foo" as type int
    24  PAUSE JOBS SELECT 'foo'
    25  
    26  query error too many columns in PAUSE JOBS data
    27  PAUSE JOBS VALUES (1,2)
    28  
    29  query error job with ID 1 does not exist
    30  RESUME JOB 1
    31  
    32  query error could not parse "foo" as type int
    33  RESUME JOB 'foo'
    34  
    35  query error could not parse "foo" as type int
    36  RESUME JOBS SELECT 'foo'
    37  
    38  query error too many columns in RESUME JOBS data
    39  RESUME JOBS VALUES (1,2)
    40  
    41  statement ok count 0
    42  RESUME JOB (SELECT id FROM system.jobs LIMIT 0)
    43  
    44  statement ok count 0
    45  RESUME JOBS SELECT id FROM system.jobs LIMIT 0
    46  
    47  query error job with ID 1 does not exist
    48  CANCEL JOB 1
    49  
    50  query error could not parse "foo" as type int
    51  CANCEL JOB 'foo'
    52  
    53  statement ok count 0
    54  CANCEL JOB (SELECT id FROM system.jobs LIMIT 0)
    55  
    56  statement ok count 0
    57  CANCEL JOBS SELECT id FROM system.jobs LIMIT 0
    58  
    59  query error CANCEL QUERIES data column 1 \(query_id\) must be of type string, not type int
    60  CANCEL QUERY 1
    61  
    62  query error too many columns in CANCEL QUERIES data
    63  CANCEL QUERIES VALUES (1,2)
    64  
    65  query error odd length hex string
    66  CANCEL QUERY 'f54'
    67  
    68  query error not found
    69  CANCEL QUERY '14d2355b9cccbca50000000000000001'
    70  
    71  statement ok
    72  CANCEL QUERY IF EXISTS '14d2355b9cccbca50000000000000001'
    73  
    74  query error CANCEL SESSIONS data column 1 \(session_id\) must be of type string, not type int
    75  CANCEL SESSION 1
    76  
    77  query error too many columns in CANCEL SESSIONS data
    78  CANCEL SESSIONS VALUES (1,2)
    79  
    80  query error odd length hex string
    81  CANCEL SESSION 'f54'
    82  
    83  query error not found
    84  CANCEL SESSION '14d2355b9cccbca50000000000000001'
    85  
    86  statement ok
    87  CANCEL SESSION IF EXISTS '14d2355b9cccbca50000000000000001'
    88  
    89  statement ok count 0
    90  CANCEL SESSION (SELECT 'a' LIMIT 0)
    91  
    92  statement ok count 0
    93  CANCEL SESSIONS SELECT 'a' LIMIT 0
    94  
    95  # Regression test for #25842
    96  query error odd length hex string
    97  CANCEL SESSION 'aaa'::NAME
    98  
    99  query error odd length hex string
   100  CANCEL QUERY 'aaa'::NAME
   101  
   102  user testuser
   103  
   104  query error only users with the admin role are allowed to CANCEL JOBS
   105  CANCEL JOB 1
   106  
   107  query error only users with the admin role are allowed to PAUSE JOBS
   108  PAUSE JOB 1
   109  
   110  query error only users with the admin role are allowed to RESUME JOBS
   111  RESUME JOB 1
   112  
   113  user root
   114  
   115  query T rowsort
   116  SELECT feature_name FROM crdb_internal.feature_usage
   117  WHERE feature_name IN (
   118    'sql.schema.job.control.pause',
   119    'sql.schema.job.control.resume',
   120    'sql.schema.job.control.cancel'
   121  )
   122  ----
   123  sql.schema.job.control.pause
   124  sql.schema.job.control.cancel
   125  sql.schema.job.control.resume