serial-ddl.slt 862 B

12345678910111213141516171819202122232425262728293031323334
  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. # Test that delayed single statement DDL doesn't block other DDLs while mid transaction.
  10. mode cockroach
  11. simple conn=conn1
  12. BEGIN;
  13. CREATE VIEW serial_ddl_v AS SELECT 1;
  14. ----
  15. COMPLETE 0
  16. COMPLETE 0
  17. # While conn1 has an open txn and is in single statement delayed txn mode, execute a DDL in another
  18. # connection which should not be blocked and succeed.
  19. simple conn=conn2
  20. BEGIN;
  21. CREATE VIEW serial_ddl_w AS SELECT 1;
  22. ----
  23. COMPLETE 0
  24. COMPLETE 0
  25. simple conn=conn1
  26. COMMIT;
  27. ----
  28. COMPLETE 0