sql: properly show values in type mismatch error
Currently, some values are displayed improperly in the type mismatch error description. For VARBINARY, the word "varbinary" is printed instead of the value. STRING values are printed without quotes, which can be confusing in some cases, such as when it consists of spaces. This patch introduces the following changes: 1) VARBINARY value will be printed as x'<value in hexadecimal format>'. 2) STRING value will be printed in single quotes. 3) UUID value will be printed in single quotes. UUID value does not need to be enclosed in single quotes, since there are no literals for UUIDs, but it looks more convenient. Part of #6176
Showing
- src/box/sql/mem.c 16 additions, 5 deletionssrc/box/sql/mem.c
- test/sql-tap/autoinc.test.lua 2 additions, 2 deletionstest/sql-tap/autoinc.test.lua
- test/sql-tap/cast.test.lua 10 additions, 10 deletionstest/sql-tap/cast.test.lua
- test/sql-tap/func.test.lua 4 additions, 4 deletionstest/sql-tap/func.test.lua
- test/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua 2 additions, 2 deletionstest/sql-tap/gh-4766-wrong-cast-from-blob-to-int.test.lua
- test/sql-tap/gh-5913-segfault-on-select-uuid.test.lua 2 additions, 2 deletionstest/sql-tap/gh-5913-segfault-on-select-uuid.test.lua
- test/sql-tap/index1.test.lua 2 additions, 2 deletionstest/sql-tap/index1.test.lua
- test/sql-tap/select1.test.lua 2 additions, 2 deletionstest/sql-tap/select1.test.lua
- test/sql-tap/select5.test.lua 1 addition, 1 deletiontest/sql-tap/select5.test.lua
- test/sql-tap/sql-errors.test.lua 52 additions, 13 deletionstest/sql-tap/sql-errors.test.lua
- test/sql-tap/tkt-80e031a00f.test.lua 4 additions, 4 deletionstest/sql-tap/tkt-80e031a00f.test.lua
- test/sql-tap/tkt-9a8b09f8e6.test.lua 10 additions, 10 deletionstest/sql-tap/tkt-9a8b09f8e6.test.lua
- test/sql-tap/uuid.test.lua 39 additions, 39 deletionstest/sql-tap/uuid.test.lua
- test/sql/boolean.result 140 additions, 140 deletionstest/sql/boolean.result
- test/sql/integer-overflow.result 1 addition, 1 deletiontest/sql/integer-overflow.result
- test/sql/persistency.result 1 addition, 1 deletiontest/sql/persistency.result
- test/sql/types.result 29 additions, 29 deletionstest/sql/types.result
Loading
Please register or sign in to comment