Change-Id: I64e1064a25e2d92c3df275deafb51377ac15f875
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5159
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>
| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,32 @@ |
| 0 |
+diff --git a/sqlite3.c b/sqlite3.c |
|
| 1 |
+index 73c69ef..e2a3ad2 100644 |
|
| 2 |
+--- a/sqlite3.c |
|
| 3 |
+@@ -103474,7 +103474,6 @@ SQLITE_PRIVATE void sqlite3EndTable( |
|
| 4 |
+ p = pParse->pNewTable; |
|
| 5 |
+ if( p==0 ) return; |
|
| 6 |
+ |
|
| 7 |
+- assert( !db->init.busy || !pSelect ); |
|
| 8 |
+ |
|
| 9 |
+ /* If the db->init.busy is 1 it means we are reading the SQL off the |
|
| 10 |
+ ** "sqlite_master" or "sqlite_temp_master" table on the disk. |
|
| 11 |
+@@ -103486,6 +103485,10 @@ SQLITE_PRIVATE void sqlite3EndTable( |
|
| 12 |
+ ** table itself. So mark it read-only. |
|
| 13 |
+ */ |
|
| 14 |
+ if( db->init.busy ){
|
|
| 15 |
++ if( pSelect ){
|
|
| 16 |
++ sqlite3ErrorMsg(pParse, ""); |
|
| 17 |
++ return; |
|
| 18 |
++ } |
|
| 19 |
+ p->tnum = db->init.newTnum; |
|
| 20 |
+ if( p->tnum==1 ) p->tabFlags |= TF_Readonly; |
|
| 21 |
+ } |
|
| 22 |
+@@ -117813,7 +117816,7 @@ static void corruptSchema( |
|
| 23 |
+ char *z; |
|
| 24 |
+ if( zObj==0 ) zObj = "?"; |
|
| 25 |
+ z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj); |
|
| 26 |
+- if( zExtra ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); |
|
| 27 |
++ if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); |
|
| 28 |
+ sqlite3DbFree(db, *pData->pzErrMsg); |
|
| 29 |
+ *pData->pzErrMsg = z; |
|
| 30 |
+ } |
| 0 | 31 |
deleted file mode 100644 |
| ... | ... |
@@ -1,32 +0,0 @@ |
| 1 |
-diff --git a/sqlite3.c b/sqlite3.c |
|
| 2 |
-index 73c69ef..e2a3ad2 100644 |
|
| 3 |
-+++ b/sqlite3.c |
|
| 4 |
-@@ -103474,7 +103474,6 @@ SQLITE_PRIVATE void sqlite3EndTable( |
|
| 5 |
- p = pParse->pNewTable; |
|
| 6 |
- if( p==0 ) return; |
|
| 7 |
- |
|
| 8 |
-- assert( !db->init.busy || !pSelect ); |
|
| 9 |
- |
|
| 10 |
- /* If the db->init.busy is 1 it means we are reading the SQL off the |
|
| 11 |
- ** "sqlite_master" or "sqlite_temp_master" table on the disk. |
|
| 12 |
-@@ -103486,6 +103485,10 @@ SQLITE_PRIVATE void sqlite3EndTable( |
|
| 13 |
- ** table itself. So mark it read-only. |
|
| 14 |
- */ |
|
| 15 |
- if( db->init.busy ){
|
|
| 16 |
-+ if( pSelect ){
|
|
| 17 |
-+ sqlite3ErrorMsg(pParse, ""); |
|
| 18 |
-+ return; |
|
| 19 |
-+ } |
|
| 20 |
- p->tnum = db->init.newTnum; |
|
| 21 |
- if( p->tnum==1 ) p->tabFlags |= TF_Readonly; |
|
| 22 |
- } |
|
| 23 |
-@@ -117813,7 +117816,7 @@ static void corruptSchema( |
|
| 24 |
- char *z; |
|
| 25 |
- if( zObj==0 ) zObj = "?"; |
|
| 26 |
- z = sqlite3MPrintf(db, "malformed database schema (%s)", zObj); |
|
| 27 |
-- if( zExtra ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); |
|
| 28 |
-+ if( zExtra && zExtra[0] ) z = sqlite3MPrintf(db, "%z - %s", z, zExtra); |
|
| 29 |
- sqlite3DbFree(db, *pData->pzErrMsg); |
|
| 30 |
- *pData->pzErrMsg = z; |
|
| 31 |
- } |