title: Strange error in mybatis mapper
body: <p>I have a simple select I wrote in a myBatis mapper:</p>
  
  <pre><code>&lt;select id="listAllOrders" parameterType="java.util.HashMap" resultMap="commonMaps.detailedOrderResultMap"&gt;
  
      select
  
      &lt;include refid="commonSql.fragmentOrderFields" /&gt;,
      &lt;include refid="commonSql.fragmentSummaryPriceInfoFields" /&gt;
  
      from graorder order 
            left outer join grasummarypriceinfo summarypriceinfo on order.totalPrice_id = summarypriceinfo.id
  
      &lt;if test="userGroupId != null"&gt;
          where order.userGroupId = #{userGroupId}
      &lt;/if&gt;
  
      order by order_lastUpdated desc
  
      &lt;if test="limit != null"&gt;
          limit #{limit}
      &lt;/if&gt;
  
  &lt;/select&gt;
  </code></pre>
  
  <p>The complaining when running this query is:</p>
  
  <pre><code> ### Error querying database.  Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntax
  ErrorException: You have an error in your SQL syntax; check the manual that corr
  esponds to your MySQL server version for the right syntax to use near 'left oute
  r join grasummarypriceinfo summarypriceinfo on order.totalPrice_id = su' at line
   33
  </code></pre>
  
  <p>I am simply discouraged. I can't see any error in my select...</p>
  
  <p>Do you have any clue?</p>