You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "menghaoranss (via GitHub)" <gi...@apache.org> on 2025/02/28 06:10:42 UTC
[I] Could not create table after logic database created for MySQL [shardingsphere]
menghaoranss opened a new issue, #34816:
URL: https://github.com/apache/shardingsphere/issues/34816
## Bug Report
**For English only**, other languages will not accept.
Before report a bug, make sure you have:
- Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
- Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will **close it**.
Please answer these questions before submitting your issue. Thanks!
### Which version of ShardingSphere did you use?
master
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy For MySQL
### Expected behavior
create table successfully
### Actual behavior
create table failed
### Reason analyze (If you can)
The default schema was not created after logic database created.
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
```
mysql> create database test_db;
Query OK, 0 rows affected (0.06 sec)
mysql> use test_db;
Database changed
mysql>
mysql>
mysql> REGISTER STORAGE UNIT ds_0 (
-> URL="jdbc:mysql://127.0.0.1:3306/pipeline_it_3?rewriteBatchedStatements=true&useServerPrepStmts=true&useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC&characterEncoding=utf-8&useLocalSessionState=true",
-> USER="root",
-> PASSWORD="123456",
-> PROPERTIES("maximumPoolSize"="50","idleTimeout"="30000")
-> );
Query OK, 0 rows affected (3.46 sec)
mysql> load single table *.*;
Query OK, 0 rows affected (3.24 sec)
mysql> show tables;
Empty set (0.01 sec)
mysql> create table test_1(id int not null);
ERROR 10001 (42S02): Schema 'test_db' does not exist.
mysql> create table test_1(id int not null);
ERROR 2013 (HY000): Lost connection to MySQL server during query
No connection. Trying to reconnect...
Connection id: 1
Current database: test_db
ERROR 10001 (42S02): Schema 'test_db' does not exist.
```
### Example codes for reproduce this issue (such as a github link).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Could not create table after logic database created for MySQL [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #34816:
URL: https://github.com/apache/shardingsphere/issues/34816#issuecomment-2690757847
- Since PR #34590 was merged, unit tests for creating logical tables through Shardingsphere Proxy have started to fail.
```
org.apache.shardingsphere.test.natived.proxy.transactions.base.SeataTest
org.apache.shardingsphere.test.natived.proxy.databases.PostgresTest
org.apache.shardingsphere.test.natived.proxy.databases.MySQLTest
```
- According to https://github.com/apache/shardingsphere/actions/runs/13588805787/job/37989680341 , this affects both MySQL and Postgres. #34590 seems too long ago.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Could not create table after logic database created for MySQL [shardingsphere]
Posted by "linghengqian (via GitHub)" <gi...@apache.org>.
linghengqian commented on issue #34816:
URL: https://github.com/apache/shardingsphere/issues/34816#issuecomment-2710523527
> Since PR https://github.com/apache/shardingsphere/pull/34590 was merged, unit tests for creating logical tables through Shardingsphere Proxy have started to fail.
- I confirm that this issue is fixed by #34946 .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Could not create table after logic database created for MySQL [shardingsphere]
Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss closed issue #34816: Could not create table after logic database created for MySQL
URL: https://github.com/apache/shardingsphere/issues/34816
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Could not create table after logic database created for MySQL [shardingsphere]
Posted by "menghaoranss (via GitHub)" <gi...@apache.org>.
menghaoranss commented on issue #34816:
URL: https://github.com/apache/shardingsphere/issues/34816#issuecomment-3345278586
I have tested and confirmed that this issue has been resolved:
```
mysql> create database sharding_db;
Query OK, 0 rows affected (1.84 sec)
mysql> use sharding_db;
Database changed
mysql>
mysql> REGISTER STORAGE UNIT product (
-> HOST="127.0.0.1",
-> PORT=3306,
-> DB="product",
-> USER="root",
-> PASSWORD="123456"
-> );
Query OK, 0 rows affected (2.45 sec)
mysql> load single table *.*;
Query OK, 0 rows affected (1.37 sec)
mysql> show tables;
Empty set (0.01 sec)
mysql> create table test_1(id int not null);
Query OK, 0 rows affected (2.67 sec)
mysql> show tables;
+-----------------------+
| Tables_in_sharding_db |
+-----------------------+
| test_1 |
+-----------------------+
1 row in set (0.01 sec)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org