1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-05 04:30:38 +03:00

Merge all recent trunk changes, especially the fix for

ticket [369d57fb8e5ccdff06f1], but also the skip-scan improvement and
performance improvements in the b-tree code.

FossilOrigin-Name: 0b9e2c3269695713b538561d999c68097db70f0c
This commit is contained in:
drh
2014-08-21 16:09:36 +00:00
22 changed files with 374 additions and 155 deletions

View File

@@ -1988,7 +1988,11 @@ static FILE *output_file_open(const char *zFile){
*/
static void sql_trace_callback(void *pArg, const char *z){
FILE *f = (FILE*)pArg;
if( f ) fprintf(f, "%s\n", z);
if( f ){
int i = (int)strlen(z);
while( i>0 && z[i-1]==';' ){ i--; }
fprintf(f, "%.*s;\n", i, z);
}
}
/*
@@ -2600,7 +2604,7 @@ static int do_meta_command(char *zLine, ShellState *p){
" (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x"
" FROM sqlite_master UNION ALL"
" SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
"WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'"
"WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%' "
"ORDER BY rowid",
callback, &data, &zErrMsg
);
@@ -3155,7 +3159,7 @@ static int do_meta_command(char *zLine, ShellState *p){
" (SELECT sql sql, type type, tbl_name tbl_name, name name, rowid x"
" FROM sqlite_master UNION ALL"
" SELECT sql, type, tbl_name, name, rowid FROM sqlite_temp_master) "
"WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%'"
"WHERE type!='meta' AND sql NOTNULL AND name NOT LIKE 'sqlite_%' "
"ORDER BY rowid",
callback, &data, &zErrMsg
);