~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/storage_engine_api_tester/storage_engine_api_tester.cc

  • Committer: Brian Aker
  • Date: 2011-07-26 16:13:43 UTC
  • mto: This revision was merged to the branch mainline in revision 2373.
  • Revision ID: brian@tangent.org-20110726161343-t71d1etj03s8rywp
Additional update for OSX.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/session.h> // for mark_transaction_to_rollback
24
24
#include <string>
25
25
#include <map>
 
26
#include <iostream>
26
27
#include <fstream>
27
28
#include <drizzled/message/table.pb.h>
28
29
#include <drizzled/internal/m_string.h>
115
116
  state_multimap_iter cur= engine_state_transitions.find(engine_state);
116
117
  if (engine_state_transitions.count(engine_state) == 0)
117
118
  {
118
 
    cerr << "ERROR: Invalid engine state: " << engine_state << endl
119
 
         << "This should *NEVER* happen."
120
 
         << endl
121
 
         << "i.e. you've really screwed it up and you should be ashamed of "
122
 
         << "yourself." << endl;
 
119
    std::cerr << "ERROR: Invalid engine state: " << engine_state << std::endl
 
120
      << "This should *NEVER* happen."
 
121
      << std::endl
 
122
      << "i.e. you've really screwed it up and you should be ashamed of "
 
123
      << "yourself." << std::endl;
123
124
    assert(engine_state_transitions.count(engine_state));
124
125
  }
125
126
 
134
135
  if (cur == engine_state_transitions.end()
135
136
      || new_state.compare((*cur).second))
136
137
  {
137
 
    cerr << "ERROR: Invalid Storage Engine state transition!" << endl
138
 
         << "Cannot go from " << engine_state << " to " << new_state << endl;
 
138
    std::cerr << "ERROR: Invalid Storage Engine state transition!" << std::endl
 
139
      << "Cannot go from " << engine_state << " to " << new_state << std::endl;
139
140
    assert(false);
140
141
  }
141
142
 
142
143
  engine_state= new_state;
143
144
  engine_state_history.push_back(new_state);
144
145
 
145
 
  cerr << "\tENGINE STATE : " << engine_state << endl;
 
146
  std::cerr << "\tENGINE STATE : " << engine_state << std::endl;
146
147
}
147
148
 
148
149
static const string engine_name("STORAGE_ENGINE_API_TESTER");
431
432
  state_multimap_iter cur= cursor_state_transitions.find(cursor_state);
432
433
  if (cursor_state_transitions.count(cursor_state) == 0)
433
434
  {
434
 
    cerr << "ERROR: Invalid Cursor state: " << cursor_state << endl
435
 
         << "This should *NEVER* happen."
436
 
         << endl
437
 
         << "i.e. you've really screwed it up and you should be ashamed of "
438
 
         << "yourself." << endl;
 
435
    std::cerr << "ERROR: Invalid Cursor state: " << cursor_state << std::endl
 
436
      << "This should *NEVER* happen."
 
437
      << std::endl
 
438
      << "i.e. you've really screwed it up and you should be ashamed of "
 
439
      << "yourself." << std::endl;
439
440
    assert(cursor_state_transitions.count(cursor_state));
440
441
  }
441
442
 
450
451
  if (cur == cursor_state_transitions.end()
451
452
      || new_state.compare((*cur).second))
452
453
  {
453
 
    cerr << "ERROR: Invalid Cursor state transition!" << endl
 
454
    std::cerr << "ERROR: Invalid Cursor state transition!" << std::endl
454
455
         << "Cursor " << this << "Cannot go from "
455
 
         << cursor_state << " to " << new_state << endl;
 
456
         << cursor_state << " to " << new_state << std::endl;
456
457
    assert(false);
457
458
  }
458
459
 
467
468
 
468
469
  engine_state_history.push_back(cursor_state_str);
469
470
 
470
 
  cerr << "\t\tCursor " << this << " STATE : " << cursor_state << endl;
 
471
  std::cerr << "\t\tCursor " << this << " STATE : " << cursor_state << std::endl;
471
472
}
472
473
 
473
474
} /* namespace drizzled */