/ Check-in [70b57daf]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Allow a VIEW to reference undefined tables and functions when initially created. The error report is deferred until the VIEW is used. This allows views to be created before subviews and tables that the view references.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 70b57dafb3216feb21091883196831fa1252e7bf
User & Date: drh 2015-08-03 13:44:45
Context
2015-08-04
14:18
In the sqlite3_analyzer.exe utility, show the depth of each btree and report the average fanout of indexes and WITHOUT ROWID tables. check-in: cd997770 user: drh tags: trunk
2015-08-03
17:03
Add the "--uri" option to utility program "showdb". This option causes showdb to use sqlite with the SQLITE_OPEN_URI option to open the database file, instead of opening it directly using the OS open() function. check-in: 90e34d51 user: dan tags: showdb-uri-option
13:44
Allow a VIEW to reference undefined tables and functions when initially created. The error report is deferred until the VIEW is used. This allows views to be created before subviews and tables that the view references. check-in: 70b57daf user: drh tags: trunk
2015-08-01
18:18
Add extra tests for RBU and FTS3/4. check-in: 34190449 user: dan tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/build.c.

  2084   2084     ** they will persist after the current sqlite3_exec() call returns.
  2085   2085     */
  2086   2086     p->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
  2087   2087     sqlite3SelectDelete(db, pSelect);
  2088   2088     if( db->mallocFailed ){
  2089   2089       return;
  2090   2090     }
  2091         -  if( !db->init.busy ){
  2092         -    sqlite3ViewGetColumnNames(pParse, p);
  2093         -  }
  2094   2091   
  2095   2092     /* Locate the end of the CREATE VIEW statement.  Make sEnd point to
  2096   2093     ** the end.
  2097   2094     */
  2098   2095     sEnd = pParse->sLastToken;
  2099   2096     if( ALWAYS(sEnd.z[0]!=0) && sEnd.z[0]!=';' ){
  2100   2097       sEnd.z += sEnd.n;

Changes to test/view.test.

   595    595       CREATE VIEW v512 AS SELECT * FROM v256 UNION SELECT * FROM v256;
   596    596       CREATE VIEW v1024 AS SELECT * FROM v512 UNION SELECT * FROM v512;
   597    597       CREATE VIEW v2048 AS SELECT * FROM v1024 UNION SELECT * FROM v1024;
   598    598       CREATE VIEW v4096 AS SELECT * FROM v2048 UNION SELECT * FROM v2048;
   599    599       CREATE VIEW v8192 AS SELECT * FROM v4096 UNION SELECT * FROM v4096;
   600    600       CREATE VIEW v16384 AS SELECT * FROM v8192 UNION SELECT * FROM v8192;
   601    601       CREATE VIEW v32768 AS SELECT * FROM v16384 UNION SELECT * FROM v16384;
   602         -    CREATE VIEW vx AS SELECT * FROM v32768 UNION SELECT * FROM v32768;
          602  +    SELECT * FROM v32768 UNION SELECT * FROM v32768;
   603    603     }
   604    604   } {1 {too many references to "v1": max 65535}}
   605    605   ifcapable progress {
   606    606     do_test view-21.2 {
   607    607       db progress 1000 {expr 1}
   608    608       catchsql {
   609    609         SELECT * FROM v32768;