File: errofst1.test

package info (click to toggle)
sqlcipher 4.11.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 120,460 kB
  • sloc: ansic: 310,189; tcl: 24,097; javascript: 13,561; java: 8,138; sh: 7,586; makefile: 2,448; yacc: 1,727; cpp: 312; cs: 307; sql: 59
file content (31 lines) | stat: -rw-r--r-- 806 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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