⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 incrvacuum_ioerr.test

📁 sqlite-3.4.1,嵌入式数据库.是一个功能强大的开源数据库,给学习和研发以及小型公司的发展带来了全所未有的好处.
💻 TEST
字号:
# 2001 October 12## 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.##***********************************************************************# This file implements regression tests for SQLite library.  The# focus of this file is testing for correct handling of I/O errors# such as writes failing because the disk is full.# # The tests in this file use special facilities that are only# available in the SQLite test fixture.## $Id: incrvacuum_ioerr.test,v 1.2 2007/05/04 18:30:41 drh Exp $set testdir [file dirname $argv0]source $testdir/tester.tcl# If this build of the library does not support auto-vacuum, omit this# whole file.ifcapable {!autovacuum} {  finish_test  return}do_ioerr_test incrvacuum-ioerr-1 -cksum 1 -sqlprep {  PRAGMA auto_vacuum = 'incremental';  CREATE TABLE abc(a);  INSERT INTO abc VALUES(randstr(1500,1500));} -sqlbody {  BEGIN;  CREATE TABLE abc2(a);  DELETE FROM abc;  PRAGMA incremental_vacuum;  COMMIT;}# do_ioerr_test incrvacuum-ioerr-3 -start 1 -cksum 1 -tclprep {#   db eval {#     PRAGMA auto_vacuum = 'full';#     PRAGMA cache_size = 10;#     BEGIN;#     CREATE TABLE abc(a, UNIQUE(a));#   }#   for {set ii 0} {$ii < 25} {incr ii} {#     db eval {INSERT INTO abc VALUES(randstr(1500,1500))}#   }#   db eval COMMIT# } -sqlbody {#   BEGIN;#   DELETE FROM abc WHERE (oid%3)==0;#   INSERT INTO abc SELECT a || '1234567890' FROM abc WHERE oid%2;#   CREATE INDEX abc_i ON abc(a);#   DELETE FROM abc WHERE (oid%2)==0;#   DROP INDEX abc_i;#   COMMIT;# }do_ioerr_test incrvacuum-ioerr-2 -start 1 -cksum 1 -tclprep {  db eval {    PRAGMA auto_vacuum = 'full';    PRAGMA cache_size = 10;    BEGIN;    CREATE TABLE abc(a, UNIQUE(a));  }  for {set ii 0} {$ii < 25} {incr ii} {    db eval {INSERT INTO abc VALUES(randstr(1500,1500))}  }  db eval COMMIT} -sqlbody {  BEGIN;  PRAGMA incremental_vacuum;  DELETE FROM abc WHERE (oid%3)==0;  PRAGMA incremental_vacuum;  INSERT INTO abc SELECT a || '1234567890' FROM abc WHERE oid%2;  PRAGMA incremental_vacuum;  CREATE INDEX abc_i ON abc(a);  DELETE FROM abc WHERE (oid%2)==0;  PRAGMA incremental_vacuum;  DROP INDEX abc_i;  PRAGMA incremental_vacuum;  COMMIT;}finish_test

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -