Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-820

slices: a simple query is failing (unique, but totally sending wrong parameters to SQL)

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0.0-M2
    • None
    • slice
    • None

    Description

      Thank you for fixing that PCPath issue! Now I can move on to find the next bug to fix. And I didn't have to wait long:

      I am trying to run the simple query below, against 2 slices.

      select this from com.protrade.fandom.data.entities.TeamFanJersey this where this.teamFan = :p0

      These are the two queries run on the low level databases:

      SELECT t0.JDOID, t0.JERSEYLEVEL, t0.TEAMFAN_JDOID FROM TEAMFANJERSEY t0 WHERE (t0.TEAMFAN_JDOID IS NULL)

      SELECT t0.JDOID, t0.JERSEYLEVEL, t0.TEAMFAN_JDOID FROM TEAMFANJERSEY t0 WHERE (t0.TEAMFAN_JDOID = 8574250)

      As you can see, the query run against Slice1 thinks the parameter is Null, while the query run against Slice2, knows the proper value of the parameter. This SQL is the lowlevel sql sent through the Mysql Driver (mysql driver logging).

      I guess it's another bug in the DistributedPreparedStatement not properly setting parameters to all sub statements.. just a guess.

      Attachments

        1. bad-log.txt
          3.49 MB
          Fernando Padilla

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ppoddar@apache.org Pinaki Poddar
            fern Fernando Padilla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment