From: drh Date: Thu, 6 Jul 2017 22:40:47 +0000 (+0000) Subject: Always load the schema before starting tab-completion. X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f7954140be9718289dca99f382ef458e6e3e577a;p=thirdparty%2Fsqlite.git Always load the schema before starting tab-completion. FossilOrigin-Name: 907fd3aab6205ac042d60c6455418a99b45efe954b3510597d54462cdbd12bfd --- diff --git a/manifest b/manifest index 106cd47932..6173b265b2 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Tab-completion\snow\salso\sworks\susing\sreadline/editline. -D 2017-07-06T20:08:17.868 +C Always\sload\sthe\sschema\sbefore\sstarting\stab-completion. +D 2017-07-06T22:40:47.126 F Makefile.in 081e48dfe7f995d57ce1a88ddf4d2917b4349158648a6cd45b42beae30de3a12 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434 F Makefile.msc 4ebb1d257cac7fb1bcb4ba59278416d410ff1c4bf59447a9c37a415f3516056a @@ -449,7 +449,7 @@ F src/random.c 80f5d666f23feb3e6665a6ce04c7197212a88384 F src/resolve.c d1e69759e7a79c156c692793f5d16f82f9a60ce5e82efd95e4374b2423034946 F src/rowset.c 7b7e7e479212e65b723bf40128c7b36dc5afdfac F src/select.c c9f7b7196e196e93979665680d055a789938b8e025556097bf484b184c0dd576 -F src/shell.c 5a93d49fca032b7940ddda558aebe64dda20918677602f2005cfd4ca20f66a6d +F src/shell.c 6e1c9307c754a149409b6a517615a1f0673a299e2a5e47897b62f6cd28193e1b F src/sqlite.h.in 51170f66b6fe5ab8d74caf40a790ea738c34ec0ffc58fca49e00ecf3b070976c F src/sqlite3.rc 5121c9e10c3964d5755191c80dd1180c122fc3a8 F src/sqlite3ext.h 58fd0676d3111d02e62e5a35992a7d3da5d3f88753acc174f2d37b774fbbdd28 @@ -1628,7 +1628,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 5cc7b0e2ca87220d714f3994a206ca903f5b82daa920fd625de035c646447800 -R e9426d4e3241285f34824e77961fa8c8 +P c906739f0c1046b57a8c6d4aa32dbfbb4c59a8d94eb87243bf5135c665492129 +R 55313a24118dcf99e2229f145c888c3e U drh -Z 5ec79e3f339c2091ba1a4808013649e6 +Z 9e77b99bd65c38a38bf6a561187c3966 diff --git a/manifest.uuid b/manifest.uuid index fe5334f636..fa7913313d 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -c906739f0c1046b57a8c6d4aa32dbfbb4c59a8d94eb87243bf5135c665492129 \ No newline at end of file +907fd3aab6205ac042d60c6455418a99b45efe954b3510597d54462cdbd12bfd \ No newline at end of file diff --git a/src/shell.c b/src/shell.c index d6738eca45..6a62521264 100644 --- a/src/shell.c +++ b/src/shell.c @@ -3609,6 +3609,7 @@ static char *readline_completion_generator(const char *text, int state){ char *zRet; if( state==0 ){ sqlite3_free(azCompletions); + sqlite3_exec(globalDb, "PRAGMA page_count", 0, 0, 0); /* Load the schema */ azCompletions = sqlite3_namelist(globalDb, text, -1, 0); iCompletion = 0; } @@ -3640,6 +3641,7 @@ static void linenoise_completion(const char *zLine, linenoiseCompletions *lc){ for(i=nLine-1; i>=0 && (isalnum(zLine[i]) || zLine[i]=='_'); i--){} if( i==nLine-1 ) return; iStart = i+1; + sqlite3_exec(globalDb, "PRAGMA page_count", 0, 0, 0); /* Load the schema */ az = sqlite3_namelist(globalDb, &zLine[iStart], -1, &n); if( n>0 ){ qsort(az, n, sizeof(az[0]),(int(*)(const void*,const void*))sqlite3_stricmp);