1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Return the correct declared column type, origin column name, origin database

name, etc. from aggregate queries.  Ticket #1726 and #1755. (CVS 3169)

FossilOrigin-Name: e64809f0ae98ce9d152cf030cae72bf3df3e2403
This commit is contained in:
drh
2006-04-07 13:50:37 +00:00
parent 502b962b2d
commit 30bcf5dbaf
4 changed files with 24 additions and 10 deletions

View File

@@ -11,7 +11,7 @@
# This file implements regression tests for SQLite library. The
# focus of this script testing the callback-free C/C++ API.
#
# $Id: capi3.test,v 1.44 2006/02/18 16:36:46 drh Exp $
# $Id: capi3.test,v 1.45 2006/04/07 13:50:38 drh Exp $
#
set testdir [file dirname $argv0]
@@ -575,6 +575,19 @@ do_test capi3-5.12 {
sqlite3_finalize $STMT
} SQLITE_OK
do_test capi3-5.20 {
set sql "SELECT a, sum(b), max(c) FROM t1 GROUP BY a"
set STMT [sqlite3_prepare $DB $sql -1 TAIL]
sqlite3_column_count $STMT
} 3
check_header $STMT capi3-5.21 {a sum(b) max(c)} {VARINT {} {}}
check_origin_header $STMT capi3-5.22 {main {} {}} {t1 {} {}} {a {} {}}
do_test capi3-5.23 {
sqlite3_finalize $STMT
} SQLITE_OK
set ::ENC [execsql {pragma encoding}]
db close