0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-12-01 09:12:16 +01:00
sqlite/ext/session/sessionH.test
dan 61c758b53a Fix a problem causing the sessions module to occasionally lose track of rows
with composite primary keys when there are two rows with the same text value
in the leftmost column of the PK.

FossilOrigin-Name: 09aed13678374bf22087cd808808b711dc703b7c18bc8aaf704850611e17f5cd
2018-01-17 17:38:18 +00:00

40 lines
960 B
Plaintext

# 2018 January 18
#
# 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.
#
#***********************************************************************
#
if {![info exists testdir]} {
set testdir [file join [file dirname [info script]] .. .. test]
}
source [file join [file dirname [info script]] session_common.tcl]
source $testdir/tester.tcl
ifcapable !session {finish_test; return}
set testprefix sessionH
forcedelete test.db2
sqlite3 db2 test.db2
do_test 1.0 {
do_common_sql {
CREATE TABLE t1(a, b, c, PRIMARY KEY(a, b));
}
do_then_apply_sql {
WITH s(i) AS (
VALUES(1) UNION ALL SELECT i+1 FROM s WHERe i<10000
)
INSERT INTO t1 SELECT 'abcde', randomblob(16), i FROM s;
}
compare_db db db2
} {}
finish_test