quoted-identifier.td 982 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. #
  10. # identifiers that need proper quoting
  11. #
  12. > CREATE SECRET mysqlpass AS '${arg.mysql-root-password}'
  13. > CREATE CONNECTION mysql_conn TO MYSQL (
  14. HOST mysql,
  15. USER root,
  16. PASSWORD SECRET mysqlpass
  17. )
  18. $ mysql-connect name=mysql url=mysql://root@mysql password=${arg.mysql-root-password}
  19. $ mysql-execute name=mysql
  20. DROP DATABASE IF EXISTS public;
  21. CREATE DATABASE public;
  22. USE public;
  23. CREATE TABLE `t``1` (`f``1` INT)
  24. INSERT INTO `t``1` VALUES(1);
  25. > CREATE SOURCE mz_source FROM MYSQL CONNECTION mysql_conn;
  26. > CREATE TABLE t1 FROM SOURCE mz_source (REFERENCE public."t`1");
  27. > SELECT * FROM t1;
  28. 1