~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/archive/archive_test.cc

  • Committer: Monty Taylor
  • Date: 2010-01-12 21:34:24 UTC
  • mto: This revision was merged to the branch mainline in revision 1268.
  • Revision ID: mordred@inaugust.com-20100112213424-6mslywtlca49mvnk
Updated to pandora-buld v0.94

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
   along with this program; if not, write to the Free Software
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
 
#include <config.h>
 
16
#include "config.h"
17
17
#include "azio.h"
18
18
#include <string.h>
19
19
#include <assert.h>
22
22
#include <fcntl.h>
23
23
#include <unistd.h>
24
24
#include <cstdlib>
25
 
#include <memory>
 
25
#include "drizzled/my_getopt.h"
26
26
 
27
27
#if TIME_WITH_SYS_TIME
28
28
# include <sys/time.h>
35
35
# endif
36
36
#endif
37
37
 
38
 
#include <boost/scoped_ptr.hpp>
39
 
 
40
38
#define COMMENT_STRING "Your bases"
41
39
#define FRM_STRING "My bases"
42
40
#define TEST_FILENAME "test.az"
64
62
  if (argc > 2)
65
63
    return 0;
66
64
 
67
 
  drizzled::internal::my_init();
 
65
  my_init();
 
66
 
68
67
  MY_INIT(argv[0]);
69
68
 
70
69
  for (method= AZ_METHOD_BLOCK; method < AZ_METHOD_MAX; method++)
101
100
    }
102
101
  }
103
102
 
104
 
  drizzled::internal::my_end();
 
103
  my_end();
105
104
 
106
105
  return 0;
107
106
}
114
113
  int error;
115
114
  unsigned int x;
116
115
  int written_rows= 0;
117
 
  boost::scoped_ptr<azio_stream> writer_handle_ap(new azio_stream);
118
 
  boost::scoped_ptr<azio_stream> reader_handle_ap(new azio_stream);
119
 
  azio_stream &writer_handle= *writer_handle_ap.get();
120
 
  azio_stream &reader_handle= *reader_handle_ap.get();
 
116
  azio_stream writer_handle, reader_handle;
121
117
 
122
118
  memcpy(test_string, TEST_STRING_INIT, 1024);
123
119
 
291
287
int size_test(uint64_t length, uint64_t rows_to_test_for,
292
288
              az_method method)
293
289
{
294
 
  boost::scoped_ptr<azio_stream> writer_handle_ap(new azio_stream);
295
 
  boost::scoped_ptr<azio_stream> reader_handle_ap(new azio_stream);
296
 
  azio_stream &writer_handle= *writer_handle_ap.get();
297
 
  azio_stream &reader_handle= *reader_handle_ap.get();
 
290
  azio_stream writer_handle, reader_handle;
298
291
  uint64_t write_length;
299
292
  uint64_t read_length;
300
293
  uint64_t count;