Test: csvdump now scans all DBs.

This commit is contained in:
antirez 2015-08-05 12:27:15 +02:00
parent a5a06a8ecd
commit 175707e550

View File

@ -262,9 +262,11 @@ proc formatCommand {args} {
proc csvdump r { proc csvdump r {
set o {} set o {}
for {set db 0} {$db < 16} {incr db} {
{*}$r select $db
foreach k [lsort [{*}$r keys *]] { foreach k [lsort [{*}$r keys *]] {
set type [{*}$r type $k] set type [{*}$r type $k]
append o [csvstring $k] , [csvstring $type] , append o [csvstring $db] , [csvstring $k] , [csvstring $type] ,
switch $type { switch $type {
string { string {
append o [csvstring [{*}$r get $k]] "\n" append o [csvstring [{*}$r get $k]] "\n"
@ -302,6 +304,8 @@ proc csvdump r {
} }
} }
} }
}
{*}$r select 9
return $o return $o
} }