Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: third_party/sqlite/src/test/capi2.test

Issue 6990047: Import SQLite 3.7.6.3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/sqlite/src/test/cache.test ('k') | third_party/sqlite/src/test/capi3.test » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 2003 January 29 1 # 2003 January 29
2 # 2 #
3 # The author disclaims copyright to this source code. In place of 3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing: 4 # a legal notice, here is a blessing:
5 # 5 #
6 # May you do good and not evil. 6 # May you do good and not evil.
7 # May you find forgiveness for yourself and forgive others. 7 # May you find forgiveness for yourself and forgive others.
8 # May you share freely, never taking more than you give. 8 # May you share freely, never taking more than you give.
9 # 9 #
10 #*********************************************************************** 10 #***********************************************************************
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } {t1 1} 64 } {t1 1}
65 do_test capi2-1.5 { 65 do_test capi2-1.5 {
66 get_column_names $VM 66 get_column_names $VM
67 } {name rowid text INTEGER} 67 } {name rowid text INTEGER}
68 do_test capi2-1.6 { 68 do_test capi2-1.6 {
69 sqlite3_step $VM 69 sqlite3_step $VM
70 } {SQLITE_DONE} 70 } {SQLITE_DONE}
71 do_test capi2-1.7 { 71 do_test capi2-1.7 {
72 list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM] 72 list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM]
73 } {2 {} {name rowid text INTEGER}} 73 } {2 {} {name rowid text INTEGER}}
74 do_test capi2-1.8-misuse { 74
75 sqlite3_step $VM 75 # This used to be SQLITE_MISUSE. But now we automatically reset prepared
76 } {SQLITE_MISUSE} 76 # statements.
77 ifcapable autoreset {
78 do_test capi2-1.8 {
79 sqlite3_step $VM
80 } {SQLITE_ROW}
81 } else {
82 do_test capi2-1.8 {
83 sqlite3_step $VM
84 } {SQLITE_MISUSE}
85 }
77 86
78 # Update: In v2, once SQLITE_MISUSE is returned the statement handle cannot 87 # Update: In v2, once SQLITE_MISUSE is returned the statement handle cannot
79 # be interrogated for more information. However in v3, since the column 88 # be interrogated for more information. However in v3, since the column
80 # count, names and types are determined at compile time, these are still 89 # count, names and types are determined at compile time, these are still
81 # accessible after an SQLITE_MISUSE error. 90 # accessible after an SQLITE_MISUSE error.
82 do_test capi2-1.9 { 91 do_test capi2-1.9 {
92 sqlite3_reset $VM
83 list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM] 93 list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM]
84 } {2 {} {name rowid text INTEGER}} 94 } {2 {} {name rowid text INTEGER}}
85 do_test capi2-1.10 { 95 do_test capi2-1.10 {
86 sqlite3_data_count $VM 96 sqlite3_data_count $VM
87 } {0} 97 } {0}
88 98
89 do_test capi2-1.11 { 99 do_test capi2-1.11 {
90 sqlite3_finalize $VM 100 sqlite3_finalize $VM
91 } {SQLITE_OK} 101 } {SQLITE_OK}
92 102
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 do_test capi2-13.11 { 792 do_test capi2-13.11 {
783 check_origins {select * from (select * from tab1 limit 10 offset 10)} 793 check_origins {select * from (select * from tab1 limit 10 offset 10)}
784 } [list {main tab1 col1} {main tab1 col2}] 794 } [list {main tab1 col1} {main tab1 col2}]
785 } 795 }
786 796
787 797
788 } ;# ifcapable columnmetadata 798 } ;# ifcapable columnmetadata
789 799
790 db2 close 800 db2 close
791 finish_test 801 finish_test
OLDNEW
« no previous file with comments | « third_party/sqlite/src/test/cache.test ('k') | third_party/sqlite/src/test/capi3.test » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698