Respect default collation sequences assigned to virtual table columns. (CVS 3272)

FossilOrigin-Name: d9b205acac34ba9703bc35dfb101aedd95cb5a16
This commit is contained in:
danielk1977 2006-06-19 05:33:45 +00:00
parent 70b6d57373
commit b8cbb872cf
4 changed files with 44 additions and 12 deletions

View File

@ -1,5 +1,5 @@
C Fix\smemory\sleak\sin\swhere.c.\s(CVS\s3271)
D 2006-06-19T04:49:35
C Respect\sdefault\scollation\ssequences\sassigned\sto\svirtual\stable\scolumns.\s(CVS\s3272)
D 2006-06-19T05:33:45
F Makefile.in f839b470345d3cb4b0644068474623fe2464b5d3
F Makefile.linux-gcc 2d8574d1ba75f129aba2019f0b959db380a90935
F README 9c4e2d6706bdcc3efdd773ce752a8cdab4f90028
@ -36,7 +36,7 @@ F src/attach.c 27a31d3b89d7ebb5b358847607b1ec795384123c
F src/auth.c 902f4722661c796b97f007d9606bd7529c02597f
F src/btree.c ed343b3dbcbc7da9ac481ef2b98c4239fe6d9629
F src/btree.h 40055cfc09defd1146bc5b922399c035f969e56d
F src/build.c 3eb63f61249fd0fcd7075456b522a1ceb5f912bd
F src/build.c 0152e858f9688e482d3608632edb1a48fde67bf3
F src/callback.c fd9bb39f7ff6b52bad8365617abc61c720640429
F src/complete.c 7d1a44be8f37de125fcafd3d3a018690b3799675
F src/date.c cd2bd5d1ebc6fa12d6312f69789ae5b0a2766f2e
@ -295,7 +295,7 @@ F test/vtab1.test 97d68ca03f18ed14ffec6420363a13b486fd66bb
F test/vtab2.test b8daa5d9989c3096a294bce0f614ff6f37db0f99
F test/vtab3.test b3ea5dfdc36ba23ba5136928b6c307c5125ababc
F test/vtab4.test 4b4293341443839ef6dc02f8d9e614702a6c67ff
F test/vtab5.test a2dc67f499256aa1656ee693c2157ba8c7fc01bb
F test/vtab5.test 367019fbbaf60991273277c8e132e4f2f2930edc
F test/where.test ee7c9a6659b07e1ee61177f6e7ff71565ee2c9df
F test/where2.test a16476a5913e75cf65b38f2daa6157a6b7791394
F test/where3.test 3b5ad2c58069e12be2bd86bc5e211a82810521aa
@ -371,7 +371,7 @@ F www/tclsqlite.tcl bb0d1357328a42b1993d78573e587c6dcbc964b9
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl 97e2b5cd296f7d8057e11f44427dea8a4c2db513
P 144d0eb13aed4507e93edec781b1819a068f4a70
R a120b8d6587e73f986b4b3f1c6fadbd5
P 3d10e8f36113a189aa19ecd99007cd0a926b2f8a
R 3686b7d5151dd1e0ec15c63f3d0caed7
U danielk1977
Z edb5bd8fa3b46fcad539c9bb0dac2b2a
Z 349996879b693696c81b0ab00849dfc2

View File

@ -1 +1 @@
3d10e8f36113a189aa19ecd99007cd0a926b2f8a
d9b205acac34ba9703bc35dfb101aedd95cb5a16

View File

@ -22,7 +22,7 @@
** COMMIT
** ROLLBACK
**
** $Id: build.c,v 1.403 2006/06/16 16:08:54 danielk1977 Exp $
** $Id: build.c,v 1.404 2006/06/19 05:33:45 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -1179,7 +1179,7 @@ void sqlite3AddCollateType(Parse *pParse, const char *zType, int nType){
Table *p;
int i;
if( (p = pParse->pNewTable)==0 || IN_DECLARE_VTAB ) return;
if( (p = pParse->pNewTable)==0 ) return;
i = p->nCol-1;
if( sqlite3LocateCollSeq(pParse, zType, nType) ){

View File

@ -10,7 +10,7 @@
#***********************************************************************
# This file implements regression tests for SQLite library.
#
# $Id: vtab5.test,v 1.2 2006/06/19 04:49:35 danielk1977 Exp $
# $Id: vtab5.test,v 1.3 2006/06/19 05:33:45 danielk1977 Exp $
set testdir [file dirname $argv0]
source $testdir/tester.tcl
@ -24,7 +24,7 @@ ifcapable !vtab {
# statement can be executed immediately after a CREATE or schema reload. The
# point here is testing that the parser always calls xConnect() before the
# schema of a virtual table is used.
#
register_echo_module [sqlite3_connection_pointer db]
do_test vtab5-1.1 {
execsql {
@ -67,6 +67,38 @@ do_test vtab5.1.5 {
SELECT * FROM techo;
}
} {10 b c}
do_test vtab5.1.X {
execsql {
DROP TABLE techo;
DROP TABLE treal;
}
} {}
# The following tests - vtab5-2.* - ensure that collation sequences
# assigned to virtual table columns via the "CREATE TABLE" statement
# passed to sqlite3_declare_vtab() are used correctly.
#
do_test vtab5.2.1 {
execsql {
CREATE TABLE strings(str COLLATE NOCASE);
INSERT INTO strings VALUES('abc1');
INSERT INTO strings VALUES('Abc3');
INSERT INTO strings VALUES('ABc2');
INSERT INTO strings VALUES('aBc4');
SELECT str FROM strings ORDER BY 1;
}
} {abc1 ABc2 Abc3 aBc4}
do_test vtab5.2.2 {
execsql {
CREATE VIRTUAL TABLE echo_strings USING echo(strings);
SELECT str FROM echo_strings ORDER BY 1;
}
} {abc1 ABc2 Abc3 aBc4}
do_test vtab5.2.3 {
execsql {
SELECT str||'' FROM echo_strings ORDER BY 1;
}
} {ABc2 Abc3 aBc4 abc1}
finish_test