~mdcallag/+junk/5.1-map

« back to all changes in this revision

Viewing changes to storage/ndb/tools/restore/consumer_printer.cpp

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "consumer_printer.hpp"
 
17
extern FilteredNdbOut info;
 
18
extern NdbRecordPrintFormat g_ndbrecord_print_format;
 
19
extern const char *tab_path;
17
20
 
18
21
bool
19
22
BackupPrinter::table(const TableS & tab)
21
24
  if (m_print || m_print_meta) 
22
25
  {
23
26
    m_ndbout << tab;
24
 
    ndbout_c("Successfully printed table: %s", tab.m_dictTable->getName());
 
27
    info.setLevel(254);
 
28
    info << "Successfully printed table: ", tab.m_dictTable->getName();
25
29
  }
26
30
  return true;
27
31
}
31
35
{
32
36
  m_dataCount++;
33
37
  if (m_print || m_print_data)
34
 
    m_ndbout << tup << endl;  
 
38
  {
 
39
    if (m_ndbout.m_out == info.m_out)
 
40
    {
 
41
      info.setLevel(254);
 
42
      info << tup.getTable()->getTableName() << "; ";
 
43
    }
 
44
    m_ndbout << tup << g_ndbrecord_print_format.lines_terminated_by;  
 
45
  }
35
46
}
36
47
 
37
48
void
47
58
{
48
59
  if (m_print || m_print_log) 
49
60
  {
50
 
    ndbout << "Printed " << m_dataCount << " tuples and "
51
 
           << m_logCount << " log entries" 
52
 
           << " to stdout." << endl;
 
61
    info.setLevel(254);
 
62
    info << "Printed " << m_dataCount << " tuples and "
 
63
         << m_logCount << " log entries" 
 
64
         << " to stdout." << endl;
53
65
  }
54
66
}
55
67
bool