sql: implicit boolean cast to text returns uppercase
Explicit cast uses uppercase, and the patch makes the implicit cast the same. Upper case is the standard according to SQL standard 2011, cast specification 6.13, general rules 11.e: General rules 11) If TD is variable-length character string or large object character string, then let MLTD be the maximum length in characters of TD. e) If SD (source type) is boolean, then Case: i) If SV is True and MLTD is not less than 4, then TV is 'TRUE'. ii) If SV is False and MLTD is not less than 5, then TV is 'FALSE'. iii) Otherwise, an exception condition is raised: data exception — invalid character value for cast. Part of #4462
Showing
- src/box/sql/func.c 3 additions, 2 deletionssrc/box/sql/func.c
- src/box/sql/sqlInt.h 9 additions, 0 deletionssrc/box/sql/sqlInt.h
- src/box/sql/vdbe.c 1 addition, 1 deletionsrc/box/sql/vdbe.c
- src/box/sql/vdbemem.c 6 additions, 4 deletionssrc/box/sql/vdbemem.c
- test/sql/boolean.result 325 additions, 324 deletionstest/sql/boolean.result
- test/sql/boolean.test.sql 1 addition, 0 deletionstest/sql/boolean.test.sql
- test/sql/types.result 2 additions, 2 deletionstest/sql/types.result
Loading
Please register or sign in to comment