Fix a crash in unionvtab caused by a misconfiguration. Add other test cases

for the same.

FossilOrigin-Name: 255d6b99de2bb210c09ebee9f9481ba3d1130fda47e6e01b4cc8411d00679d09
This commit is contained in:
dan
2017-07-18 21:19:17 +00:00
parent 5a75dd86c1
commit 7f3d20acec
4 changed files with 45 additions and 10 deletions
+3 -1
View File
@@ -477,8 +477,10 @@ static int unionConnect(
if( rc==SQLITE_OK ){
pTab->db = db;
rc = unionSourceCheck(pTab, pzErr);
}
/* Compose a CREATE TABLE statement and pass it to declare_vtab() */
/* Compose a CREATE TABLE statement and pass it to declare_vtab() */
if( rc==SQLITE_OK ){
pStmt = unionPreparePrintf(&rc, pzErr, db, "SELECT "
"'CREATE TABLE xyz('"
" || group_concat(quote(name) || ' ' || type, ', ')"