From 228f6d250ed135cb39cb7238ce0c9c5c48b4a48c Mon Sep 17 00:00:00 2001 From: Florian Blaser Date: Mon, 18 Mar 2024 08:29:32 +0100 Subject: [PATCH] :bug: Fix path for SQL scripts in create catalog method --- src/Catalog.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Catalog.php b/src/Catalog.php index 4084e7a..7ac34c9 100644 --- a/src/Catalog.php +++ b/src/Catalog.php @@ -95,11 +95,11 @@ public function create(string $catName): int $rootPrivileges = $this->connection->query("SELECT * FROM mysql.global_priv WHERE User='{$this->dbUser}' AND Host='%';"); $scripts = [ - 'src/create_catalog_sql/mysql_system_tables.sql', - 'src/create_catalog_sql/mysql_performance_tables.sql', - 'src/create_catalog_sql/mysql_system_tables_data.sql', - 'src/create_catalog_sql/maria_add_gis_sp.sql', - 'src/create_catalog_sql/mysql_sys_schema.sql', + __DIR__ . '/create_catalog_sql/mysql_system_tables.sql', + __DIR__ . '/create_catalog_sql/mysql_performance_tables.sql', + __DIR__ . '/create_catalog_sql/mysql_system_tables_data.sql', + __DIR__ . '/create_catalog_sql/maria_add_gis_sp.sql', + __DIR__ . '/create_catalog_sql/mysql_sys_schema.sql', ]; $this->connection->exec('CREATE CATALOG IF NOT EXISTS ' . $catName); $this->connection->exec('USE CATALOG ' . $catName);