]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add a test case for the problem fixed by [1d134ba2ed].
authordan <dan@noemail.net>
Wed, 5 Mar 2014 15:04:36 +0000 (15:04 +0000)
committerdan <dan@noemail.net>
Wed, 5 Mar 2014 15:04:36 +0000 (15:04 +0000)
FossilOrigin-Name: d4fbc05df9501a09623d420fcd5b2bce3a57201b

manifest
manifest.uuid
test/capi3.test

index 89fddcc445b10925ec5b1f195e22071f769fc6c3..d10be5fe63dea7b6581ed3457b9665204a9c1a23 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C When\sconverting\sa\sresult\stype\sfrom\sTEXT\sto\sBLOB\susing\sthe\nsqlite3_value_blob()\sinterface,\scontinue\sto\sreport\sSQLITE_TEXT\sas\nthe\strue\stype\sfrom\ssqlite3_value_text()\sas\slong\sas\sthat\stext\sis\sstill\nvalid.\s\sThe\smaintains\slegacy\sbehavior\sfrom\sbefore\sthe\snoMemType\schange.
-D 2014-03-05T14:40:22.888
+C Add\sa\stest\scase\sfor\sthe\sproblem\sfixed\sby\s[1d134ba2ed].
+D 2014-03-05T15:04:36.099
 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
 F Makefile.in 2ef13430cd359f7b361bb863504e227b25cc7f81
 F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
@@ -361,7 +361,7 @@ F test/btreefault.test c2bcb542685eea44621275cfedbd8a13f65201e3
 F test/busy.test 76b4887f8b9160ba903c1ac22e8ff406ad6ae2f0
 F test/cache.test 13bc046b26210471ca6f2889aceb1ea52dc717de
 F test/capi2.test 011c16da245fdc0106a2785035de6b242c05e738
-F test/capi3.test 6cdd49656bd62a296924f4d2fcfd05cd2a298369
+F test/capi3.test 71bcf2fbd36a9732f617766dfd752552c8e491b5
 F test/capi3b.test efb2b9cfd127efa84433cd7a2d72ce0454ae0dc4
 F test/capi3c.test a21869e4d50d5dbb7e566e328fc0bc7c2efa6a32
 F test/capi3d.test 6d0fc0a86d73f42dd19a7d8b7761ab9bc02277d0
@@ -1155,7 +1155,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
 F tool/warnings.sh d1a6de74685f360ab718efda6265994b99bbea01
 F tool/win/sqlite.vsix 030f3eeaf2cb811a3692ab9c14d021a75ce41fff
-P 12cbebb997705e37769460e00a4aaa52c12f305e
-R d261f37d595757cff592b0cc63c2909e
-U drh
-Z 2ff0e0e9e50bbeda593af44f5801ea80
+P 1d134ba2edbdb8c0cf9e99590a69cd17e0b874a9
+R 374319ceadfe35c573eb8d6fe8e86cec
+U dan
+Z 517538463510fd631bac600f6056aa59
index dbbf09faa43694450d4be6697cbd1de12a771ba8..621c82a8e94337052d29cac75c6582d0a340b7ac 100644 (file)
@@ -1 +1 @@
-1d134ba2edbdb8c0cf9e99590a69cd17e0b874a9
\ No newline at end of file
+d4fbc05df9501a09623d420fcd5b2bce3a57201b
\ No newline at end of file
index f0234e889742c2dd1948dab800cb0da1f0253e2d..cbaa5c5e5b853a11df72a106f35fa67d89c1208a 100644 (file)
@@ -16,6 +16,7 @@
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
+set ::testprefix capi3
 
 # Do not use a codec for tests in this file, as the database file is
 # manipulated directly using tcl scripts (using the [hexio_write] command).
@@ -1221,6 +1222,23 @@ do_test capi3-19.1 {
   sqlite3_prepare_tkt3134 db
 } {}
 
+# Test that calling sqlite3_column_blob() on a TEXT value does not change
+# the return type of subsequent calls to sqlite3_column_type().
+#
+do_execsql_test 20.1 {
+  CREATE TABLE t4(x);
+  INSERT INTO t4 VALUES('abcdefghij');
+}
+do_test 20.2 {
+  set stmt [sqlite3_prepare db "SELECT * FROM t4" -1 dummy]
+  sqlite3_step $stmt
+} {SQLITE_ROW}
+do_test 20.3 { sqlite3_column_type $stmt 0 } {TEXT}
+do_test 20.4 { sqlite3_column_blob $stmt 0 } {abcdefghij}
+do_test 20.5 { sqlite3_column_type $stmt 0 } {TEXT}
+do_test 20.6 { sqlite3_finalize $stmt } SQLITE_OK
+
+
 # Tests of the interface when no VFS is registered.
 #
 if {![info exists tester_do_binarylog]} {