title: writing to LMDB failed
body: <p>I was trying write data to lmdb database (took reference from caffe/tools/convert_imageset.cpp). There were no errors in console but the file size of .mdb file remains zero i.e no data is written to the file but data and lock file are created.
  The part of the code that I tried is  : </p>
  
  <pre><code>scoped_ptr&lt;db::DB&gt; db(db::GetDB("lmdb"));
  db-&gt;Open(argv[3], db::NEW);
  scoped_ptr&lt;db::Transaction&gt; txn(db-&gt;NewTransaction());
  
  datum.SerializeToString(&amp;out);
  txn-&gt;Put(key1, out);
  txn-&gt;Commit();
  </code></pre>
  
  <p>I was not able to figure out if I am missing something. Any references to how LMBD works would be helpful. </p>