populate-tables.td 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. $ mysql-connect name=mysql url=mysql://root@${arg.mysql-host} password=${arg.mysql-root-password}
  10. $ mysql-execute name=mysql
  11. USE public;
  12. DROP TABLE IF EXISTS ten;
  13. CREATE TABLE ten (f1 INTEGER);
  14. INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
  15. DROP TABLE IF EXISTS t0;
  16. CREATE TABLE t0 (f1 INTEGER, f2 TEXT);
  17. DROP TABLE IF EXISTS t1;
  18. CREATE TABLE t1 (f1 INTEGER, f2 TEXT);
  19. INSERT INTO t1 SELECT a1.f1 + a6.f1 , 'abc\nxyz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
  20. DROP TABLE IF EXISTS t2;
  21. CREATE TABLE t2 (f1 INTEGER, f2 TEXT);
  22. INSERT INTO t2 SELECT a1.f1 + a6.f1 , 'abc\nxyz' FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
  23. DROP TABLE IF EXISTS alter_fail_drop_col;
  24. CREATE TABLE alter_fail_drop_col (f1 INTEGER, f2 INTEGER);
  25. INSERT INTO alter_fail_drop_col VALUES (1, 1);
  26. DROP TABLE IF EXISTS alter_fail_drop_constraint;
  27. CREATE TABLE alter_fail_drop_constraint (f1 INTEGER NOT NULL);
  28. INSERT INTO alter_fail_drop_constraint VALUES (1);