sql: make LIKE predicate dependent on collation
According to ANSI, LIKE should match characters taking into account passed collation. ISO/IEC JTC 1/SC 32 2011, Part 2: Foundation, 8.5 Closes #3589 @TarantoolBot document Title: LIKE depends on collations Now <LIKE> operator depends on arguments' collations. Collation to be used is determined by common rules: if explicit collation or collations (and in case they are compatible) is specified, then it is used to process pattern matching; otherwise implicit collation of arguments are checked to be compatible and (in case they are) resulting collation is used. Moreover, it means that PRAGMA "case_sensitive_like" has been removed.
Showing
- src/box/sql/func.c 61 additions, 36 deletionssrc/box/sql/func.c
- src/box/sql/sqlInt.h 1 addition, 1 deletionsrc/box/sql/sqlInt.h
- src/box/sql/whereexpr.c 30 additions, 5 deletionssrc/box/sql/whereexpr.c
- test/sql-tap/collation.test.lua 27 additions, 8 deletionstest/sql-tap/collation.test.lua
- test/sql-tap/gh-3251-string-pattern-comparison.test.lua 105 additions, 3 deletionstest/sql-tap/gh-3251-string-pattern-comparison.test.lua
- test/sql-tap/like3.test.lua 3 additions, 3 deletionstest/sql-tap/like3.test.lua
- test/sql-tap/whereG.test.lua 4 additions, 4 deletionstest/sql-tap/whereG.test.lua
Loading
Please register or sign in to comment