Rebase to version 3.32.0

Resolves: #1839234
This commit is contained in:
Ondrej Dubaj 2020-05-25 09:50:16 +02:00
parent 236dd0f14c
commit 442daf2297
4 changed files with 9 additions and 206 deletions

View File

@ -1,3 +1,3 @@
SHA512 (sqlite-src-3310100.zip) = af92a00877bcd90372d6f83a27fea12b4fe8d1155b223a6bccbccc31bb8e3d2269cd9e68f329bc55f70d1068ccbf220ff5abccea6f593fd7a3a4bdd732d1cdbe SHA512 (sqlite-src-3320000.zip) = ea915648bc7c364da9ad153c758e36b8cd4cc678958a5449824282844bc45963bd3602d30f731e4865f30c17a3249474127b911992cb13f46be35d646d288c29
SHA512 (sqlite-doc-3310100.zip) = 5572e2c2dac30c014ef9cd60a620b7a7bb610f91a47e2890c0641540d39b9d5ce0e914ee697583130317633918b7827e2612a7cbc024f5bd6aa22ad28a78b56b SHA512 (sqlite-autoconf-3320000.tar.gz) = bb0f73d63658c3e31daa7919ea621d1a8add8d430fe4385947555f0a334038750630eb1240f28d1709c69d45d12c1cc04ed081ecfe421c594ed29b6ac80b0a5f
SHA512 (sqlite-autoconf-3310100.tar.gz) = d85250ba5f78f0c918880f663741709aba662192f04888b2324a0df17affdf5b8540e8428c6c7315119806e7adad758ea281c9b403c0ad94ac6a9bd1b93fd617 SHA512 (sqlite-doc-3320000.zip) = 8733bad1e8dda2967e7fadaf1a541bea338d3a14dcc0ab7fe25525e422ea8d61eb21b07648d29fe8b30ace2891ec3150800ec50f3eff121280b47db1439e915c

View File

