]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the user_version and schema_version pragmas so that they set a result
authordrh <drh@noemail.net>
Thu, 4 Jan 2007 22:13:41 +0000 (22:13 +0000)
committerdrh <drh@noemail.net>
Thu, 4 Jan 2007 22:13:41 +0000 (22:13 +0000)
column name.  Ticket #2143. (CVS 3560)

FossilOrigin-Name: f81c4227c26a4d43993904ab05c1eb9f988e3b66

manifest
manifest.uuid
src/pragma.c
test/pragma.test

index 421613633c97257585fcc75e311fdaed4a023f13..7e3215ebf38b1c36449c4599077f302f05e6e722 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sthe\strigger4\stest\sso\sthat\sit\sruns\son\swindows.\s(CVS\s3559)
-D 2007-01-04T22:13:02
+C Fix\sthe\suser_version\sand\sschema_version\spragmas\sso\sthat\sthey\sset\sa\sresult\ncolumn\sname.\s\sTicket\s#2143.\s(CVS\s3560)
+D 2007-01-04T22:13:42
 F Makefile.in 63a71177ed4355c829229affe11167bd28c85884
 F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
 F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@@ -88,7 +88,7 @@ F src/os_win.h 41a946bea10f61c158ce8645e7646b29d44f122b
 F src/pager.c 48296c371c44bf43f1c02e221142149797f33072
 F src/pager.h 2e6d42f4ae004ae748a037b8468112b851c447a7
 F src/parse.y 2f571c5f6219428d7fb08737db3d113742b1cceb
-F src/pragma.c d0891d3504b6291b506a5ec2226bbf79ffcef003
+F src/pragma.c fd4df6cf0857dd78a7cb5be5f9805419b53ae7a0
 F src/prepare.c f4f45b4560defbb566cf8255763625d2c09a8023
 F src/printf.c b179b6ed12f793e028dd169e2e2e2b2a37eedc63
 F src/random.c d40f8d356cecbd351ccfab6eaedd7ec1b54f5261
@@ -267,7 +267,7 @@ F test/pager.test 6ee95e90ee8295e376e39a6c6566ef6df993601a
 F test/pager2.test 49c0f57c7da0b060f0486b85fdd074025caa694e
 F test/pager3.test 2323bf27fd5bd887b580247e5bce500ceee994b4
 F test/pagesize.test 05c74ea49f790734ec1e9ab765d9bf1cce79b8f2
-F test/pragma.test fc04e28fca655bcd62a6691744f7cf67a18e0699
+F test/pragma.test 5b58a36e3dd830cde81f70a7373321e25560a9b3
 F test/printf.test cdd8e20dd901382a385afcbaa777b9377815c2ad
 F test/progress.test 8b22b4974b0a95272566385f8cb8c341c7130df8 x
 F test/quick.test 6bc0f7c7b905f7de5fe4d3f13239ced3e4e66fe7
@@ -424,7 +424,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
 F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
 F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
 F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
-P 277f8faae4f014b0162713369b074520b628a465
-R 8fc8d7b316bd5f29a296d4225ad7f666
+P 5e4e65ea15c51e75e9f003fbfde3fe87e22b889b
+R cf18906d1fb7453c24d5929336361320
 U drh
-Z f1e955ae13098881651bd03924045917
+Z c02da80e664ffb1898fb3baae2d7f521
index 9889465d32553f53819c17acb79bdbe235b288d1..d24183198c728aac1f53a65d76b0cacf0c523137 100644 (file)
@@ -1 +1 @@
-5e4e65ea15c51e75e9f003fbfde3fe87e22b889b
\ No newline at end of file
+f81c4227c26a4d43993904ab05c1eb9f988e3b66
\ No newline at end of file
index a3556ce4a2cffc6c9525be6ba1d4e1ab74e2e36c..2474fa7a456c398812c9e80c446a5d1729473379 100644 (file)
@@ -11,7 +11,7 @@
 *************************************************************************
 ** This file contains code used to implement the PRAGMA command.
 **
-** $Id: pragma.c,v 1.125 2006/11/30 13:06:37 drh Exp $
+** $Id: pragma.c,v 1.126 2007/01/04 22:13:42 drh Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -894,6 +894,7 @@ void sqlite3Pragma(
       sqlite3VdbeChangeP1(v, addr, iDb);
       sqlite3VdbeChangeP2(v, addr, iCookie);
       sqlite3VdbeSetNumCols(v, 1);
+      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLeft, P3_TRANSIENT);
     }
   }
 #endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */
index 501d8553f705188d0c3ff3bd7697ae5a506d5685..f6440c6477f300c670dd499b77307025c128bbc2 100644 (file)
@@ -12,7 +12,7 @@
 #
 # This file implements tests for the PRAGMA command.
 #
-# $Id: pragma.test,v 1.45 2006/11/30 13:06:37 drh Exp $
+# $Id: pragma.test,v 1.46 2007/01/04 22:13:42 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -42,7 +42,8 @@ ifcapable !pragma {
 # that the "all.test" script does.
 #
 db close
-file delete test.db
+file delete test.db test.db-journal
+file delete test3.db test3.db-journal
 sqlite3 db test.db; set DB [sqlite3_connection_pointer db]
 
 ifcapable pager_pragmas {
@@ -446,10 +447,10 @@ do_test pragma-8.1.1 {
   }
 } {}
 do_test pragma-8.1.2 {
-  execsql {
+  execsql2 {
     PRAGMA schema_version;
   }
-} 105
+} {schema_version 105}
 do_test pragma-8.1.3 {
   execsql {
     PRAGMA schema_version = 106;
@@ -548,20 +549,20 @@ do_test pragma-8.1.18 {
 # Now test that the user-version can be read and written (and that we aren't
 # accidentally manipulating the schema-version instead).
 do_test pragma-8.2.1 {
-  execsql {
+  execsql2 {
     PRAGMA user_version;
   }
-} {0}
+} {user_version 0}
 do_test pragma-8.2.2 {
   execsql {
     PRAGMA user_version = 2;
   }
 } {}
 do_test pragma-8.2.3.1 {
-  execsql {
+  execsql2 {
     PRAGMA user_version;
   }
-} {2}
+} {user_version 2}
 do_test pragma-8.2.3.2 {
   db close
   sqlite3 db test.db