Bug #118079 An output message error
Submitted: 29 Apr 5:56 Modified: 7 Jul 22:30
Reporter: 策 吕 Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / J Severity:S3 (Non-critical)
Version:9.2.0, 9.3.0 OS:Any
Assigned to: CPU Architecture:Any

[29 Apr 5:56] 策 吕
Description:
It's important because it must be a mistake!!! Because this error is completely inconsistent with the most basic rules of math!!!

When I was using stmt.setMaxRows(-2147483648); I found the exception thrown : "setMaxRows() out of range. -2147483648 > 50000000.".Obviously this output is wrong, because it does not comply with the most basic rules of mathematical comparison at all!!!! If the range of setMaxRows() is 0-50000000, then the error should be "-2147483648 < 0".

How to repeat:
stmt.setMaxRows(-2147483648);
stmt.setMaxRows(-1);
[29 Apr 13:16] MySQL Verification Team
Hello 策 吕,

Thank you for the report and feedback.
Verified as described.

regards,
Umesh
[7 Jul 22:30] Daniel So
Posted by developer:
 
Added the following entry to the Connector/J 9.4.0 changelog: 

"When calling the method setMaxRows() with a negative argument, an exception was thrown with the incorrect message stating that the set value was larger than 50000000."
[16 Jul 18:14] Daniel So
Posted by developer:
 
Updated the changelog entry to the following: 

"When calling the method Statement.setMaxRows() with a negative argument, an exception was thrown with the incorrect message stating that the set value was larger than 50000000."