CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
112 lines
3.3 KiB
Plaintext
112 lines
3.3 KiB
Plaintext
# 2005 September 17
|
|
#
|
|
# 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.
|
|
#
|
|
#***********************************************************************
|
|
# This file implements regression tests for SQLite library.
|
|
#
|
|
# This file implements tests to verify that ticket #1435 has been
|
|
# fixed.
|
|
#
|
|
#
|
|
# $Id: tkt1435.test,v 1.2 2006/01/17 09:35:02 danielk1977 Exp $
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
|
|
ifcapable !memorydb {
|
|
finish_test
|
|
return
|
|
}
|
|
|
|
# Construct the sample database.
|
|
#
|
|
do_test tkt1435-1.0 {
|
|
sqlite3 db :memory:
|
|
execsql {
|
|
CREATE TABLE Instances(
|
|
instanceId INTEGER PRIMARY KEY,
|
|
troveName STR,
|
|
versionId INT,
|
|
flavorId INT,
|
|
timeStamps STR,
|
|
isPresent INT,
|
|
pinned BOOLEAN
|
|
);
|
|
INSERT INTO "Instances"
|
|
VALUES(1, 'libhello:runtime', 1, 1, 1126929880.094, 1, 1);
|
|
INSERT INTO "Instances"
|
|
VALUES(2, 'libhello:user', 1, 1, 1126929880.094, 1, 0);
|
|
INSERT INTO "Instances"
|
|
VALUES(3, 'libhello:script', 1, 1, 1126929880.094, 1, 0);
|
|
INSERT INTO "Instances"
|
|
VALUES(4, 'libhello', 1, 1, 1126929880.094, 1, 0);
|
|
|
|
CREATE TABLE Versions(versionId INTEGER PRIMARY KEY,version STR UNIQUE);
|
|
INSERT INTO "Versions" VALUES(0, NULL);
|
|
INSERT INTO "Versions" VALUES(1, '/localhost@rpl:linux/0-1-1');
|
|
|
|
CREATE TABLE Flavors(flavorId integer primary key, flavor str unique);
|
|
INSERT INTO "Flavors" VALUES(0, NULL);
|
|
INSERT INTO "Flavors" VALUES(1, '1#x86');
|
|
|
|
CREATE TEMPORARY TABLE tlList (
|
|
row INTEGER PRIMARY KEY,
|
|
name STRING,
|
|
version STRING,
|
|
flavor STRING
|
|
);
|
|
|
|
INSERT INTO tlList
|
|
values(NULL, 'libhello:script', '/localhost@rpl:linux/0-1-1', '1#x86');
|
|
INSERT INTO tlList
|
|
values(NULL, 'libhello:user', '/localhost@rpl:linux/0-1-1', '1#x86');
|
|
INSERT INTO tlList
|
|
values(NULL, 'libhello:runtime', '/localhost@rpl:linux/0-1-1', '1#x86');
|
|
}
|
|
} {}
|
|
|
|
# Run the query with an index
|
|
#
|
|
do_test tkt1435-1.1 {
|
|
execsql {
|
|
select row, pinned from tlList, Instances, Versions, Flavors
|
|
where
|
|
Instances.troveName = tlList.name
|
|
and Versions.version = tlList.version
|
|
and Instances.versionId = Versions.versionId
|
|
and ( Flavors.flavor = tlList.flavor or Flavors.flavor is NULL
|
|
and tlList.flavor = '')
|
|
and Instances.flavorId = Flavors.flavorId
|
|
order by row asc;
|
|
}
|
|
} {1 0 2 0 3 1}
|
|
|
|
# Create a indices, analyze and rerun the query.
|
|
# Verify that the results are the same
|
|
#
|
|
do_test tkt1435-1.2 {
|
|
execsql {
|
|
CREATE INDEX InstancesNameIdx ON Instances(troveName);
|
|
CREATE UNIQUE INDEX InstancesIdx
|
|
ON Instances(troveName, versionId, flavorId);
|
|
ANALYZE;
|
|
select row, pinned from tlList, Instances, Versions, Flavors
|
|
where
|
|
Instances.troveName = tlList.name
|
|
and Versions.version = tlList.version
|
|
and Instances.versionId = Versions.versionId
|
|
and ( Flavors.flavor = tlList.flavor or Flavors.flavor is NULL
|
|
and tlList.flavor = '')
|
|
and Instances.flavorId = Flavors.flavorId
|
|
order by row asc;
|
|
}
|
|
} {1 0 2 0 3 1}
|
|
|
|
finish_test
|