aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordrh <>2024-08-28 19:13:16 +0000
committerdrh <>2024-08-28 19:13:16 +0000
commitc1547d1f7acfdf7502f743529c6c9a1b7aefcf60 (patch)
tree396ca3b2dcf49955855cd9a3380026af8f253340 /src
parent50ca8af6f2ff18c1e6e77cd5d0b8c60e26331b4c (diff)
downloadsqlite-c1547d1f7acfdf7502f743529c6c9a1b7aefcf60.tar.gz
sqlite-c1547d1f7acfdf7502f743529c6c9a1b7aefcf60.zip
Do not allow sqlite3_blob_open() to work on a any table that contains
generated columns, even columns of the table which are not generated themselves, because such columns might be part of the expression of a STORED column. This restriction could be relaxed some, but that would be a lot of code for something that nobody ever uses. FossilOrigin-Name: 6e84947123339f0ea2b7dabc6134a621eed09317f81647f15870ed50a0f7d1bc
Diffstat (limited to 'src')
-rw-r--r--src/vdbeblob.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vdbeblob.c b/src/vdbeblob.c
index 522447dbc..6cb36da37 100644
--- a/src/vdbeblob.c
+++ b/src/vdbeblob.c
@@ -167,6 +167,11 @@ int sqlite3_blob_open(
pTab = 0;
sqlite3ErrorMsg(&sParse, "cannot open table without rowid: %s", zTable);
}
+ if( pTab && (pTab->tabFlags&TF_HasGenerated)!=0 ){
+ pTab = 0;
+ sqlite3ErrorMsg(&sParse, "cannot open table with generated columns: %s",
+ zTable);
+ }
#ifndef SQLITE_OMIT_VIEW
if( pTab && IsView(pTab) ){
pTab = 0;