You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/10/29 06:19:38 UTC

[GitHub] [shardingsphere] lidonghai11 edited a comment on issue #7324: [New feature] How to use RDL to create Sharding databases and tables online?

lidonghai11 edited a comment on issue #7324:
URL: https://github.com/apache/shardingsphere/issues/7324#issuecomment-699608723


   ##Some test cases
   1、If I don't   'Add database resources for this sharding DB' or 'Create Sharding rules for sharding tables', when I create table,there is nothing response. Hope can get some error response. Below are my test steps:
   A:NO DataSource
   CREATE DATABASE ss2;
   
   use ss2
   
   CREATE shardingrules (
   u_order=hash_mod(order_id, 8), 
   u_item=mod(item_id, 4)
   )
   
   CREATE TABLE `u_order` (
     `order_id` int NOT NULL,
     `user_id` int NOT NULL,
     `status` varchar(45) DEFAULT NULL,
     PRIMARY KEY (`order_id`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4    
   
   Nothing response
   
   B:NO sharding rules
   CREATE DATABASE ss6;
   
   use ss6;
   
   CREATE datasources (
   ds0=10.222.23.144:3306:xdb_0:root:12345, 
   ds1=10.222.23.145:3306:xdb_1:root:12345 
   );
   
   CREATE TABLE `u_order` (
     `order_id` int NOT NULL,
     `user_id` int NOT NULL,
     `status` varchar(45) DEFAULT NULL,
     PRIMARY KEY (`order_id`)
   ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
   
   Nothing response
   
   2、DROP DB only removes the logic sharding schema
   Hope to clear all the stuff stored in zk and backend databases,If don't  ,we may get some conflict with the old tables.
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org