]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix the handling of indices with quoted names. Ticket #695. (CVS 1830)
authordrh <drh@noemail.net>
Tue, 20 Jul 2004 00:50:29 +0000 (00:50 +0000)
committerdrh <drh@noemail.net>
Tue, 20 Jul 2004 00:50:29 +0000 (00:50 +0000)
FossilOrigin-Name: 467309975f40bdc1ac0ed1c9c34d187e91217e12

manifest
manifest.uuid
src/build.c
test/index.test

index 522c544f5d39df5b889d82ff3dfef656e8ea30f9..e43289112e633aa92608ba8249ad9874ac5b3854 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Comment\sout\sall\sof\sdate/time\sfunctions\swith\sSQLITE_OMIT_DATETIME_FUNCS.\nTicket\s#784.\s(CVS\s1829)
-D 2004-07-20T00:40:01
+C Fix\sthe\shandling\sof\sindices\swith\squoted\snames.\s\sTicket\s#695.\s(CVS\s1830)
+D 2004-07-20T00:50:30
 F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -26,7 +26,7 @@ F src/auth.c f73ae6f7260e3409e9b164a2bb9efffc38054081
 F src/btree.c 08a05b925b348c05d79b9b062b79e50d565678de
 F src/btree.h 41cb3ff6ebc3f6da2d0a074e39ff8c7a2287469f
 F src/btree_rb.c af40501eedd7b673ffd5e02f3a4702c76596d64a
-F src/build.c cb1ab5ce737ae6b6fe141e256c5e7c524c78ed68
+F src/build.c 46760493ebddd6360e31ff44c314d5bec04cd322
 F src/copy.c 750e13828c3e4a293123e36aaa7cf0f22466248a
 F src/date.c 54befeafe3e2af041c22bcc49fd79f0396b75c4d
 F src/delete.c 82001c74882319f94dab5f6b92a27311b31092ae
@@ -91,7 +91,7 @@ F test/format3.test 149cc166c97923fa60def047e90dd3fb32bba916
 F test/func.test 56b12001d4d8239c6af2864e3d64916cf5dad711
 F test/hook.test 1a67ce0cd64a6455d016962542f2822458dccc49
 F test/in.test 0de39b02ceeca90993b096822fb5a884661c5b47
-F test/index.test 9295deefbdb6dedbe01be8905f0c448fe5bd4079
+F test/index.test 491d721e9b442a51b118894323f2885a2187a8dd
 F test/insert.test a17b7f7017097afb2727aa5b67ceeb7ab0a120a1
 F test/insert2.test c288375a64dad3295044714f0dfed4a193cf067f
 F test/interrupt.test 0d50985f1aa6c39fe2cca4cf4a272c79ff1648e8
@@ -189,7 +189,7 @@ F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
 F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
 F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
 F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P ef0d5ebe96b9babe275d62ed6abe95652838de5f
-R cda82a4951d281d09e47e2d6fddf0eeb
+P 28c01d2ac705923d3210ec2b8906541f42ec6f25
+R 09155773e4d31da180d82dae3717e109
 U drh
-Z 894b83d5da2df546db7a6341fe8948a8
+Z 0e79cd27d622fc24c255a98039978a0f
index 2bb68b12e1395dff9435b952e632d92e6bba83b3..3ca745d492db5dc912d491fb1a981c93263742ec 100644 (file)
@@ -1 +1 @@
-28c01d2ac705923d3210ec2b8906541f42ec6f25
\ No newline at end of file
+467309975f40bdc1ac0ed1c9c34d187e91217e12
\ No newline at end of file
index a4ea39817c9dc5886a8307d3543d7bed97cd34f5..b413b0a0784dacbb710d76d2a54facb0bd6d74cf 100644 (file)
@@ -23,7 +23,7 @@
 **     ROLLBACK
 **     PRAGMA
 **
-** $Id: build.c,v 1.176.2.1 2004/06/26 14:40:05 drh Exp $
+** $Id: build.c,v 1.176.2.2 2004/07/20 00:50:30 drh Exp $
 */
 #include "sqliteInt.h"
 #include <ctype.h>
@@ -1537,7 +1537,7 @@ void sqliteCreateIndex(
   if( pName && !db->init.busy ){
     Index *pISameName;    /* Another index with the same name */
     Table *pTSameName;    /* A table with same name as the index */
-    zName = sqliteStrNDup(pName->z, pName->n);
+    zName = sqliteTableNameFromToken(pName);
     if( zName==0 ) goto exit_create_index;
     if( (pISameName = sqliteFindIndex(db, zName, 0))!=0 ){
       sqliteErrorMsg(pParse, "index %s already exists", zName);
index d233f9dc3a36ffdae6f2f86d412757b9bacb3fca..7fb6227e0625807d0f736b58a6e36eb5a56f0181 100644 (file)
@@ -11,7 +11,7 @@
 # This file implements regression tests for SQLite library.  The
 # focus of this file is testing the CREATE INDEX statement.
 #
-# $Id: index.test,v 1.24 2003/09/27 00:41:28 drh Exp $
+# $Id: index.test,v 1.24.2.1 2004/07/20 00:50:30 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -515,4 +515,19 @@ do_test index-15.2 {
 } {8 5 2 1 3 6 11 9 10 4 7}
 integrity_check index-15.1
 
+# Drop index with a quoted name.  Ticket #695.
+#
+do_test index-16.1 {
+  execsql {
+    CREATE INDEX "t6i2" ON t6(c);
+    DROP INDEX "t6i2";
+  }
+} {}
+do_test index-16.2 {
+  execsql {
+    DROP INDEX "t6i1";
+  }
+} {}
+   
+
 finish_test