Project

General

Profile

Bug #2591

incorrect queries when MATCH operator is involved

Added by Ovidiu Maxiniuc almost 9 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:

History

#1 Updated by Ovidiu Maxiniuc almost 9 years ago

One test (CUSTOMER_SITE_7) of in the customer's testing batch was failing (not finding the record) for unknown reasons.

After investigations, I observed that the only distinctive feature of both the field and the pattern we were looking for was that they both were ending by spaces. Same number, so the query should have matched.

Looking into the generated SQL code, I noted that the field was rtrimmed. The analysis with testcases on P4GL test machines proved that we should not do the rtrim in this case (see testcases/uast/begins-matches4.p).

I checked the BEGIN operator too, and the same rule applies.

To fix this issue, I chose to check the grandparent of the node to be rtrimmed in HQLPreprocessor and if in one of the two cases above, the rtrim function is not inserted any more. With this change, both my testcase and original customer application testcase passed.

#2 Updated by Ovidiu Maxiniuc almost 9 years ago

For review, this is branch 2591a/, at revision 10882.

#3 Updated by Eric Faulhaber almost 9 years ago

  • Status changed from WIP to Test
  • Assignee set to Ovidiu Maxiniuc

Nice work tracking this down quickly and fixing it. 10882 on branch looks good. Please regression test. I'll run unit tests.

#4 Updated by Ovidiu Maxiniuc almost 9 years ago

  • Assignee deleted (Ovidiu Maxiniuc)
  • Status changed from Test to WIP

The 1st round of testing just ended. There are a lot (17) of failures in gso_ctrlc_tests and some in tc_tests (11 including dependencies). I am restarting it.

#5 Updated by Ovidiu Maxiniuc almost 9 years ago

  • Assignee set to Ovidiu Maxiniuc

#6 Updated by Ovidiu Maxiniuc almost 9 years ago

Taking into account the changes involved, I deem the update passed the regression testing. It looks like it did well in the ETF so I guess it is ready for commit.

#7 Updated by Eric Faulhaber almost 9 years ago

Please commit.

#8 Updated by Ovidiu Maxiniuc almost 9 years ago

Committed to bzr as revno 10886.

#9 Updated by Eric Faulhaber almost 9 years ago

  • Status changed from WIP to Closed
  • % Done changed from 0 to 100

#10 Updated by Greg Shah over 7 years ago

  • Target version changed from Milestone 11 to Cleanup and Stablization for Server Features

Also available in: Atom PDF