Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove serverTimezone=UTC at unit test and config file #29070

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ void assertAppendQueryPropertiesWithoutOriginalQueryProperties() {
@Test
void assertAppendQueryPropertiesWithOriginalQueryProperties() {
String actual = new JdbcUrlAppender().appendQueryProperties(
"jdbc:trunk://192.168.0.1:3306/foo_ds?serverTimezone=UTC&useSSL=false&rewriteBatchedStatements=true",
"jdbc:trunk://192.168.0.1:3306/foo_ds?useSSL=false&rewriteBatchedStatements=true",
PropertiesBuilder.build(new Property("useSSL", Boolean.FALSE.toString()), new Property("rewriteBatchedStatements", Boolean.TRUE.toString())));
assertThat(actual, startsWith("jdbc:trunk://192.168.0.1:3306/foo_ds?"));
assertThat(actual, containsString("serverTimezone=UTC"));
assertThat(actual, containsString("rewriteBatchedStatements=true"));
assertThat(actual, containsString("useSSL=false"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@ void assertParseSimpleJdbcUrl() {

@Test
void assertParseMySQLJdbcUrl() {
JdbcUrl actual = new StandardJdbcUrlParser().parse("jdbc:mysql://127.0.0.1:3306/demo_ds?serverTimezone=UTC&useSSL=false&sessionVariables=group_concat_max_len=204800,SQL_SAFE_UPDATES=0");
JdbcUrl actual = new StandardJdbcUrlParser().parse("jdbc:mysql://127.0.0.1:3306/demo_ds?useSSL=false&sessionVariables=group_concat_max_len=204800,SQL_SAFE_UPDATES=0");
assertThat(actual.getHostname(), is("127.0.0.1"));
assertThat(actual.getPort(), is(3306));
assertThat(actual.getDatabase(), is("demo_ds"));
assertThat(actual.getQueryProperties().size(), is(3));
assertThat(actual.getQueryProperties().get("serverTimezone"), is("UTC"));
assertThat(actual.getQueryProperties().size(), is(2));
assertThat(actual.getQueryProperties().get("useSSL"), is(Boolean.FALSE.toString()));
assertThat(actual.getQueryProperties().get("sessionVariables"), is("group_concat_max_len=204800,SQL_SAFE_UPDATES=0"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

package org.apache.shardingsphere.infra.database.mysql.connector;

import org.apache.shardingsphere.infra.database.core.connector.ConnectionProperties;
import org.apache.shardingsphere.infra.database.core.connector.ConnectionPropertiesParser;
import org.apache.shardingsphere.infra.database.core.connector.url.UnrecognizedDatabaseURLException;
import org.apache.shardingsphere.infra.database.core.connector.ConnectionProperties;
import org.apache.shardingsphere.infra.database.core.spi.DatabaseTypedSPILoader;
import org.apache.shardingsphere.infra.database.core.type.DatabaseType;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
Expand Down Expand Up @@ -65,8 +65,8 @@ private static class NewConstructorTestCaseArgumentsProvider implements Argument
public Stream<? extends Arguments> provideArguments(final ExtensionContext extensionContext) {
return Stream.of(
Arguments.of("simple", "jdbc:mysql://127.0.0.1/foo_ds", "127.0.0.1", 3306, "foo_ds", null, new Properties()),
Arguments.of("complex", "jdbc:mysql:loadbalance://127.0.0.1:9999,127.0.0.2:9999/foo_ds?serverTimezone=UTC&useSSL=false", "127.0.0.1", 9999, "foo_ds", null,
PropertiesBuilder.build(new Property("serverTimezone", "UTC"), new Property("useSSL", Boolean.FALSE.toString()))));
Arguments.of("complex", "jdbc:mysql:loadbalance://127.0.0.1:9999,127.0.0.2:9999/foo_ds?useSSL=false", "127.0.0.1", 9999, "foo_ds", null,
PropertiesBuilder.build(new Property("useSSL", Boolean.FALSE.toString()))));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ private MetaDataPersistService mockMetaDataPersistService() {

private Map<String, Object> createProperties() {
Map<String, Object> result = new LinkedHashMap<>(3, 1F);
result.put("jdbcUrl", "jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false");
result.put("jdbcUrl", "jdbc:mysql://127.0.0.1:3306/demo_ds_0?useSSL=false");
result.put("username", "root");
result.put("password", "123456");
return result;
}

private Map<String, DataSource> mockTrafficDataSourceMap() throws SQLException {
MockedDataSource result = new MockedDataSource(mock(Connection.class, RETURNS_DEEP_STUBS));
result.setUrl("jdbc:mysql://127.0.0.1:3307/logic_db?serverTimezone=UTC&useSSL=false");
result.setUrl("jdbc:mysql://127.0.0.1:3307/logic_db?useSSL=false");
result.setUsername("root");
result.setPassword("123456");
when(result.getConnection().getMetaData().getURL()).thenReturn(result.getUrl());
Expand Down Expand Up @@ -165,7 +165,7 @@ void assertGetConnectionWhenConfigTrafficRule() throws SQLException {
assertThat(actual, is(databaseConnectionManager.getConnections("127.0.0.1@3307", 0, 1, ConnectionMode.MEMORY_STRICTLY)));
assertThat(actual.size(), is(1));
assertThat(actual.get(0).getMetaData().getUserName(), is("root"));
assertThat(actual.get(0).getMetaData().getURL(), is("jdbc:mysql://127.0.0.1:3307/logic_db?serverTimezone=UTC&useSSL=false"));
assertThat(actual.get(0).getMetaData().getURL(), is("jdbc:mysql://127.0.0.1:3307/logic_db?useSSL=false"));
}

@Test
Expand All @@ -183,7 +183,7 @@ void assertGetConnectionsWhenConfigTrafficRuleAndAllInCache() throws SQLExceptio
assertThat(actual.size(), is(1));
assertThat(actual.get(0), is(expected));
assertThat(actual.get(0).getMetaData().getUserName(), is("root"));
assertThat(actual.get(0).getMetaData().getURL(), is("jdbc:mysql://127.0.0.1:3307/logic_db?serverTimezone=UTC&useSSL=false"));
assertThat(actual.get(0).getMetaData().getURL(), is("jdbc:mysql://127.0.0.1:3307/logic_db?useSSL=false"));
}

@Test
Expand All @@ -197,7 +197,7 @@ void assertGetConnectionsWhenConfigTrafficRuleAndEmptyCache() throws SQLExceptio
List<Connection> actual = databaseConnectionManager.getConnections("127.0.0.1@3307", 0, 1, ConnectionMode.MEMORY_STRICTLY);
assertThat(actual.size(), is(1));
assertThat(actual.get(0).getMetaData().getUserName(), is("root"));
assertThat(actual.get(0).getMetaData().getURL(), is("jdbc:mysql://127.0.0.1:3307/logic_db?serverTimezone=UTC&useSSL=false"));
assertThat(actual.get(0).getMetaData().getURL(), is("jdbc:mysql://127.0.0.1:3307/logic_db?useSSL=false"));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ private String getDataSourceYaml() {
+ " minPoolSize: 20\n"
+ " minimumIdle: 20\n"
+ " dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n"
+ " url: jdbc:mysql://192.168.0.2:3306/ds_1?serverTimezone=UTC&useSSL=false\n"
+ " url: jdbc:mysql://192.168.0.2:3306/ds_1?useSSL=false\n"
+ " ds_0:\n"
+ " minPoolSize: 20\n"
+ " minimumIdle: 20\n"
+ " dataSourceClassName: com.zaxxer.hikari.HikariDataSource\n"
+ " url: jdbc:mysql://192.168.0.1:3306/ds_0?serverTimezone=UTC&useSSL=false\n";
+ " url: jdbc:mysql://192.168.0.1:3306/ds_0?useSSL=false\n";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

class StandardPipelineDataSourceConfigurationTest {

private static final String JDBC_URL = "jdbc:mysql://127.0.0.1:3306/demo_ds?serverTimezone=UTC&useSSL=false";
private static final String JDBC_URL = "jdbc:mysql://127.0.0.1:3306/demo_ds?useSSL=false";

private static final String USERNAME = "userName";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ databaseName: encrypt_db

dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -28,7 +28,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_1:
url: jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_1?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_1?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ databaseName: mix_db

dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -28,7 +28,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_1:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_ds_1?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -37,7 +37,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_2:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_2?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_ds_2?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -46,7 +46,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_3:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_3?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_ds_3?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -55,7 +55,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_4:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_4?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_ds_4?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -64,7 +64,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_5:
url: jdbc:mysql://127.0.0.1:3306/demo_ds_5?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_ds_5?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ databaseName: readwrite_splitting_db

dataSources:
write_ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_write_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -28,7 +28,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
read_ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -37,7 +37,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
read_ds_1:
url: jdbc:mysql://127.0.0.1:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_read_ds_1?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ databaseName: shadow_db

dataSources:
ds:
url: jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -28,7 +28,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
shadow_ds:
url: jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_1?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_1?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ databaseName: sharding_db

dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -28,7 +28,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_1:
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ databaseName: sharding_db

dataSources:
ds_0:
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand All @@ -28,7 +28,7 @@ dataSources:
maxPoolSize: 50
minPoolSize: 1
ds_1:
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?serverTimezone=UTC&useSSL=false
url: jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?useSSL=false
username: root
password: 12345678
connectionTimeoutMilliseconds: 30000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ CREATE DATABASE encrypt_db;
USE encrypt_db;

REGISTER STORAGE UNIT ds_0 (
URL='jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_1 (
URL='jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_1?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_encrypt_ds_1?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
Expand Down
12 changes: 6 additions & 6 deletions proxy/backend/core/src/test/resources/expected/convert-mix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ CREATE DATABASE mix_db;
USE mix_db;

REGISTER STORAGE UNIT ds_0 (
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_1 (
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_1?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_1?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_2 (
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_2?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_2?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_3 (
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_3?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_3?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_4 (
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_4?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_4?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_5 (
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_5?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_ds_5?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ CREATE DATABASE readwrite_splitting_db;
USE readwrite_splitting_db;

REGISTER STORAGE UNIT write_ds_0 (
URL='jdbc:mysql://127.0.0.1:3306/demo_write_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_write_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), read_ds_0 (
URL='jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_read_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), read_ds_1 (
URL='jdbc:mysql://127.0.0.1:3306/demo_read_ds_1?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_read_ds_1?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ CREATE DATABASE shadow_db;
USE shadow_db;

REGISTER STORAGE UNIT ds (
URL='jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), shadow_ds (
URL='jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_1?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_shadow_ds_1?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ CREATE DATABASE sharding_db;
USE sharding_db;

REGISTER STORAGE UNIT ds_0 (
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_1 (
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ CREATE DATABASE sharding_db;
USE sharding_db;

REGISTER STORAGE UNIT ds_0 (
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_0?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
), ds_1 (
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?serverTimezone=UTC&useSSL=false',
URL='jdbc:mysql://127.0.0.1:3306/demo_sharding_ds_1?useSSL=false',
USER='root',
PASSWORD='12345678',
PROPERTIES('minPoolSize'='1', 'connectionTimeoutMilliseconds'='30000', 'maxLifetimeMilliseconds'='1800000', 'idleTimeoutMilliseconds'='60000', 'maxPoolSize'='50')
Expand Down
Loading