Compute the correct column name even if the column identifier is the
very last token in the SQL statement. This fixes a problem introduced by check-in [0fdf97efe5df745510c6b] and reported by the community during beta-testing. FossilOrigin-Name: 36b89d728ff13d395fe0e1db8e7c01263f73dccb278b3ece27f6ef78e909b492
This commit is contained in:
@@ -649,6 +649,18 @@ do_test capi3-5.33 {
|
||||
sqlite3_finalize $STMT
|
||||
} SQLITE_OK
|
||||
|
||||
# 2018-01-09: If a column is the last token if a string, the column name
|
||||
# was not being set correctly, due to changes in check-in
|
||||
# https://sqlite.org/src/info/0fdf97efe5df7455
|
||||
#
|
||||
# This problem was detected by the community during beta-testing.
|
||||
#
|
||||
do_test capi3-5.34 {
|
||||
set STMT [sqlite3_prepare $DB {SELECT :a, :b} -1 TAIL]
|
||||
sqlite3_column_count $STMT
|
||||
} 2
|
||||
check_header $STMT capi-5.35 {:a :b} {{} {}}
|
||||
sqlite3_finalize $STMT
|
||||
|
||||
set ::ENC [execsql {pragma encoding}]
|
||||
db close
|
||||
|
||||
Reference in New Issue
Block a user