Skip to content

[YSQL][SQLsmith] ERROR: could not open relation with OID 1 #11225

@def-

Description

@def-

Jira Link: DB-908

Description

Another SQLsmith issue, not sure if this is an expected failure:

CREATE TABLE mvtest_boxes (id serial primary key, b box);
INSERT INTO mvtest_boxes (b) VALUES
  ('(32,32),(31,31)'),
  ('(2.0000004,2.0000004),(1,1)'),
  ('(1.9999996,1.9999996),(1,1)');
CREATE MATERIALIZED VIEW mvtest_boxmv AS SELECT * FROM mvtest_boxes;

CREATE TABLE mvtest_t (id int NOT NULL PRIMARY KEY, type text NOT NULL, amt numeric NOT NULL);
INSERT INTO mvtest_t VALUES
  (1, 'x', 2),
  (2, 'x', 3),
  (3, 'y', 5),
  (4, 'y', 7),
  (5, 'z', 11);
CREATE VIEW mvtest_tv AS SELECT type, sum(amt) AS totamt FROM mvtest_t GROUP BY type;
CREATE VIEW mvtest_tvv AS SELECT sum(totamt) AS grandtot FROM mvtest_tv;

select  
  pg_catalog.ts_headline(
    cast(cast(null as jsonb) as jsonb),
    cast(cast(null as tsquery) as tsquery)) as c0, 
  ref_0.grandtot as c1, 
  pg_catalog.yb_is_local_table(
    cast(
      pg_catalog.min(
        cast((select pg_catalog.min(datid) from pg_catalog.pg_stat_database)
           as oid)) over (partition by ref_0.grandtot order by ref_0.grandtot) as oid)) as c2, 
  ref_0.grandtot as c3, 
  (select pg_catalog.var_samp(total_time) from pg_catalog.pg_stat_xact_user_functions)
     as c4, 
  ref_0.grandtot as c5, 
  (select major from pg_catalog.pg_yb_migration limit 1 offset 6)
     as c6, 
  pg_catalog.lastval() as c7, 
  ref_0.grandtot as c8, 
  pg_catalog.pg_stat_get_db_blocks_hit(
    cast(case when (pg_catalog.circle(
            cast((select b from public.mvtest_boxmv limit 1 offset 3)
               as box)) &<| pg_catalog.circle_add_pt(
            cast(cast(null as circle) as circle),
            cast(cast(null as point) as point))) 
        and (ref_0.grandtot is NULL) then (select pg_catalog.min(dictnamespace) from pg_catalog.pg_ts_dict)
         else (select pg_catalog.min(dictnamespace) from pg_catalog.pg_ts_dict)
         end
       as oid)) as c9, 
  ref_0.grandtot as c10, 
  ref_0.grandtot as c11, 
  ref_0.grandtot as c12, 
  ref_0.grandtot as c13, 
  ref_0.grandtot as c14, 
  ref_0.grandtot as c15, 
  ref_0.grandtot as c16, 
  ref_0.grandtot as c17, 
  ref_0.grandtot as c18
from 
  public.mvtest_tvv as ref_0
where ref_0.grandtot <= ref_0.grandtot;

Failure:

ERROR:  could not open relation with OID 1

Metadata

Metadata

Assignees

Labels

area/ysqlYugabyte SQL (YSQL)kind/bugThis issue is a bugkind/failing-testTests and testing infrapriority/mediumMedium priority issueqa_automationBugs identified via itest-system, LST, Stress automation or causing automation failures

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions