]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
This COLLATE keyword was not being parsed correctly inside CREATE TABLE
authordrh <drh@noemail.net>
Sun, 18 Aug 2002 22:41:22 +0000 (22:41 +0000)
committerdrh <drh@noemail.net>
Sun, 18 Aug 2002 22:41:22 +0000 (22:41 +0000)
statements - it was being included as part of the datatype.  This fixes
the problem. (CVS 722)

FossilOrigin-Name: 39bd52d33029233d4b22df08975e9ef3c74c260f

manifest
manifest.uuid
src/parse.y
test/misc1.test

index 995e7c887d4d6466cf4c620f0d8032b5cc3b4b87..d5cb85814302bcfb984b101629a8827869507123 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sfor\sticket\s#110:\sreturn\san\serror\sif\strying\sto\sstart\sa\stransaction\swithin\sa\ntransaction\sor\swhen\sattempting\sto\scommit\sor\srollback\soutside\sof\sa\stransaction.\s(CVS\s721)
-D 2002-08-18T20:28:07
+C This\sCOLLATE\skeyword\swas\snot\sbeing\sparsed\scorrectly\sinside\sCREATE\sTABLE\nstatements\s-\sit\swas\sbeing\sincluded\sas\spart\sof\sthe\sdatatype.\s\sThis\sfixes\nthe\sproblem.\s(CVS\s722)
+D 2002-08-18T22:41:22
 F Makefile.in 6291a33b87d2a395aafd7646ee1ed562c6f2c28c
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -34,7 +34,7 @@ F src/os.c 00d10655e1dc9a52b4aabca58c8d8e45048057b0
 F src/os.h 3009379b06941e7796a9812d1b6cbc59b26248c8
 F src/pager.c 4b0169e91b34f6ff91e8feb57545c43e4d6eb370
 F src/pager.h 6991c9c2dc5e4c7f2df4d4ba47d1c6458f763a32
-F src/parse.y 66e7da55b34b57f81ca07e50d1dcc430b1c1bf74
+F src/parse.y 5de87bb0f5cd0245471483b9c8bf26df6a68979f
 F src/printf.c 5c50fc1da75c8f5bf432b1ad17d91d6653acd167
 F src/random.c 19e8e00fe0df32a742f115773f57651be327cabe
 F src/select.c f504cc542229f472b3f15cefe5d6782494ee8d92
@@ -77,7 +77,7 @@ F test/lock.test 2bc3c32ca2caf45c884bb1e78ec67d70792a1228
 F test/main.test c66b564554b770ee7fdbf6a66c0cd90329bc2c85
 F test/malloc.test 7ba32a9ebd3aeed52ae4aaa6d42ca37e444536fd
 F test/minmax.test 29bc5727c3e4c792d5c4745833dd4b505905819e
-F test/misc1.test 834dce8b6db65c4921d59a4d449b87f40442ab87
+F test/misc1.test 3ee14f86e00c1d5a3f3fc90b8490c398ec623e79
 F test/misuse.test a3aa2b18a97e4c409a1fcaff5151a4dd804a0162
 F test/notnull.test b1f3e42fc475b0b5827b27b2e9b562081995ff30
 F test/null.test 5c2b57307e4b6178aae825eb65ddbee01e76b0fd
@@ -147,7 +147,7 @@ F www/speed.tcl 7fc83f1b018e1ecc451838449542c3079ed12425
 F www/sqlite.tcl ae3dcfb077e53833b59d4fcc94d8a12c50a44098
 F www/tclsqlite.tcl 1db15abeb446aad0caf0b95b8b9579720e4ea331
 F www/vdbe.tcl 2013852c27a02a091d39a766bc87cff329f21218
-P e372a60be8de3332ab6e45d82f21227b8b9acf82
-R 31a2b4f30443d9b37dbc5e14c02a3ea6
+P df51cb166bf7c5b8b0530cc86df8d2d68de81a40
+R af4ace67120ef42eca959d81e6a8f302
 U drh
-Z 9c9b7fe404a00a2654471a380566e5c1
+Z 388492759bccd0d58f757107b145340a
index 078f4082b7e22e0927958adfd5b23094d5d95791..ea788a738386e0450b784a31627ff06390771b74 100644 (file)
@@ -1 +1 @@
-df51cb166bf7c5b8b0530cc86df8d2d68de81a40
\ No newline at end of file
+39bd52d33029233d4b22df08975e9ef3c74c260f
\ No newline at end of file
index b70a36510398855cd5a3932c8153522a27ca37af..801f5f3f101c1c96c96eedb283074ee08255aacc 100644 (file)
@@ -14,7 +14,7 @@
 ** the parser.  Lemon will also generate a header file containing
 ** numeric codes for all of the tokens.
 **
-** @(#) $Id: parse.y,v 1.80 2002/08/11 20:10:48 drh Exp $
+** @(#) $Id: parse.y,v 1.81 2002/08/18 22:41:22 drh Exp $
 */
 %token_prefix TK_
 %token_type {Token}
@@ -117,7 +117,7 @@ id(A) ::= ID(X).         {A = X;}
 // This obviates the need for the "id" nonterminal.
 //
 %fallback ID 
-  ABORT AFTER ASC BEFORE BEGIN CASCADE CLUSTER COLLATE CONFLICT
+  ABORT AFTER ASC BEFORE BEGIN CASCADE CLUSTER CONFLICT
   COPY DEFERRED DELIMITERS DESC EACH END EXPLAIN FAIL FOR
   IGNORE IMMEDIATE INITIALLY INSTEAD MATCH KEY
   OF OFFSET PRAGMA RAISE REPLACE RESTRICT ROW STATEMENT
index 9ea6ae1dacd8bb4bab78d0f8c9ce802e08b9264c..481845134e4176a427e9d51ab38eea1d21732610 100644 (file)
@@ -13,7 +13,7 @@
 # This file implements tests for miscellanous features that were
 # left out of other test files.
 #
-# $Id: misc1.test,v 1.13 2002/08/15 11:48:13 drh Exp $
+# $Id: misc1.test,v 1.14 2002/08/18 22:41:22 drh Exp $
 
 set testdir [file dirname $argv0]
 source $testdir/tester.tcl
@@ -362,5 +362,42 @@ do_test misc1-12.7 {
     SELECT DISTINCT x, y FROM t7 ORDER BY z;
   }
 } {0 0 0 0.0}
+do_test misc1-12.8 {
+  execsql {
+    SELECT min(z), max(z), count(z) FROM t7 GROUP BY x ORDER BY 1;
+  }
+} {1 4 4}
+do_test misc1-12.9 {
+  execsql {
+    SELECT min(z), max(z), count(z) FROM t7 GROUP BY y ORDER BY 1;
+  }
+} {1 2 2 3 4 2}
+do_test misc1-12.10 {
+  catchsql {
+    SELECT * FROM t6 ORDER BY a COLLATE unknown;
+  }
+} {1 {unknown collating type: unknown}}
+do_test misc1-12.11 {
+  execsql {
+    CREATE TABLE t8(x TEXT COLLATE numeric, y INTEGER COLLATE text, z);
+    INSERT INTO t8 VALUES(0,0,1);
+    INSERT INTO t8 VALUES(0.0,0,2);
+    INSERT INTO t8 VALUES(0,0.0,3);
+    INSERT INTO t8 VALUES(0.0,0.0,4);
+    SELECT DISTINCT x, y FROM t8 ORDER BY z;
+  }
+} {0 0 0 0.0}
+do_test misc1-12.12 {
+  execsql {
+    SELECT min(z), max(z), count(z) FROM t8 GROUP BY x ORDER BY 1;
+  }
+} {1 4 4}
+do_test misc1-12.13 {
+  execsql {
+    SELECT min(z), max(z), count(z) FROM t8 GROUP BY y ORDER BY 1;
+  }
+} {1 2 2 3 4 2}
+
+
 
 finish_test