亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? shared_err.test

?? 新版輕量級嵌入式數據庫
?? TEST
字號:
# 2005 December 30## 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.##***********************************************************************## The focus of the tests in this file are IO errors that occur in a shared# cache context. What happens to connection B if one connection A encounters# an IO-error whilst reading or writing the file-system?## $Id: shared_err.test,v 1.9 2006/01/24 16:37:59 danielk1977 Exp $proc skip {args} {}set testdir [file dirname $argv0]source $testdir/tester.tcldb closeifcapable !shared_cache||!subquery {  finish_test  return}set ::enable_shared_cache [sqlite3_enable_shared_cache 1]# Todo: This is a copy of the [do_malloc_test] proc in malloc.test# It would be better if these were consolidated.# Usage: do_malloc_test <test number> <options...>## The first argument, <test number>, is an integer used to name the# tests executed by this proc. Options are as follows:##     -tclprep          TCL script to run to prepare test.#     -sqlprep          SQL script to run to prepare test.#     -tclbody          TCL script to run with malloc failure simulation.#     -sqlbody          TCL script to run with malloc failure simulation.#     -cleanup          TCL script to run after the test.## This command runs a series of tests to verify SQLite's ability# to handle an out-of-memory condition gracefully. It is assumed# that if this condition occurs a malloc() call will return a# NULL pointer. Linux, for example, doesn't do that by default. See# the "BUGS" section of malloc(3).## Each iteration of a loop, the TCL commands in any argument passed# to the -tclbody switch, followed by the SQL commands in any argument# passed to the -sqlbody switch are executed. Each iteration the# Nth call to sqliteMalloc() is made to fail, where N is increased# each time the loop runs starting from 1. When all commands execute# successfully, the loop ends.#proc do_malloc_test {tn args} {  array unset ::mallocopts   array set ::mallocopts $args  set ::go 1  for {set ::n 1} {$::go && $::n < 50000} {incr ::n} {    do_test shared_malloc-$tn.$::n {      # Remove all traces of database files test.db and test2.db from the files      # system. Then open (empty database) "test.db" with the handle [db].      #       sqlite_malloc_fail 0      catch {db close}       catch {file delete -force test.db}      catch {file delete -force test.db-journal}      catch {file delete -force test2.db}      catch {file delete -force test2.db-journal}      catch {sqlite3 db test.db}       set ::DB [sqlite3_connection_pointer db]      # Execute any -tclprep and -sqlprep scripts.      #      if {[info exists ::mallocopts(-tclprep)]} {        eval $::mallocopts(-tclprep)      }      if {[info exists ::mallocopts(-sqlprep)]} {        execsql $::mallocopts(-sqlprep)      }      # Now set the ${::n}th malloc() to fail and execute the -tclbody and      # -sqlbody scripts.      #      sqlite_malloc_fail $::n      set ::mallocbody {}      if {[info exists ::mallocopts(-tclbody)]} {        append ::mallocbody "$::mallocopts(-tclbody)\n"      }      if {[info exists ::mallocopts(-sqlbody)]} {        append ::mallocbody "db eval {$::mallocopts(-sqlbody)}"      }      set v [catch $::mallocbody msg]      set leftover [lindex [sqlite_malloc_stat] 2]      if {$leftover>0} {        if {$leftover>1} {puts "\nLeftover: $leftover\nReturn=$v  Message=$msg"}        set ::go 0        if {$v} {          puts "\nError message returned: $msg"        } else {          set v {1 1}        }      } else {        set v2 [expr {$msg=="" || $msg=="out of memory"}]        if {!$v2} {puts "\nError message returned: $msg"}        lappend v $v2      }    } {1 1}    sqlite_malloc_fail 0    if {[info exists ::mallocopts(-cleanup)]} {      catch [list uplevel #0 $::mallocopts(-cleanup)] msg    }  }  unset ::mallocopts}do_ioerr_test shared_ioerr-1 -tclprep {  sqlite3 db2 test.db  execsql {    PRAGMA read_uncommitted = 1;    CREATE TABLE t1(a,b,c);    BEGIN;    SELECT * FROM sqlite_master;  } db2} -sqlbody {  SELECT * FROM sqlite_master;  INSERT INTO t1 VALUES(1,2,3);  BEGIN TRANSACTION;  INSERT INTO t1 VALUES(1,2,3);  INSERT INTO t1 VALUES(4,5,6);  ROLLBACK;  SELECT * FROM t1;  BEGIN TRANSACTION;  INSERT INTO t1 VALUES(1,2,3);  INSERT INTO t1 VALUES(4,5,6);  COMMIT;  SELECT * FROM t1;  DELETE FROM t1 WHERE a<100;} -cleanup {  do_test shared_ioerr-1.$n.cleanup.1 {    set res [catchsql {      SELECT * FROM t1;    } db2]    set possible_results [list            \      "1 {disk I/O error}"                \      "0 {1 2 3}"                         \      "0 {1 2 3 1 2 3 4 5 6}"             \      "0 {1 2 3 1 2 3 4 5 6 1 2 3 4 5 6}" \      "0 {}"                              \    ]    set rc [expr [lsearch -exact $possible_results $res] >= 0]    if {$rc != 1} {      puts ""      puts "Result: $res"    }    set rc  } {1}  db2 close}do_ioerr_test shared_ioerr-2 -tclprep {  sqlite3 db2 test.db  execsql {    PRAGMA read_uncommitted = 1;    BEGIN;    CREATE TABLE t1(a, b);    INSERT INTO t1(oid) VALUES(NULL);    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    INSERT INTO t1(oid) SELECT NULL FROM t1;    UPDATE t1 set a = oid, b = 'abcdefghijklmnopqrstuvwxyz0123456789';    CREATE INDEX i1 ON t1(a);    COMMIT;    BEGIN;    SELECT * FROM sqlite_master;  } db2} -tclbody {  set ::residx 0  execsql {DELETE FROM t1 WHERE 0 = (a % 2);}  incr ::residx  # When this transaction begins the table contains 512 entries. The  # two statements together add 512+146 more if it succeeds.   # (1024/7==146)  execsql {BEGIN;}  execsql {INSERT INTO t1 SELECT a+1, b FROM t1;}  execsql {INSERT INTO t1 SELECT 'string' || a, b FROM t1 WHERE 0 = (a%7);}  execsql {COMMIT;}  incr ::residx} -cleanup {  do_test shared_ioerr-2.$n.cleanup.1 {    set res [catchsql {      SELECT max(a), min(a), count(*) FROM (SELECT a FROM t1 order by a);    } db2]    set possible_results [list \      {0 {1024 1 1024}}        \      {0 {1023 1 512}}         \      {0 {string994 1 1170}}   \    ]    set idx [lsearch -exact $possible_results $res]    set success [expr {$idx==$::residx || $res=="1 {disk I/O error}"}]    if {!$success} {      puts ""      puts "Result: \"$res\" ($::residx)"    }    set success  } {1}  db2 close}# This test is designed to provoke an IO error when a cursor position is# "saved" (because another cursor is going to modify the underlying table). # do_ioerr_test shared_ioerr-3 -tclprep {  sqlite3 db2 test.db  execsql {    PRAGMA read_uncommitted = 1;    PRAGMA cache_size = 10;    BEGIN;    CREATE TABLE t1(a, b, UNIQUE(a, b));  } db2  for {set i 0} {$i < 200} {incr i} {    set a [string range [string repeat "[format %03d $i]." 5] 0 end-1]    set b [string repeat $i 2000]    execsql {INSERT INTO t1 VALUES($a, $b)} db2  }  execsql {COMMIT} db2  set ::DB2 [sqlite3_connection_pointer db2]  set ::STMT [sqlite3_prepare $::DB2 "SELECT a FROM t1 ORDER BY a" -1 DUMMY]  sqlite3_step $::STMT       ;# Cursor points at 000.000.000.000  sqlite3_step $::STMT       ;# Cursor points at 001.001.001.001} -tclbody {  execsql {    BEGIN;    INSERT INTO t1 VALUES('201.201.201.201.201', NULL);    UPDATE t1 SET a = '202.202.202.202.202' WHERE a LIKE '201%';    COMMIT;  }} -cleanup {  do_test shared_ioerr-3.$n.cleanup.1 {    sqlite3_step $::STMT  } {SQLITE_ROW}  do_test shared_ioerr-3.$n.cleanup.2 {    sqlite3_column_text $::STMT 0  } {002.002.002.002.002}  do_test shared_ioerr-3.$n.cleanup.3 {    sqlite3_finalize $::STMT  } {SQLITE_OK}# db2 eval {select * from sqlite_master}  db2 close}# Only run these tests if memory debugging is turned on.#if {[info command sqlite_malloc_stat]==""} {   puts "Skipping malloc tests: not compiled with -DSQLITE_MEMDEBUG..."   db close   sqlite3_enable_shared_cache $::enable_shared_cache   finish_test   return}# Provoke a malloc() failure when a cursor position is being saved. This# only happens with index cursors (because they malloc() space to save the# current key value). It does not happen with tables, because an integer# key does not require a malloc() to store. ## The library should return an SQLITE_NOMEM to the caller. The query that# owns the cursor (the one for which the position is not saved) should# continue unaffected.# do_malloc_test 4 -tclprep {  sqlite3 db2 test.db  execsql {    PRAGMA read_uncommitted = 1;    BEGIN;    CREATE TABLE t1(a, b, UNIQUE(a, b));  } db2  for {set i 0} {$i < 5} {incr i} {    set a [string repeat $i 10]    set b [string repeat $i 2000]    execsql {INSERT INTO t1 VALUES($a, $b)} db2  }  execsql {COMMIT} db2  set ::DB2 [sqlite3_connection_pointer db2]  set ::STMT [sqlite3_prepare $::DB2 "SELECT a FROM t1 ORDER BY a" -1 DUMMY]  sqlite3_step $::STMT       ;# Cursor points at 0000000000  sqlite3_step $::STMT       ;# Cursor points at 1111111111} -tclbody {  execsql {    INSERT INTO t1 VALUES(6, NULL);  }} -cleanup {  do_test shared_malloc-4.$::n.cleanup.1 {    set ::rc [sqlite3_step $::STMT]    expr {$::rc=="SQLITE_ROW" || $::rc=="SQLITE_ABORT"}  } {1}  if {$::rc=="SQLITE_ROW"} {    do_test shared_malloc-4.$::n.cleanup.2 {      sqlite3_column_text $::STMT 0    } {2222222222}  }  do_test shared_malloc-4.$::n.cleanup.3 {    sqlite3_finalize $::STMT  } {SQLITE_OK}# db2 eval {select * from sqlite_master}  db2 close}do_malloc_test 5 -tclbody {  sqlite3 dbX test.db  sqlite3 dbY test.db  dbX close  dbY close} -cleanup {  catch {dbX close}  catch {dbY close}}do_malloc_test 6 -tclbody {  catch {db close}  sqlite3_thread_cleanup  sqlite3_enable_shared_cache 0} -cleanup {  sqlite3_enable_shared_cache 1}do_test shared_misuse-7.1 {  sqlite3 db test.db  catch {    sqlite3_enable_shared_cache 0  } msg  set msg} {library routine called out of sequence}# Again provoke a malloc() failure when a cursor position is being saved, # this time during a ROLLBACK operation by some other handle. ## The library should return an SQLITE_NOMEM to the caller. The query that# owns the cursor (the one for which the position is not saved) should# be aborted.# set ::aborted 0do_malloc_test 8 -tclprep {  sqlite3 db2 test.db  execsql {    PRAGMA read_uncommitted = 1;    BEGIN;    CREATE TABLE t1(a, b, UNIQUE(a, b));  } db2  for {set i 0} {$i < 2} {incr i} {    set a [string repeat $i 10]    set b [string repeat $i 2000]    execsql {INSERT INTO t1 VALUES($a, $b)} db2  }  execsql {COMMIT} db2  set ::DB2 [sqlite3_connection_pointer db2]  set ::STMT [sqlite3_prepare $::DB2 "SELECT a FROM t1 ORDER BY a" -1 DUMMY]  sqlite3_step $::STMT       ;# Cursor points at 0000000000  sqlite3_step $::STMT       ;# Cursor points at 1111111111} -tclbody {  execsql {    BEGIN;    INSERT INTO t1 VALUES(6, NULL);    ROLLBACK;  }} -cleanup {  do_test shared_malloc-8.$::n.cleanup.1 {    lrange [execsql {      SELECT a FROM t1;    } db2] 0 1  } {0000000000 1111111111}  do_test shared_malloc-8.$::n.cleanup.2 {    set rc1 [sqlite3_step $::STMT]    set rc2 [sqlite3_finalize $::STMT]    if {$rc1=="SQLITE_ABORT"} {      incr ::aborted    }    expr {      ($rc1=="SQLITE_DONE" && $rc2=="SQLITE_OK") ||       ($rc1=="SQLITE_ABORT" && $rc2=="SQLITE_OK")    }  } {1}  db2 close}do_test shared_malloc-8.X {  # Test that one or more queries were aborted due to the malloc() failure.  expr $::aborted>=1} {1}catch {db close}sqlite3_enable_shared_cache $::enable_shared_cachefinish_test

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97久久久精品综合88久久| 国产乱子伦视频一区二区三区 | 国产精品一级片在线观看| 日韩欧美一区在线观看| 日韩黄色免费电影| 欧美一级高清大全免费观看| 麻豆免费看一区二区三区| 欧美一区二区女人| 国内精品免费在线观看| 国产三级精品三级在线专区| 波多野结衣亚洲一区| 亚洲精品久久7777| 欧美裸体bbwbbwbbw| 久久99久久久欧美国产| 久久婷婷色综合| 99久久免费国产| 亚洲va欧美va人人爽| 久久综合av免费| youjizz国产精品| 亚洲男女一区二区三区| 欧美精品777| 狠狠久久亚洲欧美| 18成人在线视频| 欧美日韩国产123区| 麻豆精品一区二区综合av| 亚洲欧洲性图库| 欧美色网一区二区| 精品一区二区三区视频| 亚洲女与黑人做爰| 日韩精品中文字幕一区二区三区| 粉嫩欧美一区二区三区高清影视| 亚洲精品中文字幕在线观看| 欧美一区二区三区性视频| 国产成人aaa| 午夜视频一区在线观看| 久久精品人人爽人人爽| 欧美色图片你懂的| 国产毛片精品视频| 亚洲bt欧美bt精品777| 精品粉嫩超白一线天av| 一本色道久久综合亚洲aⅴ蜜桃 | 国产欧美日韩精品一区| 欧美三级韩国三级日本三斤| 韩国毛片一区二区三区| 亚洲最新在线观看| 欧美激情一区二区三区| 欧美疯狂性受xxxxx喷水图片| 国产成人在线免费| 日韩电影免费在线| 亚洲免费观看高清| 欧美高清一级片在线观看| 这里只有精品99re| 色综合欧美在线| 国产精品一区二区你懂的| 日韩成人免费看| 一区二区三区免费网站| 国产日韩成人精品| 欧美一级高清片| 欧美艳星brazzers| 972aa.com艺术欧美| 国产盗摄视频一区二区三区| 麻豆精品在线播放| 日韩av二区在线播放| 亚洲一区二区在线视频| 中文字幕一区二区三区不卡| 久久久久久久久久看片| 日韩女优av电影在线观看| 欧美久久久久久久久中文字幕| 色成人在线视频| 99久久伊人久久99| 成人综合日日夜夜| 国产成人精品www牛牛影视| 成人午夜电影网站| 国产精品一二三四| 国产又黄又大久久| 国产一区二区三区精品视频| 日韩av中文字幕一区二区| 午夜欧美2019年伦理| 亚洲午夜精品久久久久久久久| 亚洲精品视频观看| 亚洲视频 欧洲视频| 亚洲欧美影音先锋| 亚洲欧美视频在线观看视频| 中文字幕一区免费在线观看| 国产精品灌醉下药二区| 中文字幕色av一区二区三区| 国产精品欧美一区喷水| 国产精品欧美精品| 亚洲精品视频一区二区| 亚洲一线二线三线视频| 亚洲一区二区不卡免费| 午夜精品久久久久久久蜜桃app| 亚洲一区二区三区视频在线 | 亚洲国产精品一区二区久久| 亚洲成av人片在www色猫咪| 亚洲成av人影院在线观看网| 日韩电影在线一区二区三区| 美腿丝袜亚洲综合| 国产精品一卡二卡| 91色视频在线| 欧美人妇做爰xxxⅹ性高电影| 欧美精品tushy高清| 日韩欧美国产电影| 久久久亚洲国产美女国产盗摄| 欧美激情一区二区在线| 一区二区三区欧美日| 一区二区在线看| 91在线观看一区二区| 91蜜桃免费观看视频| 欧美在线|欧美| 7777精品伊人久久久大香线蕉完整版 | 日韩美女在线视频| 久久久久久久久久久久久夜| 中文字幕在线播放不卡一区| 午夜影视日本亚洲欧洲精品| 免费精品视频最新在线| 成人一区二区视频| 欧美日韩亚洲综合一区二区三区| 欧美成人猛片aaaaaaa| 国产精品久久久久久久久免费丝袜 | 国产精品一级在线| 91成人网在线| 久久综合九色综合97_久久久| 综合欧美亚洲日本| 另类调教123区 | 国内精品久久久久影院薰衣草| 成人永久aaa| 欧美二区在线观看| 中文字幕中文在线不卡住| 日日夜夜免费精品| 成人一道本在线| 欧美一区二区三区色| 国产精品白丝在线| 久久99国产精品尤物| 欧美日韩精品电影| 一色屋精品亚洲香蕉网站| 美女在线观看视频一区二区| 91久久免费观看| 精品国产青草久久久久福利| 有码一区二区三区| 成人黄色av网站在线| 欧美xxx久久| 婷婷中文字幕一区三区| 97久久人人超碰| 国产蜜臀av在线一区二区三区| 丝袜诱惑亚洲看片| 色哟哟一区二区在线观看| 国产亚洲婷婷免费| 久久激情五月婷婷| 7777精品伊人久久久大香线蕉完整版| 亚洲国产精品t66y| 国产麻豆视频一区二区| 欧美一级夜夜爽| 午夜久久久久久久久| 欧美在线一二三四区| 国产精品成人在线观看| 成人av资源在线观看| 久久天天做天天爱综合色| 天天做天天摸天天爽国产一区| 一本久道中文字幕精品亚洲嫩 | 亚洲欧洲日产国码二区| 国产乱码精品一区二区三 | 色菇凉天天综合网| 亚洲色图制服诱惑 | av电影在线观看不卡| 国产日韩欧美一区二区三区乱码| 久久99精品久久久久婷婷| 欧美一级日韩不卡播放免费| 午夜激情久久久| 欧美日韩国产高清一区二区| 亚洲一区二区三区三| 欧美无人高清视频在线观看| 一区二区三区不卡在线观看| 色噜噜久久综合| 亚洲激情自拍视频| 在线观看欧美精品| 天天综合日日夜夜精品| 欧美日韩夫妻久久| 日韩精品视频网| 欧美成人午夜电影| 国产在线观看免费一区| 国产欧美精品一区| 99久久99久久免费精品蜜臀| 中文字幕在线观看不卡| 欧洲一区在线观看| 午夜精品成人在线| 日韩三级免费观看| 国产精品2024| 国产精品久久二区二区| 91麻豆精品视频| 午夜a成v人精品| 精品国产乱码久久| www.日韩大片| 午夜电影久久久| 亚洲精品一区二区三区蜜桃下载| 国产精品一二一区| 亚洲美女视频在线观看| 欧美日韩美女一区二区| 美女视频免费一区| 国产精品久久久久aaaa|