Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

wawrzynkiewicz
Copy link

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.

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.
@yannickroger
Copy link
Contributor

ping @joaoinacio
Also keep in mind that we also support PGsql.

@blankse
Copy link
Contributor

blankse commented Jul 21, 2017

+1 I have the same error

@pkamps
Copy link
Contributor

pkamps commented Sep 18, 2017

I run into the same issue.

andrerom
andrerom previously approved these changes Sep 19, 2017
@andrerom andrerom requested a review from adamwojs September 19, 2017 19:09
@@ -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
Copy link
Member

@adamwojs adamwojs Sep 20, 2017

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 😉

@peterkeung
Copy link
Contributor

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.

@andrerom andrerom dismissed their stale review November 21, 2017 10:43

PR still in discussion

@blankse
Copy link
Contributor

blankse commented Dec 19, 2017

It is possible to define a searchtype.
https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L1356

In the types integer, integers, byrange, byidentifierrange, integersbyidentifier the integer_value is used.

I would prefer the changes from @pkamps in his fork :)

@andrerom
Copy link
Contributor

andrerom commented Dec 19, 2017

@blankse Which changes do you refer to?

this one linking here? mugoweb#70

@blankse
Copy link
Contributor

blankse commented Dec 19, 2017

@andrerom Yes, the linked one.

It set the max value and takes the min value into account.

@andrerom
Copy link
Contributor

andrerom commented Dec 19, 2017

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

@andrerom
Copy link
Contributor

Closing, handled in #1338

@andrerom andrerom closed this Dec 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants