mirror of
https://github.com/sqlite/sqlite.git
synced 2026-10-23 21:49:02 +03:00
CLI: The .imposter command matches the index name regardless of case.
Minor fixes to .check. FossilOrigin-Name: 989ebba9ad263abafeddaf4a0e3e1275e83a3a12d7f95c7a451ecf8cbd64a583
This commit is contained in:
17
manifest
17
manifest
@@ -1,5 +1,5 @@
|
||||
C CLI\simprovements.\s\sIn\sthe\s.check\scommand,\signore\sleading\sand\strailing\nwhitespace\sunless\sthe\s--exact\soption\sis\sused.\s\sIn\sthe\s.limit\scommand,\sdo\nnot\sprint\sthe\snew\slimit\swhen\schanging\sthe\slimit,\sbut\sonly\swhen\srequesting\nthe\scurrent\svalue\sof\sthe\slimit.
|
||||
D 2025-12-16T13:25:45.501
|
||||
C CLI:\s\sThe\s.imposter\scommand\smatches\sthe\sindex\sname\sregardless\sof\scase.\nMinor\sfixes\sto\s.check.
|
||||
D 2025-12-16T13:43:35.071
|
||||
F .fossil-settings/binary-glob 61195414528fb3ea9693577e1980230d78a1f8b0a54c78cf1b9b24d0a409ed6a x
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
@@ -737,7 +737,7 @@ F src/random.c 606b00941a1d7dd09c381d3279a058d771f406c5213c9932bbd93d5587be4b9c
|
||||
F src/resolve.c 47aa7fdc9ec4c19b103ac5e79d7887d30119b5675309facf5eed1118391c868b
|
||||
F src/rowset.c 8432130e6c344b3401a8874c3cb49fefe6873fec593294de077afea2dce5ec97
|
||||
F src/select.c 344518c1bba9c4636bf651b7642304abd2e7075ba35feb4bae42a51e5efe991f
|
||||
F src/shell.c.in 0b7ee46d65ff270ae4cdea2ee5cf1095668aaa8bf86003b92960d935f62fb05b
|
||||
F src/shell.c.in c96ba31ca4245fca463683708fe9b04dfaa6987ddfc248877c19d0f014567116
|
||||
F src/sqlite.h.in 706cacea5308b0244fb6cec92e08310fb427a125375c64137cc1f878ae4cf5c0
|
||||
F src/sqlite3.rc 015537e6ac1eec6c7050e17b616c2ffe6f70fca241835a84a4f0d5937383c479
|
||||
F src/sqlite3ext.h 5d5330f5f8461f5ce74960436ddcfa53ecd09c2b8b23901e22ae38aec3243998
|
||||
@@ -1265,6 +1265,7 @@ F test/hook.test 2d89bf9480646feb8093be3a58ea502d6521906779ed960de31dd9c4502c054
|
||||
F test/hook2.test b9ff3b8c6519fb67f33192f1afe86e7782ee4ac8
|
||||
F test/icu.test 8da7d52cd9722c82f33b0466ed915460cb03c23a38f18a9a2d3ff97da9a4a8c0
|
||||
F test/ieee754.test 0d3ab84ab2069c9994c833a7cd820ee6037f0cf888e206a4a7fc05f735d5790a
|
||||
F test/imposter1.sql fc5ad0945bb19622688c7a1cd7dfd1cefa4b013bac9e2628c22b03c7309f021f
|
||||
F test/imposter1.test 5a20b2cdeb53e65fc57cdb10a33750bd4ef6259909eaf1972253b9e79f7a3fb2
|
||||
F test/in.test edf979bff3244b9e47849e2b43886631354c8213791f42da92216f08012141af
|
||||
F test/in2.test 5d4c61d17493c832f7d2d32bef785119e87bde75
|
||||
@@ -1442,7 +1443,7 @@ F test/mmap4.test 2e2b4e32555b58da15176e6fe750f17c9dcf7f93
|
||||
F test/mmapcorrupt.test 470fb44fe92e99c1d23701d156f8c17865f5b027063c9119dcfdb842791f4465
|
||||
F test/mmapfault.test d4c9eff9cd8c2dc14bc43e71e042f175b0a26fe3
|
||||
F test/mmapwarm.test 2272005969cd17a910077bd5082f70bc1fefad9a875afec7fc9af483898ecaf3
|
||||
F test/modeA.sql a804e7db0f672007a54f5b890737de7376ac4d08c6e309347e1c93be5d533c5c
|
||||
F test/modeA.sql 7ca3b6a04bdf0e6dcaee1f43fde35c7ba19b3f3adc94e5789168d76521464935
|
||||
F test/multiplex.test d74c034e52805f6de8cc5432cef8c9eb774bb64ec29b83a22effc8ca4dac1f08
|
||||
F test/multiplex2.test 580ca5817c7edbe4cc68fa150609c9473393003a
|
||||
F test/multiplex3.test fac575e0b1b852025575a6a8357701d80933e98b5d2fe6d35ddaa68f92f6a1f7
|
||||
@@ -1622,7 +1623,7 @@ F test/shell7.test 43fd8e511c533bab5232e95c7b4be93b243451709e89582600d4b6e67693d
|
||||
F test/shell8.test 641cf21a99c59404c24e3062923734951c4099a6b6b6520de00cf7a1249ee871
|
||||
F test/shell9.test 8742a5b390cdcef6369f5aa223e415aa4255a4129ef249b177887dc635a87209
|
||||
F test/shellA.test 05cdaafa1f79913654487ce3aefa038d4106245d58f52e02faf506140a76d480
|
||||
F test/shellB.test 16de54cd7fefc91beebec3216ed874ce53954378a0a2a84bf0838daaef0bc49d
|
||||
F test/shellB.test 8bdf078c0a539d45f0fed74519f6d859ae1f3101b0e287035f994089d4ccb602
|
||||
F test/shmlock.test 9f1f729a7fe2c46c88b156af819ac9b72c0714ac6f7246638a73c5752b5fd13c
|
||||
F test/shortread1.test bb591ef20f0fd9ed26d0d12e80eee6d7ac8897a3
|
||||
F test/show_speedtest1_rtree.tcl 32e6c5f073d7426148a6936a0408f4b5b169aba5
|
||||
@@ -2186,8 +2187,8 @@ F tool/version-info.c 33d0390ef484b3b1cb685d59362be891ea162123cea181cb8e6d2cf6dd
|
||||
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
|
||||
F tool/warnings.sh d924598cf2f55a4ecbc2aeb055c10bd5f48114793e7ba25f9585435da29e7e98
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P c94b1e9c5674f7d0ad75d91085262f38cba6036979e8a0f9d39edc7db841915f
|
||||
R 14bc874d2fda921d0411fdf028237c3f
|
||||
P d72cb66d672d514822b2fbb0be8880377628599f1f8e2a219d36791c125c6242
|
||||
R a400c3cbca15e9ec3f1a400cbb3c7659
|
||||
U drh
|
||||
Z 0b4eb40e6c592a71700535333c2f2c5c
|
||||
Z fe9bf3bcce53e5fefe2e02d288c07fd7
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
||||
@@ -1 +1 @@
|
||||
d72cb66d672d514822b2fbb0be8880377628599f1f8e2a219d36791c125c6242
|
||||
989ebba9ad263abafeddaf4a0e3e1275e83a3a12d7f95c7a451ecf8cbd64a583
|
||||
|
||||
@@ -8621,9 +8621,13 @@ static int dotCmdCheck(ShellState *p){
|
||||
sqlite3_str_appendall(pPattern, zLine);
|
||||
}
|
||||
zPattern = sqlite3_str_finish(pPattern);
|
||||
if( zPattern==0 ){
|
||||
zPattern = sqlite3_mprintf("");
|
||||
}
|
||||
}else{
|
||||
zPattern = zCheck;
|
||||
}
|
||||
shell_check_oom(zPattern);
|
||||
switch( eCheck ){
|
||||
case 1: {
|
||||
char *zGlob = sqlite3_mprintf("*%s*", zPattern);
|
||||
@@ -9616,10 +9620,10 @@ static int do_meta_command(const char *zLine, ShellState *p){
|
||||
}
|
||||
zSql = sqlite3_mprintf(
|
||||
"SELECT rootpage, 0 FROM sqlite_schema"
|
||||
" WHERE name='%q' AND type='index'"
|
||||
" WHERE type='index' AND lower(name)=lower('%q')"
|
||||
"UNION ALL "
|
||||
"SELECT rootpage, 1 FROM sqlite_schema"
|
||||
" WHERE name='%q' AND type='table'"
|
||||
" WHERE type='table' AND lower(name)=lower('%q')"
|
||||
" AND sql LIKE '%%without%%rowid%%'",
|
||||
azArg[1], azArg[1]
|
||||
);
|
||||
|
||||
32
test/imposter1.sql
Normal file
32
test/imposter1.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
#!sqlite3
|
||||
#
|
||||
# 2025-12-16
|
||||
#
|
||||
# The author disclaims copyright to this source code. In place of
|
||||
# a legal notice, here is a blessing:
|
||||
#
|
||||
# May you do good and not evil.
|
||||
# May you find forgiveness for yourself and forgive others.
|
||||
# May you share freely, never taking more than you give.
|
||||
#
|
||||
#***********************************************************************
|
||||
#
|
||||
# Test cases for the .imposter command.
|
||||
#
|
||||
.mode box -reset
|
||||
.testcase 100
|
||||
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT, c INT);
|
||||
INSERT INTO t1 VALUES(1,'two',3),(4,'five',6);
|
||||
CREATE INDEX t1bc ON t1(b,c);
|
||||
.imposter T1BC x1
|
||||
----------^^^^--- Different case that the original
|
||||
SELECT * FROM x1;
|
||||
.check <<END
|
||||
CREATE TABLE "x1"("b","c","_ROWID_",PRIMARY KEY("b","c","_ROWID_"))WITHOUT ROWID;
|
||||
╭──────┬───┬─────────╮
|
||||
│ b │ c │ _ROWID_ │
|
||||
╞══════╪═══╪═════════╡
|
||||
│ five │ 6 │ 4 │
|
||||
│ two │ 3 │ 1 │
|
||||
╰──────┴───┴─────────╯
|
||||
END
|
||||
@@ -17,6 +17,7 @@
|
||||
# ./sqlite3 <test/modeA.clitest
|
||||
#
|
||||
#
|
||||
.open :memory:
|
||||
CREATE TABLE t1(a,b,c,d,e);
|
||||
INSERT INTO t1 VALUES(1,2.5,'three',x'4444',NULL);
|
||||
INSERT INTO t1 SELECT b,c,d,e,a FROM t1;
|
||||
|
||||
@@ -43,5 +43,6 @@ do_clitest modeA.sql
|
||||
do_clitest dblwidth-a.sql
|
||||
do_clitest vt100-a.sql
|
||||
do_clitest regexp1.sql
|
||||
do_clitest imposter1.sql
|
||||
|
||||
finish_test
|
||||
|
||||
Reference in New Issue
Block a user