blob: aa74e2e8056530a14a1f2243ff90cfe9f5ff4de2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
--- 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;
}
|