mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-29 08:01:23 +03:00
Fix the ATTACH command so that the filename argument can be any expression
and so that if authorizer callback gets a NULL pointer for the filename if the filename argument is anything other than a string literal. Ticket [9013e13dba5b58c7] FossilOrigin-Name: e64e1453a9c204d93de1af92dc0b3ca26762b024
This commit is contained in:
@ -1628,9 +1628,20 @@ ifcapable attach {
|
||||
ATTACH DATABASE ':memory:' AS test1
|
||||
}
|
||||
} {0 {}}
|
||||
do_test auth-1.252 {
|
||||
do_test auth-1.252a {
|
||||
set ::authargs
|
||||
} {:memory: {} {} {}}
|
||||
do_test auth-1.252b {
|
||||
db eval {DETACH test1}
|
||||
set ::attachfilename :memory:
|
||||
db eval {ATTACH $::attachfilename AS test1}
|
||||
set ::authargs
|
||||
} {{} {} {} {}}
|
||||
do_test auth-1.252c {
|
||||
db eval {DETACH test1}
|
||||
db eval {ATTACH ':mem' || 'ory:' AS test1}
|
||||
set ::authargs
|
||||
} {{} {} {} {}}
|
||||
do_test auth-1.253 {
|
||||
catchsql {DETACH DATABASE test1}
|
||||
proc auth {code arg1 arg2 arg3 arg4} {
|
||||
|
Reference in New Issue
Block a user