--- src/attach.c.orig 2010-03-21 21:28:14.144127448 -0700 +++ src/attach.c 2010-03-21 21:55:58.224754199 -0700 @@ -313,6 +313,12 @@ #ifndef SQLITE_OMIT_AUTHORIZATION if( pAuthArg ){ char *zAuthArg = pAuthArg->u.zToken; + int i; + char iBuf[32]; + if( sqlite3ExprIsInteger(pAuthArg, &i) ){ + sqlite3_snprintf(sizeof(iBuf), iBuf, "%d", pAuthArg->u.iValue); + zAuthArg = iBuf; + } if( NEVER(zAuthArg==0) ){ goto attach_end; }