interplane.Get Omega
Read in your language

sqlite

[Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI.

Brought by drakestapleton

branch master Branches Tags History

sqlite / test / errofst1.test

31 lines · 806 bytes Raw Blame History
1# 2024-11-20
2#
3# The author disclaims copyright to this source code. In place of
4# a legal notice, here is a blessing:
5#
6# May you do good and not evil.
7# May you find forgiveness for yourself and forgive others.
8# May you share freely, never taking more than you give.
9#
10#***********************************************************************
11#
12# Test cases for sqlite3_error_offset()
13#
14
15set testdir [file dirname $argv0]
16source $testdir/tester.tcl
17
18do_execsql_test errofst1-1.1 {
19 CREATE TABLE t1 as select 1 as aa;
20 CREATE VIEW t2 AS
21 WITH t3 AS (SELECT 1 FROM t1 AS bb, t1 AS cc WHERE cc.aa <= sts.aa)
22 SELECT 1 FROM t3 AS dd;
23}
24do_catchsql_test errofst1-1.2 {
25 SELECT * FROM t2;
26} {1 {no such column: sts.aa}}
27do_test errofst1-1.3 {
28 sqlite3_error_offset db
29} {-1}
30
31finish_test