mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Recognize certain standard datatypes ("INT", "INTEGER", "REAL", "TEXT", and
"BLOB") and if a column has one of those datatypes, store the type part of the bit-field information in the Column structure to save space. FossilOrigin-Name: d2da62a9df63036b02dadca3798de9e623c2680b3ef0c37d2b18bb88693afd7f
This commit is contained in:
@@ -64,13 +64,13 @@ do_test capi2-1.4 {
|
||||
} {t1 1}
|
||||
do_test capi2-1.5 {
|
||||
get_column_names $VM
|
||||
} {name rowid text INTEGER}
|
||||
} {name rowid TEXT INTEGER}
|
||||
do_test capi2-1.6 {
|
||||
sqlite3_step $VM
|
||||
} {SQLITE_DONE}
|
||||
do_test capi2-1.7 {
|
||||
list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM]
|
||||
} {2 {} {name rowid text INTEGER}}
|
||||
} {2 {} {name rowid TEXT INTEGER}}
|
||||
|
||||
# This used to be SQLITE_MISUSE. But now we automatically reset prepared
|
||||
# statements.
|
||||
@@ -91,7 +91,7 @@ ifcapable autoreset {
|
||||
do_test capi2-1.9 {
|
||||
sqlite3_reset $VM
|
||||
list [sqlite3_column_count $VM] [get_row_values $VM] [get_column_names $VM]
|
||||
} {2 {} {name rowid text INTEGER}}
|
||||
} {2 {} {name rowid TEXT INTEGER}}
|
||||
do_test capi2-1.10 {
|
||||
sqlite3_data_count $VM
|
||||
} {0}
|
||||
@@ -120,13 +120,13 @@ do_test capi2-2.2 {
|
||||
lappend r [sqlite3_column_count $VM] \
|
||||
[get_row_values $VM] \
|
||||
[get_column_names $VM]
|
||||
} {SQLITE_ROW 2 {t1 1} {name rowid text INTEGER}}
|
||||
} {SQLITE_ROW 2 {t1 1} {name rowid TEXT INTEGER}}
|
||||
do_test capi2-2.3 {
|
||||
set r [sqlite3_step $VM]
|
||||
lappend r [sqlite3_column_count $VM] \
|
||||
[get_row_values $VM] \
|
||||
[get_column_names $VM]
|
||||
} {SQLITE_DONE 2 {} {name rowid text INTEGER}}
|
||||
} {SQLITE_DONE 2 {} {name rowid TEXT INTEGER}}
|
||||
do_test capi2-2.4 {
|
||||
sqlite3_finalize $VM
|
||||
} {SQLITE_OK}
|
||||
@@ -141,7 +141,7 @@ do_test capi2-2.6 {
|
||||
lappend r [sqlite3_column_count $VM] \
|
||||
[get_row_values $VM] \
|
||||
[get_column_names $VM]
|
||||
} {SQLITE_DONE 2 {} {name rowid text INTEGER}}
|
||||
} {SQLITE_DONE 2 {} {name rowid TEXT INTEGER}}
|
||||
do_test capi2-2.7 {
|
||||
sqlite3_finalize $VM
|
||||
} {SQLITE_OK}
|
||||
|
@@ -600,6 +600,6 @@ do_execsql_test gencol1-21.1 {
|
||||
);
|
||||
INSERT INTO t1(a) VALUES(5);
|
||||
SELECT name, type FROM pragma_table_xinfo('t1');
|
||||
} {a integer b int c text d {} e {int}}
|
||||
} {a INTEGER b INT c TEXT d {} e INT}
|
||||
|
||||
finish_test
|
||||
|
@@ -815,7 +815,7 @@ do_test pragma-6.7 {
|
||||
ORDER BY cid}
|
||||
} [concat \
|
||||
{0 one INT 1 -1 0} \
|
||||
{1 two text 0 {} 0} \
|
||||
{1 two TEXT 0 {} 0} \
|
||||
{2 three {VARCHAR(45, 65)} 0 'abcde' 0} \
|
||||
{3 four REAL 0 X'abcdef' 0} \
|
||||
{4 five {} 0 CURRENT_TIME 0} \
|
||||
|
@@ -166,7 +166,7 @@ do_test tcl-2.1 {
|
||||
ifcapable schema_pragmas {
|
||||
do_test tcl-2.2 {
|
||||
execsql "PRAGMA table_info(t\u0123x)"
|
||||
} "0 a int 0 {} 0 1 b\u1235 float 0 {} 0"
|
||||
} "0 a INT 0 {} 0 1 b\u1235 float 0 {} 0"
|
||||
}
|
||||
do_test tcl-2.3 {
|
||||
execsql "INSERT INTO t\u0123x VALUES(1,2.3)"
|
||||
|
@@ -128,7 +128,7 @@ proc analyse_parse {columns decltype_list} {
|
||||
|
||||
do_test vtabA-2.1 {
|
||||
analyse_parse {(a text, b integer hidden, c hidden)} {a b c}
|
||||
} {a text integer {}}
|
||||
} {a TEXT integer {}}
|
||||
|
||||
do_test vtabA-2.2 {
|
||||
analyse_parse {(a hidden , b integerhidden, c hidden1)} {a b c}
|
||||
|
Reference in New Issue
Block a user