Very strange and AFAICT not documented. I would not have though that calling 
sqlite3_value_nochange on argv[1] was even legal, given that it would 
correspond to field number -1. Could you provide an "explain" (SQlite bytecode 
program dump) of your statement?

-----Ursprüngliche Nachricht-----
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Kevin Martin
Gesendet: Dienstag, 13. August 2019 13:23
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: Re: [sqlite] [EXTERNAL] Correct use of 
sqlite3_vtab_nochange/sqlite3_value_nochange


> On 12 Aug 2019, at 07:53, Hick Gunter <h...@scigames.at> wrote:
>
> You did not state your argc and argv[0] values,

Apologies, it is a 2 column table. Full details are:

- argc is 4
- argv[0] is the value of the primary key for the row I want to update.
- argv[1] is SQLITE_NULL, but as described, sqlite3_value_nochange(argv[1]) 
returns true
- argv[2] is the same as argv[1] (null, but sqlite3_value_nochange returns true)
- argv[3] is the new value of the non-primary key column.

> so looking at the documentation would suggest that SQLite is actually asking 
> for an INSERT into a WITHOUT ROWID virtual table.

I see that is what the documentation leads you to believe, but I can assure you 
I am exciting an update of the form

update t set notprimarykey='some value' where primarykey='other value'

Removing the sqlite3_vtab_nochange from the xColumn call gets the documented 
behaviour. If I keep the sqlite3_vtab_nochange and change my code in xUpdate as 
described in the last email, everything seems to work. I just want to check it 
is correct.

Thanks,
Kev
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___________________________________________
 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to