From 27535bfe6acc89ae7ddfca02e0a0c499f99e09c0 Mon Sep 17 00:00:00 2001 From: John Christopher Anderson Date: Wed, 8 Oct 2008 18:52:32 +0000 Subject: add db_name back to database info, and test git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@702965 13f79535-47bb-0310-9956-ffa450edef68 --- share/www/script/couch_tests.js | 3 +++ src/couchdb/couch_db.erl | 2 ++ 2 files changed, 5 insertions(+) diff --git a/share/www/script/couch_tests.js b/share/www/script/couch_tests.js index 4d42ea6a..46e42464 100644 --- a/share/www/script/couch_tests.js +++ b/share/www/script/couch_tests.js @@ -26,6 +26,9 @@ var tests = { db.createDb(); if (debug) debugger; + // Get the database info, check the db_name + T(db.info().db_name == "test_suite_db"); + // Get the database info, check the doc_count T(db.info().doc_count == 0); diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl index f74a83fc..e1b36f42 100644 --- a/src/couchdb/couch_db.erl +++ b/src/couchdb/couch_db.erl @@ -168,10 +168,12 @@ get_db_info(Db) -> #db{fd=Fd, compactor_pid=Compactor, update_seq=SeqNum, + name=Name, fulldocinfo_by_id_btree=FullDocBtree} = Db, {ok, Size} = couch_file:bytes(Fd), {ok, {Count, DelCount}} = couch_btree:full_reduce(FullDocBtree), InfoList = [ + {db_name, Name}, {doc_count, Count}, {doc_del_count, DelCount}, {update_seq, SeqNum}, -- cgit v1.2.3