willholley opened a new pull request, #4828:
URL: https://github.com/apache/couchdb/pull/4828

   ## Overview
   In the initial implementation of $beginsWith, the range calculation for view 
indexes mistakenly appends an integer with the size of 8 bits which gets maxed 
out at FF, rather than building a binary with an extra 3 bytes at the end.
   
   Additionally, ICU defines the maximum sortable code point as `U+FFFF`. This 
is a more correct suffix when calculating the key range and is supported by 
older ICU versions (required for e.g. CentOS 7).
   
   This commit fixes the range calculation by correctly appending the `U+FFFF` 
code point in the range calculation. Additionally, we use the Erlang `utf8` 
binary type to verify that the result is a valid utf8 string.
   
   ## Testing recommendations
   
   `make mango-test`
   
   ## Related Issues or Pull Requests
   
   Initial implementation: #4810 
   
   ## Checklist
   
   - [ ] Code is written and works correctly
   - [ ] Changes are covered by tests
   - [ ] Any new configurable parameters are documented in 
`rel/overlay/etc/default.ini`
   - [ ] Documentation changes were made in the `src/docs` folder
   - [ ] Documentation changes were backported (separated PR) to affected 
branches
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@couchdb.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to