unstable.slt 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright Materialize, Inc. and contributors. All rights reserved.
  2. #
  3. # Use of this software is governed by the Business Source License
  4. # included in the LICENSE file at the root of this repository.
  5. #
  6. # As of the Change Date specified in that file, in accordance with
  7. # the Business Source License, use of this software will be governed
  8. # by the Apache License, Version 2.0.
  9. mode cockroach
  10. # Introspection sources are unstable.
  11. statement error cannot create view with unstable dependencies
  12. CREATE VIEW v AS SELECT count(*) FROM mz_introspection.mz_active_peeks
  13. simple conn=mz_system,user=mz_system
  14. ALTER SYSTEM SET enable_rbac_checks TO false
  15. ----
  16. COMPLETE 0
  17. # Following materialize#26434, this still goes through RBAC now
  18. statement error must be owner of VIEW mz_introspection.mz_active_peeks
  19. CREATE DEFAULT INDEX ON mz_introspection.mz_active_peeks
  20. simple conn=mz_system,user=mz_system
  21. CREATE DEFAULT INDEX ON mz_introspection.mz_active_peeks
  22. ----
  23. db error: ERROR: cannot create index with unstable dependencies
  24. DETAIL: The object depends on the following unstable objects:
  25. mz_active_peeks
  26. simple conn=mz_system,user=mz_system
  27. ALTER SYSTEM RESET enable_rbac_checks
  28. ----
  29. COMPLETE 0
  30. # Introspection views are unstable.
  31. statement error cannot create view with unstable dependencies
  32. CREATE VIEW v AS SELECT count(*) FROM mz_introspection.mz_scheduling_elapsed
  33. # Unstable temporary views are allowed
  34. statement ok
  35. CREATE TEMPORARY VIEW v AS SELECT count(*) FROM mz_introspection.mz_scheduling_elapsed
  36. # SELECTs from unstable objects are allowed.
  37. statement ok
  38. SET cluster_replica = r1
  39. statement ok
  40. SELECT * FROM mz_introspection.mz_active_peeks