-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EZP-26209 Textline legacy search indexing causes TransactionError #1268
Conversation
Causes SQL error: ezsystems#1264 - Out of range value for column 'integer_value' at row 1 @integerValue generation the value needs to be verified against MySQL's max int value.
ping @joaoinacio |
+1 I have the same error |
I run into the same issue. |
@@ -96,7 +96,11 @@ public function addObject( $contentObject, $commit = true ) | |||
// Split text on whitespace | |||
if ( is_numeric( trim( $text ) ) ) | |||
{ | |||
$integerValue = (int) $text; | |||
//verify if value does not exceed MySQL int(11) unsigned maximum value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: Based on magic number one line below, I think that you have on your mind the maximum signed value of int
. MySQL documentation says (https://dev.mysql.com/doc/refman/5.7/en/integer-types.html) that maximum unsigned value of int is 4294967295
😉
What is the "integer_value" field used for anyway? That would determine whether setting it to "0" (rather than the max value, for example) is an appropriate action. |
It is possible to define a searchtype. In the types integer, integers, byrange, byidentifierrange, integersbyidentifier the integer_value is used. I would prefer the changes from @pkamps in his fork :) |
@blankse Which changes do you refer to? this one linking here? mugoweb#70 |
@andrerom Yes, the linked one. It set the max value and takes the min value into account. |
@blankse with only nitpic of not referring just to mysql on the constants, I agree, it's a cleaner approach. Maybe something that can be opened here? |
Closing, handled in #1338 |
Causes SQL error: #1264 - Out of range value for column 'integer_value' at row 1
@integerValue generation the value needs to be verified against MySQL's max int value.