You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
proxy
Expected behavior
insert success
Actual behavior
IndexOutOfBoundsException
Reason analyze (If you can)
For some prepared SQL statements, if the number of parameters in the inserted statement is greater than the number of fields to be inserted, the method(createParameterColumnDefinition41Packets) in class(MySQLComStmtPrepareExecutor) will throw IndexOutOfBoundsException
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1、Use GoLang to execute the SQL statement
2、sql statement example:
insert into test_table (id, content, version, create_time) values (?, ?, ?, ?) ON DUPLICATE KEY UPDATE version = ?, update_time =?
Example codes for reproduce this issue (such as a github link).
Class : MySQLComStmtPrepareExecutor
The text was updated successfully, but these errors were encountered:
Bug Report
Which version of ShardingSphere did you use?
5.5.1
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
proxy
Expected behavior
insert success
Actual behavior
IndexOutOfBoundsException
![image](https://private-user-images.githubusercontent.com/41134045/401368946-ac823e77-1abc-4d67-ba71-aa3ca17d381f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODY1MzUsIm5iZiI6MTczOTM4NjIzNSwicGF0aCI6Ii80MTEzNDA0NS80MDEzNjg5NDYtYWM4MjNlNzctMWFiYy00ZDY3LWJhNzEtYWEzY2ExN2QzODFmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE4NTAzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhM2U3MzUwNWQ2ZTQ0MTlhYTBlODU0YWRlMThiZGIyZTdmZjg3OTk4YjUzYzYxZTllNDRjZTMwNDM5OGFlNTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4UJesYKxQIiDlLvr21sb-cxHe6bQVQkUdSFZX5GOqlY)
Reason analyze (If you can)
For some prepared SQL statements, if the number of parameters in the inserted statement is greater than the number of fields to be inserted, the method(createParameterColumnDefinition41Packets) in class(MySQLComStmtPrepareExecutor) will throw IndexOutOfBoundsException
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1、Use GoLang to execute the SQL statement
![image](https://private-user-images.githubusercontent.com/41134045/401369012-059a7c2e-5c84-4c1c-80df-9976d856d116.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODY1MzUsIm5iZiI6MTczOTM4NjIzNSwicGF0aCI6Ii80MTEzNDA0NS80MDEzNjkwMTItMDU5YTdjMmUtNWM4NC00YzFjLTgwZGYtOTk3NmQ4NTZkMTE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE4NTAzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUyOGM2ZDkwNGY0MjlkNDdmNmQ0YmRlZGE5OTA3MzU2NzQ4ZDJmMGI1NjIyNDEzYzIzMGZkMTYxMmI0MWM2ZTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.dbX8ndM5J6bimA9_HOcQhC7IO04S8cQEsS4xEBp8Gao)
2、sql statement example:
insert into test_table (id, content, version, create_time) values (?, ?, ?, ?) ON DUPLICATE KEY UPDATE version = ?, update_time =?
Example codes for reproduce this issue (such as a github link).
Class : MySQLComStmtPrepareExecutor
![image](https://private-user-images.githubusercontent.com/41134045/401369521-a6f6d9d1-dab5-4280-8684-1d8b419360b1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzODY1MzUsIm5iZiI6MTczOTM4NjIzNSwicGF0aCI6Ii80MTEzNDA0NS80MDEzNjk1MjEtYTZmNmQ5ZDEtZGFiNS00MjgwLTg2ODQtMWQ4YjQxOTM2MGIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDE4NTAzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTgwYWE4ZjIzYTczNGI2MzBhMjQ5MzUxNWM5YzJiM2ZlNTc1ZmYxMDg0MzA5MDE0ZTg0YTU5NDEzY2IzNDI5ZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.F0lsHDS4vMJyzdw8nXT2W2yi65SquDRuEBviqFE9Ih4)
The text was updated successfully, but these errors were encountered: