crashme2.off
来自「sqlite数据库源码」· OFF 代码 · 共 50 行
OFF
50 行
set testdir [file dirname $argv0]source $testdir/tester.tcldb closeset DB [sqlite db test.db]execsql { CREATE TABLE t1(a); INSERT INTO t1 VALUES(1); INSERT INTO t1 VALUES(2); INSERT INTO t1 VALUES(3); INSERT INTO t1 VALUES(4);}do_test capi3-13.1 { execsql { CREATE TABLE t3(a unique on conflict rollback); INSERT INTO t3 SELECT a FROM t1; BEGIN; INSERT INTO t1 SELECT * FROM t1; }} {}do_test capi3-13.2 { set STMT [sqlite_compile $DB "SELECT a FROM t1" TAIL] sqlite_step $STMT sqlite_step $STMT sqlite_step $STMT sqlite_step $STMT sqlite_step $STMT} {SQLITE_ROW}do_test capi3-13.3 {# This causes a ROLLBACK, which deletes the table out from underneath the# SELECT statement. Causes a crash. catchsql { INSERT INTO t3 SELECT a FROM t1; }} {1 {column a is not unique}}do_test capi3-13.4 { sqlite_step $STMT sqlite_step $STMT sqlite_step $STMT sqlite_step $STMT} {SQLITE_DONE}do_test capi3-13.5 { sqlite_finalize $STMT} {SQLITE_OK}finish_test
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?