You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UPDATE t SET a = DEFAULT writes undefined instead of the column default #2877
UPDATE t SET a = DEFAULT writes undefined into the column instead of its default, without an error.
vardb=newalasql.Database();db.exec('CREATE TABLE t (a INT DEFAULT 5, b INT); INSERT INTO t VALUES (1, 1)');db.exec('UPDATE t SET a = DEFAULT');db.exec('SELECT * FROM t');// [{b: 1}] (4.20.0: parse error)
Expected: [{a: 5, b: 1}].
Since #2683 (in 4.21.0), which made DEFAULT usable as a name: here it is read as a column named default, which does not exist. INSERT ... VALUES (DEFAULT, ...) throws a TypeError for the same reason (#2791). The fix: read DEFAULT as the column default in SET and in VALUES before it is read as a name, with a test for both.
Activity
Read DEFAULT as the column default in SET and VALUES to close AlaSQL#…
Make DEFAULT context-aware keywords to close in SET and VALUES to to c…