1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00
Files
sqlite/test/noop_update.test
dan 5e9d4c221d Restore the "PRAGMA noop_update" feature that was broken by [2b3241cf67c8eea7].
FossilOrigin-Name: 5fa4cbcb785125e72c7fd5cc2050637f2a2e854ee22aee05e8f09f751cd36291
2020-08-31 20:27:44 +00:00

37 lines
819 B
Plaintext

# 2020 September 01
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
set testprefix noop_update
if {[db eval {PRAGMA noop_update}]==""} {
finish_test
return
}
do_execsql_test 1.0 {
CREATE TABLE t1(x, y);
INSERT INTO t1 VALUES('a', 111);
}
do_execsql_test 1.1 {
UPDATE t1 SET y=222 WHERE x='a';
SELECT * FROM t1;
} {a 222}
do_execsql_test 1.2 {
PRAGMA noop_update = 1;
UPDATE t1 SET y=333 WHERE x='a';
SELECT * FROM t1;
} {a 222}
finish_test