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

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

?? shared_err.test

?? sqlite庫
?? 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一区二区三区免费野_久草精品视频
午夜欧美在线一二页| av日韩在线网站| 日本系列欧美系列| 亚洲成人av电影在线| 一区二区成人在线| 亚洲高清三级视频| 日韩在线观看一区二区| 日韩成人精品在线| 国内成人免费视频| 激情综合亚洲精品| 国产传媒日韩欧美成人| 成a人片亚洲日本久久| av网站一区二区三区| 在线一区二区视频| 欧美日韩国产综合久久| 欧美日韩国产综合草草| 欧美一级欧美三级| 精品美女一区二区三区| 国产香蕉久久精品综合网| 国产精品天天摸av网| 亚洲欧美中日韩| 亚洲一区二区三区免费视频| 亚洲国产精品一区二区久久恐怖片| 午夜欧美大尺度福利影院在线看| 日精品一区二区三区| 精品一区二区三区蜜桃| 成人性生交大片免费看中文| 97se亚洲国产综合在线| 宅男在线国产精品| 国产亚洲欧美日韩日本| 一二三四社区欧美黄| 日韩电影在线看| 国产成人亚洲综合a∨猫咪| 一本色道a无线码一区v| 欧美一区二区三区免费视频| 国产欧美日韩卡一| 亚洲一区二区三区四区在线观看| 美国十次了思思久久精品导航| 国产黄人亚洲片| 欧美伊人精品成人久久综合97| 欧美大片拔萝卜| 国产精品传媒入口麻豆| 亚洲成人激情社区| 国产伦精品一区二区三区视频青涩| 99视频有精品| 日韩欧美在线123| 国产精品青草综合久久久久99| 午夜视频久久久久久| 国产宾馆实践打屁股91| 欧美日韩国产综合一区二区三区| 国产日韩影视精品| 视频在线观看国产精品| 成人丝袜18视频在线观看| 欧美日本韩国一区| 国产精品久久久久永久免费观看 | 九色综合狠狠综合久久| 成人aa视频在线观看| 日韩色视频在线观看| 亚洲视频一区在线观看| 精品综合免费视频观看| 欧美性videosxxxxx| 久久九九99视频| 蜜臀久久久99精品久久久久久| www.在线成人| 久久夜色精品国产噜噜av| 亚洲一区免费视频| 不卡视频一二三四| 欧美白人最猛性xxxxx69交| 一区二区三区美女| 成人性生交大片免费看中文| 精品国产乱码久久| 日韩成人一级片| 欧美在线不卡一区| 国产精品美女一区二区三区| 精品在线一区二区| 欧美精品黑人性xxxx| 一卡二卡欧美日韩| 99久久er热在这里只有精品15| 久久久久久久网| 麻豆精品久久精品色综合| 欧美在线你懂得| 亚洲精品久久7777| 99久久精品国产毛片| 国产精品无人区| 国产黄色成人av| 久久人人97超碰com| 蜜桃久久久久久| 91精品国产综合久久精品图片| 亚洲精品菠萝久久久久久久| 成人黄色a**站在线观看| 国产午夜亚洲精品午夜鲁丝片| 极品少妇xxxx精品少妇| 欧美sm美女调教| 久久精品国产99| 91精品国产高清一区二区三区蜜臀| 亚洲国产精品一区二区久久| 91高清在线观看| 亚洲图片欧美视频| 欧美日韩欧美一区二区| 亚洲成人免费影院| 6080午夜不卡| 日韩在线一区二区| 欧美一级在线视频| 老鸭窝一区二区久久精品| 欧美一区二区大片| 美女视频免费一区| 久久亚洲一区二区三区四区| 国产一区二区精品久久99| 精品对白一区国产伦| 国产一区久久久| 久久久久久影视| 国产成人在线影院| 国产精品久久久99| 欧洲亚洲精品在线| 日韩av二区在线播放| 精品成人一区二区| 国产一区二区美女| 中文字幕一区二区三区在线播放| 91视频com| 丝袜美腿亚洲色图| 亚洲精品一区二区三区四区高清| 国产一区二区三区av电影| 亚洲国产精品成人综合| 91小视频在线观看| 亚洲一二三四久久| 日韩欧美综合一区| 丁香婷婷综合五月| 亚洲精品亚洲人成人网| 欧美精品三级日韩久久| 国产制服丝袜一区| 国产精品福利一区| 欧美日韩中文国产| 精品一区二区在线播放| 中文字幕一区二区不卡| 欧美精品三级在线观看| 国产精品一品视频| 亚洲一区在线观看免费观看电影高清| 欧美一区二区性放荡片| 国产不卡免费视频| 午夜精品一区在线观看| 久久夜色精品一区| 欧美中文字幕一区| 久久国产婷婷国产香蕉| 1000精品久久久久久久久| 欧美区视频在线观看| 国产成人精品免费一区二区| 依依成人精品视频| 日韩免费看的电影| 94-欧美-setu| 精品无码三级在线观看视频| 中文字幕一区二区视频| 日韩美女视频在线| 在线观看www91| 国产91精品一区二区麻豆亚洲| 亚洲国产精品久久人人爱蜜臀 | 一色桃子久久精品亚洲| 欧美日韩aaaaa| 成人av网站大全| 美腿丝袜一区二区三区| 亚洲男人天堂一区| 精品国精品国产| 欧美三级视频在线观看| 国产成人免费9x9x人网站视频| 亚洲国产欧美在线| 国产精品三级电影| 欧美一二三四在线| 91国产免费观看| 成人国产精品免费观看动漫| 免费精品99久久国产综合精品| 亚洲精品国产无天堂网2021| 久久精品综合网| 欧美mv和日韩mv的网站| 欧美在线观看一二区| 成人app网站| 国产精品影视网| 看电影不卡的网站| 亚洲成人激情综合网| 亚洲日本乱码在线观看| 国产亚洲欧美在线| 精品美女被调教视频大全网站| 欧美精品精品一区| 欧美伊人久久久久久久久影院 | 久久国内精品自在自线400部| 亚洲韩国精品一区| 亚洲免费观看高清完整版在线 | 一级做a爱片久久| 亚洲日本一区二区| 一区视频在线播放| 国产精品午夜在线观看| 国产人妖乱国产精品人妖| 欧美成人伊人久久综合网| 91麻豆精品国产自产在线| 欧美日韩极品在线观看一区| 色婷婷综合激情| 91在线精品一区二区三区| 成人美女视频在线看| 国产成人超碰人人澡人人澡| 国产乱人伦精品一区二区在线观看| 免费人成黄页网站在线一区二区| 五月婷婷综合激情|