aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/printf.c18
-rw-r--r--src/select.c2
-rw-r--r--src/shell.c.in4
3 files changed, 10 insertions, 14 deletions
diff --git a/src/printf.c b/src/printf.c
index 0fb3158e9..48382143b 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -864,21 +864,17 @@ void sqlite3_str_vappendf(
if( (pAccum->printfFlags & SQLITE_PRINTF_INTERNAL)==0 ) return;
pItem = va_arg(ap, SrcItem*);
assert( bArgList==0 );
- if( pItem->zDatabase ){
- sqlite3_str_appendall(pAccum, pItem->zDatabase);
- sqlite3_str_append(pAccum, ".", 1);
- }
- if( pItem->zName ){
+ if( pItem->zAlias ){
+ sqlite3_str_appendall(pAccum, pItem->zAlias);
+ }else if( pItem->zName ){
+ if( pItem->zDatabase ){
+ sqlite3_str_appendall(pAccum, pItem->zDatabase);
+ sqlite3_str_append(pAccum, ".", 1);
+ }
sqlite3_str_appendall(pAccum, pItem->zName);
}else if( pItem->pSelect ){
sqlite3_str_appendf(pAccum, "SUBQUERY %u", pItem->pSelect->selId);
}
- if( flag_altform2 ){
- if( pItem->zAlias ){
- sqlite3_str_append(pAccum, " AS ", 4);
- sqlite3_str_appendall(pAccum, pItem->zAlias );
- }
- }
length = width = 0;
break;
}
diff --git a/src/select.c b/src/select.c
index 3dd944d9c..cab90eb01 100644
--- a/src/select.c
+++ b/src/select.c
@@ -5782,7 +5782,7 @@ static void explainSimpleCount(
){
if( pParse->explain==2 ){
int bCover = (pIdx!=0 && (HasRowid(pTab) || !IsPrimaryKeyIndex(pIdx)));
- sqlite3VdbeExplain(pParse, 0, "SCAN TABLE %s%s%s",
+ sqlite3VdbeExplain(pParse, 0, "SCAN %s%s%s",
pTab->zName,
bCover ? " USING COVERING INDEX " : "",
bCover ? pIdx->zName : ""
diff --git a/src/shell.c.in b/src/shell.c.in
index 980fa6e6f..889ed0d16 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -5777,7 +5777,7 @@ static int lintFkeyIndexes(
" || fkey_collate_clause("
" f.[table], COALESCE(f.[to], p.[name]), s.name, f.[from]),' AND ')"
", "
- " 'SEARCH TABLE ' || s.name || ' USING COVERING INDEX*('"
+ " 'SEARCH ' || s.name || ' USING COVERING INDEX*('"
" || group_concat('*=?', ' AND ') || ')'"
", "
" s.name || '(' || group_concat(f.[from], ', ') || ')'"
@@ -5797,7 +5797,7 @@ static int lintFkeyIndexes(
"GROUP BY s.name, f.id "
"ORDER BY (CASE WHEN ? THEN f.[table] ELSE s.name END)"
;
- const char *zGlobIPK = "SEARCH TABLE * USING INTEGER PRIMARY KEY (rowid=?)";
+ const char *zGlobIPK = "SEARCH * USING INTEGER PRIMARY KEY (rowid=?)";
for(i=2; i<nArg; i++){
int n = strlen30(azArg[i]);