@ -1,69 +0,0 @@
From 9048693a09416ead7c8df98234c4ab82e7748d33 Mon Sep 17 00:00:00 2001
From: Ondrej Dubaj <odubaj@redhat.com>
Date: Wed, 5 Feb 2020 07:33:00 +0100
Subject: [PATCH] Modify a couple of FTS test cases so that they work on
big-endian platforms.
---
ext/fts5/test/fts5matchinfo.test | 11 +++++++----
test/fts4aa.test | 7 ++++++-
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/ext/fts5/test/fts5matchinfo.test b/ext/fts5/test/fts5matchinfo.test
index d8d8d84..5706933 100644
--- a/ext/fts5/test/fts5matchinfo.test
+++ b/ext/fts5/test/fts5matchinfo.test
@@ -500,14 +500,18 @@ do_execsql_test 15.0 {
INSERT INTO t1 VALUES('c', 'd');
}
+if {$tcl_platform(byteOrder)=="littleEndian"} {
+ set res {X'02000000'}
+} else {
+ set res {X'00000002'}
+}
do_execsql_test 15.1 {
SELECT quote(matchinfo(t1, 'n')) FROM t1 LIMIT 1;
-} {X'02000000'}
-
+} $res
do_execsql_test 15.2 {
DELETE FROM t1_content WHERE rowid=1;
SELECT quote(matchinfo(t1, 'n')) FROM t1 LIMIT 1;
-} {X'02000000'}
+} $res
fts5_aux_test_functions db
do_execsql_test 15.3 {
@@ -517,4 +521,3 @@ do_execsql_test 15.3 {
}
finish_test
-
diff --git a/test/fts4aa.test b/test/fts4aa.test
index 7349841..112d60a 100644
--- a/test/fts4aa.test
+++ b/test/fts4aa.test
@@ -229,13 +229,18 @@ do_catchsql_test fts4aa-5.70 {
# 2019-11-18 https://bugs.chromium.org/p/chromium/issues/detail?id=1025467
db close
sqlite3 db :memory:
+if {$tcl_platform(byteOrder)=="littleEndian"} {
+ set res {X'0200000000000000000000000E0000000E00000001000000010000000100000001000000'}
+} else {
+ set res {X'0000000200000000000000000000000E0000000E00000001000000010000000100000001'}
+}
do_execsql_test fts4aa-6.10 {
CREATE VIRTUAL TABLE f USING fts4();
INSERT INTO f_segdir VALUES (77,91,0,0,'255 77',x'0001308000004d5c4ddddddd4d4d7b4d4d4d614d8019ff4d05000001204d4d2e4d6e4d4d4d4b4d6c4d004d4d4d4d4d4d3d000000004d5d4d4d645d4d004d4d4d4d4d4d4d4d4d454d6910004d05ffff054d646c4d004d5d4d4d4d4d3d000000004d4d4d4d4d4d4d4d4d4d4d69624d4d4d04004d4d4d4d4d604d4ce1404d554d45');
INSERT INTO f_segdir VALUES (77,108,0,0,'255 77',x'0001310000fa64004d4d4d3c5d4d654d4d4d614d8000ff4d05000001204d4d2e4d6e4d4d4dff4d4d4d4d4d4d00104d4d4d4d000000004d4d4d0400311d4d4d4d4d4d4d4d4d4d684d6910004d05ffff054d4d6c4d004d4d4d4d4d4d3d000000004d4d4d4d644d4d4d4d4d4d69624d4d4d03ed4d4d4d4d4d604d4ce1404d550080');
INSERT INTO f_stat VALUES (0,x'80808080100000000064004d4d4d3c4d4d654d4d4d614d8000ff4df6ff1a00204d4d2e4d6e4d4d4d104d4d4d4d4d4d00104d4d4d4d4d4d69574d4d4d000031044d4d4d3e4d4d4c4d05004d6910');
SELECT quote(matchinfo(f,'pnax')) from f where f match '0 1';
-} {X'0200000000000000000000000E0000000E00000001000000010000000100000001000000'}
+} $res
# 2019-11-18 Detect infinite loop in fts3SelectLeaf()
db close
--
2.19.1

View File

@ -1,120 +0,0 @@
From afbd5f941b1167661ed68077cd075bd8bbce378e Mon Sep 17 00:00:00 2001
From: Ondrej Dubaj <odubaj@redhat.com>
Date: Wed, 29 Jan 2020 08:15:03 +0100
Subject: [PATCH] Minor change for compatibility with the s390 architecture.
---
src/insert.c | 4 +++-
src/parse.y | 6 ++++++
src/test_multiplex.c | 2 +-
src/vdbeaux.c | 5 ++++-
test/in.test | 22 ++++++++++++++--------
5 files changed, 28 insertions(+), 11 deletions(-)
diff --git a/src/insert.c b/src/insert.c
index 93f22a8..7a04b98 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -2170,12 +2170,14 @@ void sqlite3GenerateConstraintChecks(
x = *sqlite3VdbeGetOp(v, addrConflictCk);
if( x.opcode!=OP_IdxRowid ){
int p2; /* New P2 value for copied conflict check opcode */
+ const char *zP4;
if( sqlite3OpcodeProperty[x.opcode]&OPFLG_JUMP ){
p2 = lblRecheckOk;
}else{
p2 = x.p2;
}
- sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, x.p4.z, x.p4type);
+ zP4 = x.p4type==P4_INT32 ? SQLITE_INT_TO_PTR(x.p4.i) : x.p4.z;
+ sqlite3VdbeAddOp4(v, x.opcode, x.p1, p2, x.p3, zP4, x.p4type);
sqlite3VdbeChangeP5(v, x.p5);
VdbeCoverageIf(v, p2!=x.p2);
}
diff --git a/src/parse.y b/src/parse.y
index 5876a1a..c783c69 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -1193,6 +1193,12 @@ expr(A) ::= expr(A) between_op(N) expr(X) AND expr(Y). [BETWEEN] {
*/
sqlite3ExprUnmapAndDelete(pParse, A);
A = sqlite3Expr(pParse->db, TK_INTEGER, N ? "1" : "0");
+ }else if( 0 && Y->nExpr==1 && sqlite3ExprIsConstant(Y->a[0].pExpr) ){
+ Expr *pRHS = Y->a[0].pExpr;
+ Y->a[0].pExpr = 0;
+ sqlite3ExprListDelete(pParse->db, Y);
+ A = sqlite3PExpr(pParse, TK_EQ, A, pRHS);
+ if( N ) A = sqlite3PExpr(pParse, TK_NOT, A, 0);
}else{
A = sqlite3PExpr(pParse, TK_IN, A, 0);
if( A ){
diff --git a/src/test_multiplex.c b/src/test_multiplex.c
index ed8c9f7..56e78c3 100644
--- a/src/test_multiplex.c
+++ b/src/test_multiplex.c
@@ -530,7 +530,7 @@ static int multiplexOpen(
pGroup->szChunk += 65536;
}
}
- pGroup->flags = flags;
+ pGroup->flags = (flags & ~SQLITE_OPEN_URI);
rc = multiplexSubFilename(pGroup, 1);
if( rc==SQLITE_OK ){
pSubOpen = multiplexSubOpen(pGroup, 0, &rc, pOutFlags, 0);
diff --git a/src/vdbeaux.c b/src/vdbeaux.c
index fab8b70..c38a4f7 100644
--- a/src/vdbeaux.c
+++ b/src/vdbeaux.c
@@ -4726,7 +4726,10 @@ static int vdbeRecordCompareString(
assert( pPKey2->aMem[0].flags & MEM_Str );
vdbeAssertFieldCountWithinLimits(nKey1, pKey1, pPKey2->pKeyInfo);
- getVarint32(&aKey1[1], serial_type);
+ serial_type = (u8)(aKey1[1]);
+ if( serial_type >= 0x80 ){
+ sqlite3GetVarint32(&aKey1[1], (u32*)&serial_type);
+ }
if( serial_type<12 ){
res = pPKey2->r1; /* (pKey1/nKey1) is a number or a null */
}else if( !(serial_type & 0x01) ){
diff --git a/test/in.test b/test/in.test
index 4595d5f..a1fe1d2 100644
--- a/test/in.test
+++ b/test/in.test
@@ -765,19 +765,25 @@ do_execsql_test in-18.1 {
#
# Also ticket https://sqlite.org/src/info/29f635e0af71234b
#
-do_execsql_test in-19.1 {
+do_execsql_test in-19.10 {
DROP TABLE IF EXISTS t0;
CREATE TABLE t0(c0 REAL UNIQUE);
- INSERT INTO t0(c0) VALUES(2.07093491255203046E18);
- SELECT 1 FROM t0 WHERE c0 IN ('2070934912552030444');
+ INSERT INTO t0(c0) VALUES(2.0625E00);
+ SELECT 1 FROM t0 WHERE c0 IN ('2.0625');
} {1}
-do_execsql_test in-19.2 {
- SELECT c0 IN ('2070934912552030444') FROM t0;
+do_execsql_test in-19.20 {
+ SELECT c0 IN ('2.0625') FROM t0;
} {1}
-do_execsql_test in-19.3 {
- SELECT c0 IN ('2070934912552030444',2,3) FROM t0;
+do_execsql_test in-19.21 {
+ SELECT c0 = ('2.0625') FROM t0;
} {1}
-do_execsql_test in-19.4 {
+do_execsql_test in-19.22 {
+ SELECT c0 = ('0.20625e+01') FROM t0;
+} {1}
+do_execsql_test in-19.30 {
+ SELECT c0 IN ('2.0625',2,3) FROM t0;
+} {1}
+do_execsql_test in-19.40 {
DROP TABLE t0;
CREATE TABLE t0(c0 TEXT, c1 REAL, c2, PRIMARY KEY(c2, c0, c1));
CREATE INDEX i0 ON t0(c1 IN (c0));
--
2.19.1

View File

@ -4,9 +4,9 @@
%bcond_with static %bcond_with static
%bcond_without check %bcond_without check
%define realver 3310100 %define realver 3320000
%define docver 3310100 %define docver 3320000
%define rpmver 3.31.1 %define rpmver 3.32.0
%define year 2020 %define year 2020
Summary: Library that implements an embeddable SQL database engine Summary: Library that implements an embeddable SQL database engine
@ -31,15 +31,6 @@ Patch3: sqlite-3.8.0-percentile-test.patch
Patch4: sqlite-3.16-datetest-2.2c.patch Patch4: sqlite-3.16-datetest-2.2c.patch
# Modify sync2.test to pass with DIRSYNC turned off # Modify sync2.test to pass with DIRSYNC turned off
Patch5: sqlite-3.18.0-sync2-dirsync.patch Patch5: sqlite-3.18.0-sync2-dirsync.patch
# Resolving s390 arch incompatibility
# https://github.com/sqlite/sqlite/commit/b9f2e5f7774cee2282c2b0980bc29233e643200f
# https://github.com/sqlite/sqlite/commit/4b2f45be3426f18efbe251d39352e11e256b93e9
# https://github.com/sqlite/sqlite/commit/fbfd113365bb001152adb9944e127e9620ec3738
# https://github.com/sqlite/sqlite/commit/925ab5c17ef1061e2d9086e162e8381c4b2ebb2a
Patch6: sqlite-3.31.1-s390-arch-compatibibility.patch
# Modifying FTS tests to support big endian platforms
# https://github.com/sqlite/sqlite/commit/9ca9a53a421920a412d4fdfd57303593c1ecf723
Patch7: sqlite-3.31.1-modify-tests-BE.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: ncurses-devel readline-devel glibc-devel BuildRequires: ncurses-devel readline-devel glibc-devel
@ -147,8 +138,6 @@ This package contains the analysis program for %{name}.
%patch4 -p1 %patch4 -p1
%endif %endif
%patch5 -p1 %patch5 -p1
%patch6 -p1
%patch7 -p1
# Remove backup-file # Remove backup-file
rm -f %{name}-doc-%{docver}/sqlite.css~ || : rm -f %{name}-doc-%{docver}/sqlite.css~ || :
@ -268,6 +257,9 @@ make test
%endif %endif
%changelog %changelog
* Mon May 25 2020 Ondrej Dubaj <odubaj@redhat.com> - 3.32.0-1
- Updated to version 3.32.0 (https://sqlite.org/releaselog/3_32_0.html)
* Wed Feb 05 2020 Ondrej Dubaj <odubaj@redhat.com> - 3.31.1-1 * Wed Feb 05 2020 Ondrej Dubaj <odubaj@redhat.com> - 3.31.1-1
- Updated to version 3.31.1 (https://sqlite.org/releaselog/3_31_1.html) - Updated to version 3.31.1 (https://sqlite.org/releaselog/3_31_1.html)
- updated spec file, deleted useless patches - updated spec file, deleted useless patches