This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new eaa611b5c5e Refactor my.cnf (#36494)
eaa611b5c5e is described below
commit eaa611b5c5e82dfa2e64d9b54c842825bd445d56
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sat Sep 6 21:30:15 2025 +0800
Refactor my.cnf (#36494)
---
.../option/dialect/MariaDBStorageContainerConfigurationOption.java | 2 +-
.../option/dialect/MySQLStorageContainerConfigurationOption.java | 4 ++--
test/e2e/env/src/test/resources/container/mysql/cnf/{ => 5}/my.cnf | 3 ---
test/e2e/env/src/test/resources/container/mysql/cnf/{ => 8}/my.cnf | 0
4 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MariaDBStorageContainerConfigurationOption.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MariaDBStorageContainerConfigurationOption.java
index bf24083729b..6a799f038d9 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MariaDBStorageContainerConfigurationOption.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MariaDBStorageContainerConfigurationOption.java
@@ -51,7 +51,7 @@ public final class MariaDBStorageContainerConfigurationOption implements Storage
@Override
public Map<String, String> getMountedResources(final int majorVersion) {
Map<String, String> result = new HashMap<>(2, 1F);
- result.put("/container/mysql/cnf/my.cnf", MySQLContainer.MYSQL_CONF_IN_CONTAINER);
+ result.put("/container/mysql/cnf/8/my.cnf", MySQLContainer.MYSQL_CONF_IN_CONTAINER);
result.put("/env/mysql/01-initdb.sql", "/docker-entrypoint-initdb.d/01-initdb.sql");
return result;
}
diff --git a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MySQLStorageContainerConfigurationOption.java b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MySQLStorageContainerConfigurationOption.java
index f64e5aad14d..f25fff4bbe7 100644
--- a/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MySQLStorageContainerConfigurationOption.java
+++ b/test/e2e/env/src/test/java/org/apache/shardingsphere/test/e2e/env/container/atomic/storage/config/option/dialect/MySQLStorageContainerConfigurationOption.java
@@ -58,7 +58,7 @@ public final class MySQLStorageContainerConfigurationOption implements StorageCo
if (null != url) {
result.put("/env/mysql/8/my.cnf", MySQLContainer.MYSQL_CONF_IN_CONTAINER);
} else {
- result.put("/container/mysql/cnf/my.cnf", MySQLContainer.MYSQL_CONF_IN_CONTAINER);
+ result.put("/container/mysql/cnf/8/my.cnf", MySQLContainer.MYSQL_CONF_IN_CONTAINER);
}
return result;
}
@@ -70,7 +70,7 @@ public final class MySQLStorageContainerConfigurationOption implements StorageCo
if (null != url) {
result.put(String.format("/env/mysql/%s/my.cnf", majorVersion), MySQLContainer.MYSQL_CONF_IN_CONTAINER);
} else {
- result.put("/container/mysql/cnf/my.cnf", MySQLContainer.MYSQL_CONF_IN_CONTAINER);
+ result.put(String.format("/container/mysql/cnf/%s/my.cnf", majorVersion), MySQLContainer.MYSQL_CONF_IN_CONTAINER);
}
result.put("/env/mysql/01-initdb.sql", "/docker-entrypoint-initdb.d/01-initdb.sql");
if (majorVersion > 5) {
diff --git a/test/e2e/env/src/test/resources/container/mysql/cnf/my.cnf b/test/e2e/env/src/test/resources/container/mysql/cnf/5/my.cnf
similarity index 96%
copy from test/e2e/env/src/test/resources/container/mysql/cnf/my.cnf
copy to test/e2e/env/src/test/resources/container/mysql/cnf/5/my.cnf
index 5afba273014..750e262444a 100644
--- a/test/e2e/env/src/test/resources/container/mysql/cnf/my.cnf
+++ b/test/e2e/env/src/test/resources/container/mysql/cnf/5/my.cnf
@@ -29,6 +29,3 @@ innodb_lock_wait_timeout=5
default-time-zone='+00:00'
default-authentication-plugin=mysql_native_password
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
-
-# For MySQL 8.0
-secure_file_priv=/var/lib/mysql
diff --git a/test/e2e/env/src/test/resources/container/mysql/cnf/my.cnf b/test/e2e/env/src/test/resources/container/mysql/cnf/8/my.cnf
similarity index 100%
rename from test/e2e/env/src/test/resources/container/mysql/cnf/my.cnf
rename to test/e2e/env/src/test/resources/container/mysql/cnf/8/my.cnf