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 2019/12/31 02:19:47 UTC

[GitHub] [incubator-shardingsphere] beijixi opened a new issue #3840: Why does the INSERT SQL have no routing

beijixi opened a new issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840
 
 
   ## Question
   
   **sql:**  
   `INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno)
   VALUES(101802,'12323123' ,'李白11', 0 ,'1999-01-01',0, '22232223' , null , null , null , null , null , null , null , 0.0 , 0.0 , null , null , null , null , null , null , null , null , null , 0.0 , null , null , null , null , null , null , null , null , null , '1' , null , 'cbs' , '2019-12-30' , '18:26:52' , '2019-12-30' , '18:26:52' , null , null , null , null , null);`
   **sharding-config:**
   LDPerson:
   &ensp;&ensp;actualDataNodes: ds${0..1}.LDPerson
    &ensp;&ensp;databaseStrategy:
   &ensp;&ensp;&ensp;&ensp;inline:
      &ensp;&ensp;&ensp;&ensp;&ensp;&ensp;shardingColumn: PersonID
    &ensp;&ensp;&ensp;&ensp;&ensp;&ensp;algorithmExpression: ds${PersonID % 2}
      
   **description:**
   No matter which field is used as the route key,the data exists in ds0 and ds1

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569863520
 
 
   Any exception occur?

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] beijixi commented on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
beijixi commented on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569898192
 
 
   **Thanks**
   I add the reference symbol to all the columns,It has been running normally.
   

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu closed issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569860041
 
 
   What is your version? Can you provide your `sql.show`?

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu edited a comment on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569863703
 
 
   I guess in your SQL have some keyword of MySQL, such as `Password`, `Position`.
   Because of 4.0.0-RC1 is not stable, so can you try 4.0.0-RC3?

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569863703
 
 
   I guess in your SQL have some keyword of MySQL, such as `password`, `Position`.
   Because of 4.0.0-RC1 is not stable, so can you try 4.0.0-RC3?

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] beijixi edited a comment on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
beijixi edited a comment on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569860867
 
 
   **version**:4.0.0-RC1
   
   **sql.show:**
   **Logic SQL:** INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)
   
   **SQLStatement:** InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=LDPerson, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=LDPerson, quoteCharacter=NONE, schemaNameLength=0)], parametersIndex=0, logicSQL=INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[], values=[])
   
   **Actual SQL: ds0** ::: INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?) ::: [101901, 0000050380, Jason, 0, 1999-01-01T00:00:00.000+0800, 0, 212365432, null, null, null, null, null, null, null, 0.0, 0.0, null, null, null, null, null, null, null, null, null, 0.0, null, null, null, null, null, null, null, null, null, 1, null, cbs, 2019-12-31T00:00:00.000+0800, 12:14:10, 2019-12-31T00:00:00.000+0800, 12:14:10, null, null, null, null, null]
   
   **Actual SQL: ds1** ::: INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?) ::: [101901, 0000050380, Jason, 0, 1999-01-01T00:00:00.000+0800, 0, 212365432, null, null, null, null, null, null, null, 0.0, 0.0, null, null, null, null, null, null, null, null, null, 0.0, null, null, null, null, null, null, null, null, null, 1, null, cbs, 2019-12-31T00:00:00.000+0800, 12:14:10, 2019-12-31T00:00:00.000+0800, 12:14:10, null, null, null, null, null]

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] beijixi commented on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
beijixi commented on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569860867
 
 
   **version:**4.0.0-RC1
   
   **sql.show:**
   **Logic SQL:** INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)
   
   **SQLStatement:** InsertStatement(super=DMLStatement(super=AbstractSQLStatement(type=DML, tables=Tables(tables=[Table(name=LDPerson, alias=Optional.absent())]), routeConditions=Conditions(orCondition=OrCondition(andConditions=[])), encryptConditions=Conditions(orCondition=OrCondition(andConditions=[])), sqlTokens=[TableToken(tableName=LDPerson, quoteCharacter=NONE, schemaNameLength=0)], parametersIndex=0, logicSQL=INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?)), deleteStatement=false, updateTableAlias={}, updateColumnValues={}, whereStartIndex=0, whereStopIndex=0, whereParameterStartIndex=0, whereParameterEndIndex=0), columnNames=[], values=[])
   
   **Actual SQL: ds0** ::: INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?) ::: [101901, 0000050380, Jason, 0, 1999-01-01T00:00:00.000+0800, 0, 212365432, null, null, null, null, null, null, null, 0.0, 0.0, null, null, null, null, null, null, null, null, null, 0.0, null, null, null, null, null, null, null, null, null, 1, null, cbs, 2019-12-31T00:00:00.000+0800, 12:14:10, 2019-12-31T00:00:00.000+0800, 12:14:10, null, null, null, null, null]
   
   **Actual SQL: ds1** ::: INSERT INTO LDPerson(PersonID,CustomerNo,Name,Sex,Birthday,IDType,IDNo,Password,NativePlace,Nationality,RgtAddress,Marriage,MarriageDate,Health,Stature,Avoirdupois,Degree,CreditGrade,OthIDType,OthIDNo,ICNo,GrpNo,JoinCompanyDate,StartWorkDate,Position,Salary,OccupationType,OccupationCode,WorkType,PluralityType,DeathDate,SmokeFlag,BlacklistFlag,Proterty,Remark,State,VIPValue,Operator,MakeDate,MakeTime,ModifyDate,ModifyTime,GrpName,License,LicenseType,IDValidate,Socialinsuno) VALUES( ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ? , ?) ::: [101901, 0000050380, Jason, 0, 1999-01-01T00:00:00.000+0800, 0, 212365432, null, null, null, null, null, null, null, 0.0, 0.0, null, null, null, null, null, null, null, null, null, 0.0, null, null, null, null, null, null, null, null, null, 1, null, cbs, 2019-12-31T00:00:00.000+0800, 12:14:10, 2019-12-31T00:00:00.000+0800, 12:14:10, null, null, null, null, null]

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu edited a comment on issue #3840: Why does the INSERT SQL have no routing

Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #3840: Why does the INSERT SQL have no routing
URL: https://github.com/apache/incubator-shardingsphere/issues/3840#issuecomment-569863520
 
 
   Any exception or warning occur?

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


With regards,
Apache Git Services