AlaSQL / alasql-sqllogictest

sqllogictest for AlaSQL
MIT License
1 stars 1 forks source link

Problem with the test and REPLACE #3

Open agershun opened 8 years ago

agershun commented 8 years ago

This is a the part of the test file

Last lines are:

REPLACE INTO t1 VALUES(4, 'replace (new)')

query IT rowsort
SELECT x, y FROM t1 WHERE x=4
----
4
replace (new)

But here there are no any lines with x=4. How REPLACE INTO should work here? Should it insert new value or just skip?

mathiasrw commented 8 years ago

Well.... its a good question. It seem a bit counter intuitive to insert when replace is requested.

To comply with the other DBs I recommend that REPLACE would be implemented as a short version of INSERT OR REPLACE