mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Do not report an sqlite3_error_offset() for errors that occur inside of
views or triggers, since the text of those elements is not part of the original query. FossilOrigin-Name: bf66c6dfc25c2562a4e6a5b24dd1660213a8fefbb5763e7583b87fb06dbaaf43
This commit is contained in:
31
test/errofst1.test
Normal file
31
test/errofst1.test
Normal file
@ -0,0 +1,31 @@
|
||||
# 2024-11-20
|
||||
#
|
||||
# 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 sqlite3_error_offset()
|
||||
#
|
||||
|
||||
set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
do_execsql_test errofst1-1.1 {
|
||||
CREATE TABLE t1 as select 1 as aa;
|
||||
CREATE VIEW t2 AS
|
||||
WITH t3 AS (SELECT 1 FROM t1 AS bb, t1 AS cc WHERE cc.aa <= sts.aa)
|
||||
SELECT 1 FROM t3 AS dd;
|
||||
}
|
||||
do_catchsql_test errofst1-1.2 {
|
||||
SELECT * FROM t2;
|
||||
} {1 {no such column: sts.aa}}
|
||||
do_test errofst1-1.3 {
|
||||
sqlite3_error_offset db
|
||||
} {-1}
|
||||
|
||||
finish_test
|
Reference in New Issue
Block a user