Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: separate VDBE memory holding positive and negative ints
As it was stated in the previous commit message, we are going to support operations on unsigned values. Since unsigned and signed integers have different memory representations, to provide correct results of arithmetic operations we should be able to tell whether value is signed or not. This patch introduces new type of value placed in VDBE memory cell - MEM_UInt. This flag means that value is integer and greater than zero, hence can be fitted in range [0, 2^64 - 1]. Such approach would make further replacing MEM_* flags with MP_ format types quite easy: during decoding and encoding msgpack we assume that negative integers have MP_INT type and positive - MP_UINT. We also add and refactor several auxiliary helpers to operate on integers. Note that current changes don't add ability to operate on unsigned integers - it is still unavailable. Needed for #3810 Needed for #4015
- Loading branch information
1 parent
dfe5912
commit 1fed024
Showing
11 changed files
with
375 additions
and
264 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.