1 /* Copyright (c) 2003-2007 MySQL AB
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; version 2 of the License.
7 This program is distributed in the hope that it will be useful,
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 GNU General Public License for more details.
12 You should have received a copy of the GNU General Public License
13 along with this program; if not, write to the Free Software
14 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */
16 #include "consumer_printer.hpp"
17 extern FilteredNdbOut info
;
18 extern NdbRecordPrintFormat g_ndbrecord_print_format
;
19 extern const char *tab_path
;
22 BackupPrinter::table(const TableS
& tab
)
24 if (m_print
|| m_print_meta
)
28 info
<< "Successfully printed table: ", tab
.m_dictTable
->getName();
34 BackupPrinter::tuple(const TupleS
& tup
, Uint32 fragId
)
37 if (m_print
|| m_print_data
)
39 if (m_ndbout
.m_out
== info
.m_out
)
42 info
<< tup
.getTable()->getTableName() << "; ";
44 m_ndbout
<< tup
<< g_ndbrecord_print_format
.lines_terminated_by
;
49 BackupPrinter::logEntry(const LogEntry
& logE
)
51 if (m_print
|| m_print_log
)
52 m_ndbout
<< logE
<< endl
;
57 BackupPrinter::endOfLogEntrys()
59 if (m_print
|| m_print_log
)
62 info
<< "Printed " << m_dataCount
<< " tuples and "
63 << m_logCount
<< " log entries"
64 << " to stdout." << endl
;
68 BackupPrinter::update_apply_status(const RestoreMetaData
&metaData
)