You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by jc...@apache.org on 2008/10/08 20:52:32 UTC
svn commit: r702965 - in /incubator/couchdb/trunk:
share/www/script/couch_tests.js src/couchdb/couch_db.erl
Author: jchris
Date: Wed Oct 8 11:52:32 2008
New Revision: 702965
URL: http://svn.apache.org/viewvc?rev=702965&view=rev
Log:
add db_name back to database info, and test
Modified:
incubator/couchdb/trunk/share/www/script/couch_tests.js
incubator/couchdb/trunk/src/couchdb/couch_db.erl
Modified: incubator/couchdb/trunk/share/www/script/couch_tests.js
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/share/www/script/couch_tests.js?rev=702965&r1=702964&r2=702965&view=diff
==============================================================================
--- incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] (original)
+++ incubator/couchdb/trunk/share/www/script/couch_tests.js [utf-8] Wed Oct 8 11:52:32 2008
@@ -26,6 +26,9 @@
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);
Modified: incubator/couchdb/trunk/src/couchdb/couch_db.erl
URL: http://svn.apache.org/viewvc/incubator/couchdb/trunk/src/couchdb/couch_db.erl?rev=702965&r1=702964&r2=702965&view=diff
==============================================================================
--- incubator/couchdb/trunk/src/couchdb/couch_db.erl (original)
+++ incubator/couchdb/trunk/src/couchdb/couch_db.erl Wed Oct 8 11:52:32 2008
@@ -168,10 +168,12 @@
#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},