Ai
8 Star 20 Fork 10

Gitee 极速下载/sqlite

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/sqlite/sqlite
克隆/下载
existsfault.test 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
dan 提交于 2024-06-09 02:13 +08:00 . Add extra tests for the changes on this branch.
# 2024 May 25
#
# 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
source $testdir/lock_common.tcl
source $testdir/malloc_common.tcl
set testprefix existsfault
db close
sqlite3_shutdown
sqlite3_config_lookaside 0 0
sqlite3_initialize
autoinstall_test_functions
sqlite3 db test.db
do_execsql_test 1.0 {
CREATE TABLE x1(a, b);
INSERT INTO x1 VALUES(1, 2), (3, 4), (5, 6);
CREATE UNIQUE INDEX x1a ON x1(a);
CREATE INDEX x1b ON x1(b);
CREATE TABLE x2(x, y);
INSERT INTO x2 VALUES(1, 2), (3, 4), (5, 6);
}
do_faultsim_test 1 -faults oom* -prep {
sqlite3 db test.db
execsql { SELECT * FROM sqlite_schema }
} -body {
execsql {
SELECT count(*) FROM x2 WHERE EXISTS (SELECT 1 FROM x1 WHERE a=x) AND y!=11
}
} -test {
faultsim_test_result {0 3}
}
finish_test
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/mirrors/sqlite.git
git@gitee.com:mirrors/sqlite.git
mirrors
sqlite
sqlite
master

搜索帮助