mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-01 06:27:03 +03:00
LIMIT occurs after DISTINCT. Ticket #749. (CVS 1823)
FossilOrigin-Name: e6bc8aa80824a9156e78fc99b5ac7045b97d29c3
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
# focus of this file is testing the LIMIT ... OFFSET ... clause
|
||||
# of SELECT statements.
|
||||
#
|
||||
# $Id: limit.test,v 1.13 2004/05/27 17:22:56 drh Exp $
|
||||
# $Id: limit.test,v 1.14 2004/07/19 23:16:39 drh Exp $
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
@ -295,4 +295,17 @@ do_test limit-7.12 {
|
||||
}
|
||||
} {30}
|
||||
|
||||
# Tests for limit in conjunction with distinct
|
||||
#
|
||||
do_test limit-8.1 {
|
||||
execsql {
|
||||
SELECT DISTINCT x/100 FROM t3 LIMIT 5;
|
||||
}
|
||||
} {0 1 2 3 4}
|
||||
do_test limit-8.2 {
|
||||
execsql {
|
||||
SELECT DISTINCT x/100 FROM t3 LIMIT 5 OFFSET 5;
|
||||
}
|
||||
} {5 6 7 8 9}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user