Ticket Hash: | 7d4b236572e4302d8275920bbda5c2c4f811db69 | |||
Title: | Sql formatting used int32 instead of int64 | |||
Status: | Closed | Type: | Code_Defect | |
Severity: | Critical | Priority: | Immediate | |
Subsystem: | Resolution: | Fixed | ||
Last Modified: | 2018-07-29 20:00:45 | |||
Version Found In: | ||||
User Comments: | ||||
anonymous added on 2018-03-21 03:37:22:
Based on reported issue: Using VirtualPG such as INSERT INTO pg_table(id) VALUES (110100014258002); where pg_table is the virtual table, which connects to a pg table with a bigint field, actually inserts a value -1472374958.(bigint = int8 = signed long = SQLITE_INTEGER) This is possibly caused in 2 places in the 'virtualpg.c' code where:
is being used. Changing these 2 statements in vpgInsertRow
vpgUpdateRow
should resolve the problem. Everything else seems to properly support int64 (vpgSetIntValue formats from string to sqlite3_int64 value). The Postgres CTID seems to be 32 bit (OID is documented as such, but no meantion of the type for CTID)
8.12. Object Identifier Types
The only other use of sqlite3_value_int are for BOOLEAN values. So everything else looks correct. Mark sandro added on 2018-07-29 20:00:45: fixed by commit 184b370334 |